[lxc-devel] Container autostart proposal V2
Serge Hallyn
serge.hallyn at ubuntu.com
Wed May 29 02:50:32 UTC 2013
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
doing now. Reason being the user can use whatever regexp tool he
understands to select the list of containers.
OTOH, not sure how many people are using lxc-monitor this way now. If
there are any, we don't want to break them.
-serge
More information about the lxc-devel
mailing list