[lxc-devel] [PATCH 2/2] add lxc-autostart support for sysv init systems
Serge Hallyn
serge.hallyn at ubuntu.com
Fri Jan 3 21:44:53 UTC 2014
Quoting Stéphane Graber (stgraber at ubuntu.com):
> On Fri, Jan 03, 2014 at 02:00:25PM -0600, Serge Hallyn wrote:
> > Quoting Stéphane Graber (stgraber at ubuntu.com):
> > > On Thu, Jan 02, 2014 at 11:09:25AM -0600, Serge Hallyn wrote:
> > > > Quoting Dwight Engen (dwight.engen at oracle.com):
> > > > > This change updates the way init scripts get installed so that more
> > > > > than one init system can be supported. Instead of installing the
> > > > > systemd service file from the spec file, it should be installed at
> > > > > make install time, so that someone compiling from source also gets
> > > > > the unit file installed.
> > > > >
> > > > > Update the plamo template to use a lock file not named just
> > > > > /var/lock/subsys/lxc since the presence of that file is used by
> > > > > sysv init rc file to know if it should run the K01lxc script. This
> > > > > also makes it consistent with the other templates which use
> > > > > /var/lock/subsys/lxc-$template-name.
> > > > >
> > > > > Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> > > >
> > > > I have no objection to this, but I'd appreciate Stéphane taking
> > > > a closer look. This might lead the way to putting the upstart
> > > > scripts for ubuntu upstream as well, which would be a plus. It
> > > > also can give us more reasonable and comprehensive testcases if
> > > > we can know that common distros will have a certain amount of
> > > > setup.
> > > >
> > > > Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> > >
> > > I don't think the current proposal is appropriate.
> > >
> > > At least in Ubuntu and Debian, we typically want more than one init
> > > script to be installed. The way things work in Debian based distros is
> > > that init scripts for all supported init daemons are installed and only
> > > the relevant ones are used at boot time and by the user (with the
> > > "service" command).
> > >
> > > As a result, I'd expect an LXC package build on Debian or Ubuntu to
> > > include the upstart jobs, sysvinit script and systemd unit in their
> > > usual locations.
> >
> > Drat, I just pushed the commit.
> >
> > So having
> >
> > case $with_distro in
> > ubuntu)
> > init_script=upstart,systemd,sysv
> > ;;
> >
> > and the rest geared to support that, could work here?
>
> And the same for debian) but yes, that'd be fine I think.
>
> I'm also wondering whether non-Debian distros actually have a problem
> should they all be installed at once, if not, then maybe we can do
> without the whole --init-script thing and always have them all
> installed?
Of course one problem is that the init script contents for the same
init system for different distros may have to be different. Someone
may finagle fedora into running upstart, but ubuntu's lxc-net.conf
probably wouldn't work on fedora. (Then again, as I look at it,
it actually just might...)
More information about the lxc-devel
mailing list