[lxc-devel] [PATCH] have systemd service call lxc-autostart via script
Michael H. Warfield
mhw at WittsEnd.com
Thu May 1 22:10:27 UTC 2014
On Thu, 2014-05-01 at 17:59 -0400, Stéphane Graber wrote:
> On Thu, May 01, 2014 at 09:57:04PM +0000, Serge Hallyn wrote:
> > Quoting Stéphane Graber (stgraber at ubuntu.com):
> > > On Thu, May 01, 2014 at 05:14:12PM -0400, Michael H. Warfield wrote:
> > > > Related to this... Dwight and I have been bouncing a couple of things
> > > > back and forth and I noticed that lxc-autostart is being called from the
> > > > sysvinit scripts without the -a parameter. That means that any
> > > > container in a non-null group will not be autostart on boot. I feel
> > > > that's the wrong behavior. If autoboot = 1 then it should be autobooted
> > > > on boot. What you do after boot is up to you but I would expect it to
> > > > be "autoboot = 1" => "autobooted on bootup", not "autoboot = 1" =>
> > > > "autobooted on bootup if it's not in a group".
> > >
> > > I can see why you'd auto-start both the null group and say a "boot"
> > > group, but I don't think we should auto-start them all.
> > >
> > > A reason is that I use those groups as a way to easily start a group of
> > > interdependent containers, when I need those, I do "lxc-autostart -g
> > > blah" and all containers that have lxc.group = blah and lxc.start.auto =
> > > 1 will start properly sorted, with the right delays, ...). I however
> > > don't necessarily want those to start at boot.
> >
> > And... do you have containers in lxc.cgroup = blah which you do not
> > want to have started when you do lxc-autostart -g blah?
> At the moment, no because no tool except lxc-autostart currently read
> lxc.group, however the fact we put this as lxc.group instead of
> lxc.start.group in the original spec suggests that we wanted to
> eventually use that for group operations outside of the autostart case.
Yeah, I agree with that. There are more possibilities here with that
group parameter, we just haven't explored them yet. Maybe adding a -g
option to lxc-ls and only get those members? It's got possibilities for
both our applications and higher level scripts.
Regards,
Mike
--
Michael H. Warfield (AI4NB) | (770) 978-7061 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140501/d57b9e40/attachment-0001.sig>
More information about the lxc-devel
mailing list