[lxc-devel] [PATCH 1/1] create: add a quiet flag

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jul 12 21:18:45 UTC 2013


Quoting Dwight Engen (dwight.engen at oracle.com):
> On Fri, 12 Jul 2013 09:44:41 -0500
> Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> 
> > 
> > If set, then fds 0,1,2 will be redirected while the creation
> > template is executed.
> > 
> > Note, as Dwight has pointed out, if fd 0 is redirected, then if
> > templates ask for input there will be a problem.  We could simply
> > not redirect fd 0, or we could require that templates work without
> > interaction.  I'm assuming here that we want to do the latter, but
> > I'm open to changing that.
> > 
> > Reported-by: "S.Çağlar Onur" <caglar at 10ur.org>
> > Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
> > ---
> >  src/lua-lxc/core.c       |    2 +-
> >  src/lxc/lxc_create.c     |    5 ++++-
> >  src/lxc/lxccontainer.c   |   20 ++++++++++++++------
> >  src/lxc/lxccontainer.h   |    7 +++++--
> >  src/python-lxc/lxc.c     |    2 +-
> >  src/tests/cgpath.c       |    2 +-
> >  src/tests/clonetest.c    |    2 +-
> >  src/tests/console.c      |    2 +-
> >  src/tests/createtest.c   |    2 +-
> >  src/tests/get_item.c     |    2 +-
> >  src/tests/shutdowntest.c |    2 +-
> >  11 files changed, 31 insertions(+), 17 deletions(-)
> > 
> > diff --git a/src/lua-lxc/core.c b/src/lua-lxc/core.c
> > index 778ef99..642dbfc 100644
> > --- a/src/lua-lxc/core.c
> > +++ b/src/lua-lxc/core.c
> > @@ -111,7 +111,7 @@ static int container_create(lua_State *L)
> >  	argv[i] = strdupa(luaL_checkstring(L, i+3));
> >      argv[i] = NULL;
> >  
> > -    lua_pushboolean(L, !!c->create(c, template_name, NULL, NULL,
> > argv));
> > +    lua_pushboolean(L, !!c->create(c, template_name, NULL, NULL, 0,
> > argv)); return 1;
> 
> Hi Serge, don't we want this and the python API to pass LXC_CREATE_QUIET?

I was leaving that to the you and Stéphane :)  Please feel free to
send a patch for that.  (I've pushed it as is for now)




More information about the lxc-devel mailing list