[lxc-devel] Improved sysvinit script

Stéphane Graber stgraber at ubuntu.com
Thu Feb 27 17:41:57 UTC 2014


On Thu, Feb 27, 2014 at 06:36:03PM +0100, Gianluigi Tiesi wrote:
> On 02/27/14 15:22, Dwight Engen wrote:
> >These changes will break the script on Fedora and derived distros. The
> >reason for /var/lock/subsys is that without it [1], SysV init (on Fedora at
> >least) won't call the K script at shutdown time so the containers don't
> >get a chance to shut down cleanly.
> 
> this is not really an issue, vmware does
> [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
> before doing touch
> it's harmless on debian but I don't think it usefull for debian
> 
> >
> >There are other problems as well, /lib/lsb/init-functions might not
> >exist, and even when it does on Fedora it does not contain
> >log_progress_msg() nor log_daemon_msg().
> >
> >Maybe it is not practical to have a cross distro sysvinit script?
> >Perhaps we should have distro specific scripts ala the way we do
> >default.conf in lxc/config/etc?
> 
> Most of the script can be shared, there is already a configure time
> switch (with-distro), you can make lxc.in and replace the distro
> specific parts:
> 
> I'll check fedora init docs and make a patch, but doesn't fedora
> uses systemd now?
> 
> I don't think lxc is suitable for old distributions, I had to use
> kernels from backports to have a good support in debian stable (3.11
> vs 3.2.0)
> and I still waiting for 3.13 because 3.12 breaks lxc-attach
> 
> Regards

LXC 1.0 works with kernels as far down as 2.6.32, I believe the sysvinit
script is currently mostly used on RHEL6, Oracle and clones.

The list of features obviously varies based on the kernel, lxc-attach is
only really useful starting with 3.8 and unprivileged containers only
start working with 3.12, but the rest mostly works on all >= 2.6.32
kernels.

> 
> -- 
> Gianluigi Tiesi <sherpya at netfarm.it>
> EDP Project Leader
> Netfarm S.r.l. - http://www.netfarm.it/
> Free Software: http://oss.netfarm.it/
> 
> Q: Because it reverses the logical flow of conversation.
> A: Why is putting a reply at the top of the message frowned upon?
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140227/9d95e14a/attachment.pgp>


More information about the lxc-devel mailing list