[lxc-devel] Container autostart proposal V2

Dwight Engen dwight.engen at oracle.com
Wed May 29 13:21:33 UTC 2013


On Tue, 28 May 2013 21:50:32 -0500
Serge Hallyn <serge.hallyn at ubuntu.com> wrote:

> Quoting Dwight Engen (dwight.engen at oracle.com):
> > On Tue, 28 May 2013 17:03:43 -0400
> > Stéphane Graber <stgraber at ubuntu.com> wrote:
> > 
> > > On 05/28/2013 04:53 PM, Serge Hallyn wrote:
> > > > Quoting Stéphane Graber (stgraber at ubuntu.com):
> > > >> Hey everyone,
> > > >>
> > > >> Thanks for the feedback on my previous autostart proposal.
> > > >>
> > > >> Here's a detailed bullet-point list of what should be done to
> > > >> implement autostarting containers in upstream LXC.
> > > >>
> > > >> Changes to the container config:
> > > >>  - ADD: lxc.start.auto (integer, 0 = disabled, 1 = enabled,
> > > >> default: 0)
> > > >>  - ADD: lxc.start.delay (integer, time in second, default: 0)
> > > > 
> > > > Pardon me, but I'll ask here rather than go back and re-read the
> > > > thread:
> > > > 
> > > > Is that a delay after the 'lxc-start -a' before this will be
> > > > started?
> > > 
> > > That's a delay to wait after the container as reached RUNNING
> > > state.
> > > 
> > > So lxc-start will generate a list of all containers it needs to
> > > start, sort them by lxc.start.order, then spawn the first one,
> > > check it reaches RUNNING, when it does, wait <lxc.start.delay>
> > > seconds before continuing with the next one.
> > > 
> > > >>  - ADD: lxc.start.order (integer, boot order, default: 0)
> > > >>  - ADD: lxc.group (string, multi-value, default: empty)
> > > > 
> > > > multi-value how: comma-separated, space-separated, or just
> > > > support multiple lxc.group entries?
> > > 
> > > Multiple entries, that's why I called it lxc.group and not
> > > lxc.groups.
> > > 
> > > The command line parameter (-g) is comma separate however. So
> > > commas should be documented as invalid for a group name and so is
> > > "any" which is a special group matching all containers.
> > 
> > Hmm, that just made me think of the fact that lxc-monitor takes a
> > regex, should we be consistent about how to specify multiple
> > containers/groups?
> 
> Frankly I'd prefer to have lxc-monitor take -a, -g, space-separated
> multiple names, OR take a long list (perhaps even \0-delimited like
> xargs -0) on stdin, than to compiler our own regex like lxc-monitor is

For lxc-monitor, I wish would default to all, then the results could
just be grepped.

> doing now.  Reason being the user can use whatever regexp tool he
> understands to select the list of containers.

Not sure how the user would do this, are you suggesting something like
lxc-ls |grep 'foo.*' |xargs lxc-monitor ?

> OTOH, not sure how many people are using lxc-monitor this way now.  If
> there are any, we don't want to break them.

Agree. I just think it would be nice if we can be consistent across the
commands.

> -serge





More information about the lxc-devel mailing list