[lxc-devel] [PATCH] lxc-attach: Clear environment and set container=lxc

Serge Hallyn serge.hallyn at ubuntu.com
Thu Mar 28 16:43:40 UTC 2013


Quoting Stéphane Graber (stgraber at ubuntu.com):
> On 03/28/2013 11:52 AM, Serge Hallyn wrote:
> > Quoting Christian Seiler (christian at iwakd.de):
> >> Hi there,
> >>
> >>>> In light of the fact that 0.9 is going to be here soon, any
> >>>> comments on
> >>>> this?
> >>>
> >>> Sorry, I was waiting to see if anyone else would comment.  Note this
> >>> kind of change is not going to be non-trivial, so it's definately
> >>> (imo)
> >>> 1.0 material
> >>
> >> My problem is that the current patch in staging that clears the
> >> environment breaks a lot of things that I'm currently doing with lxc
> >> and I'd really hate to need to manually patch 0.9, especially since we
> >> now have situation where everything I want to do with LXC can be done
> >> with vanilla kernel 3.8 and vanilla LXC 0.9~rc1.
> >>
> >> Since lxc-attach has been there since quite a while and people may have
> >> been using it (especially since kernel 3.8), could we perhaps revert
> >> the patch that clears the environment in attach for 0.9 and implement
> >> it properly in 1.0? (And perhaps backport that part to 0.9.1) I know
> >> that dragging in the complete environment has its own problems, but at
> >> least for me it currently breaks more than it fixes.
> >>
> >> Thoughts?
> > 
> > It seems reasonable to me.  Stéphane, ok with you?
> 
> Can we easily move the clearenv() to an lxc-attach argument?
> If so, I'd prefer we make it an option rather than remove it entirely.

So for now we would introduce -c for clearenv, which we could always
continue to support after introducing Christian's proposed semantics.
That sounds good.  Christian, can you send a patch for that?

So the default right now would be to not clear the environment unless
-c is given.  Later, the default would be to tweakthe env as you
listed before, while -c always clears it completely.

-serge




More information about the lxc-devel mailing list