[lxc-devel] [PATCH 1/1] cgroup: recursively delete cgroups when asked

Serge Hallyn serge.hallyn at ubuntu.com
Mon Jan 13 21:38:21 UTC 2014


Quoting Michael H. Warfield (mhw at WittsEnd.com):
> On Mon, 2014-01-13 at 12:38 -0500, Dwight Engen wrote: 
> > On Mon, 13 Jan 2014 12:19:25 -0500
> > S.Çağlar Onur <caglar at 10ur.org> wrote:
> 
> > > OK I think we need following
> > > 
> > > diff --git a/src/lxc/confile.c b/src/lxc/confile.c
> > > index 50d09da..4208b0e 100644
> > > --- a/src/lxc/confile.c
> > > +++ b/src/lxc/confile.c
> > > @@ -2209,7 +2209,7 @@ void write_config(FILE *fout, struct lxc_conf
> > > *c) fprintf(fout, "lxc.seccomp = %s\n", c->seccomp);
> > >         if (c->kmsg == 0)
> > >                 fprintf(fout, "lxc.kmsg = 0\n");
> > > -       if (c->autodev)
> > > +       if (c->autodev == 1)
> > >                 fprintf(fout, "lxc.autodev = 1\n");
> > >         if (c->loglevel != LXC_LOG_PRIORITY_NOTSET)
> > >                 fprintf(fout, "lxc.loglevel = %s\n",
> > > lxc_log_priority_to_string(c->loglevel));
> 
> > Hi Çağlar, sorry for messing that one up. It looks like autodev is
> > initialized to -1 which must be why the if check is catching. Other
> > places in conf.c are comparing for > 0 so maybe we should use that
> > instead of == 1?
> 
> That's some of my stuff from months ago.  That's to enable autodetection
> of certain conditions where we need to set the autodev default to be
> enabled.  Serge, Stéphane, and I had been discussing how to reasonable
> detect when we should enable autodev by default and that settled in on
> whether systemd was in the readlink dereference for init.  But we (I)
> also wanted an explicit enable / disable which resulted in the autodev
> option being a trinary of -1/0/1.

Michael,

Would you mind finding a good place to document that?  Maybe at the
top of the config_autodev() in src/lxc/confile.c?


More information about the lxc-devel mailing list