[lxc-devel] [RFC] lxc-start: daemonize by default

Serge Hallyn serge.hallyn at ubuntu.com
Wed Apr 30 15:50:54 UTC 2014


Note that this would not work generically.  Each distro - and presumably until we
standardize things, each user - will need to separately (1) install the init job
to write to the pipe, (2)  set up the container config to create and bind in
the fifo, and (3) write the program to wait on the fifo write (preferably with a
timeout).  All I'm suggesting here is a generic way for lxc-start to be told
how to wait for that thing to happen.  As I type this, it seems like it might
be better to keep that functionality strictly in lxc-wait, and make the user
use two calls, rather than complicate lxc-start and end up with a mess like we
had in lxc-stop recently.

Quoting Guido Jäkel (G.Jaekel at DNB.DE):
> Dear Serge,
> 
> Nice - a long time ago we discussed such a feature. The wrapper for my current LXC 0.8.4 production environment scan the log for a special console message to treat a container as "up and running".
> 
> greetings
> 
> Guido
> 
> On 2014-04-30 15:56, Serge Hallyn wrote:
> > [...] and another to only return when SOME_PROGRAM
> > returns - where SOME_PROGRAM might be waiting for an init
> > script in the container to write 'ready' to a socket bound from
> > the host - that way we know that the container has entered
> > runlevel 2 or whatever.
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list