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

Serge Hallyn serge.hallyn at ubuntu.com
Fri May 2 13:50:14 UTC 2014


Quoting Christian Seiler (christian at iwakd.de):
> Hi,
> 
> >When -d is the default, you not only see the problems immediately.
> >It is much worse: stderr of lxc-start is redirected to /dev/null,
> >so you don't even see error messages from lxc-start itself!  Such
> >as, cgroupfs is not mounted, or what not.
> 
> I don't think you are making a good argument for not making -d
> the default, I think you are making a far better argument for:
> 
>  - change lxc-start to print useful errors even with -d
>    (especially during initialization)
> 
>  - perhaps change lxc-start that if -C is specified that stdin/
>    stdout/stderr are then connected to the PTS that is mounted as
>    /dev/console within the container, so that the console logfile
>    automatically captures the default output
>    (instead of using /dev/null, as is done currently)

Hm.  Choosing defaults is a difficult game to play right.  You never
know how many people are not paying attention to the discussion but
would be horribly turned off by a change in defaults.

Consider there are two sets of users here - there are those who are
new to lxc, or create a lot of new container rootfs's by hand.  They
will want -F.  Now I really don't think -F is such a burden, but I've
probably been turned off of new software by less.

Those who want -d by default are, I suspect, mainly the ones who
have really good templates at the ready.  Back around ubuntu 11.10
times I would have screamed at -d being the default.  Now that there
are good templates and pre-built downloadable images for the things
I usually use, I often want -d to be the default.

Michael, can you tell us a bit more about how you generally are using
lxc, and why you need to see the console?  Are you using lxc to debug
init?  Creating your own rootfs'?  Just finding lxc to not be reliable
enough?

-serge


More information about the lxc-devel mailing list