Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-22 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > >Ok, how about we make the system-cgroup-dir configurable in > >/etc/lxc/lxc.conf? So if you have > > > > lxc.system-cgroup-dir = /machine > > > >then root-created containers will end up in /machine (or, if you're > >already neste

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-22 Thread Christian Seiler
Hi Serge, > Ok, how about we make the system-cgroup-dir configurable in > /etc/lxc/lxc.conf? So if you have > > lxc.system-cgroup-dir = /machine > > then root-created containers will end up in /machine (or, if you're > already nested under /lxc/m1, then /lxc/m1/machine). If that is > unset

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-21 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > >> 1. What about the naming convention? Stick with /lxc/$name or > >>go with > >>/machine/$name.lxc (see prev. email)? Or I could make that > >>configurable? > > > >$name.lxc or lxc.$name seems good for all cases. It'll benefi

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-21 Thread Christian Seiler
Hi Serge, >> 1. What about the naming convention? Stick with /lxc/$name or go >> with >> /machine/$name.lxc (see prev. email)? Or I could make that >> configurable? > > $name.lxc or lxc.$name seems good for all cases. It'll benefit > unprivileged users also. By "/machine/$name.lxc" did

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-21 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > >If we're going to do this, we should do it soon. Would you have time > >in the next few days? > > Define 'few'. ;) I should be able to do that until Monday (barring any > emergencies). > > >(BTW, if we're going to throw words like

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-21 Thread Christian Seiler
Hi Serge, > If we're going to do this, we should do it soon. Would you have time > in the next few days? Define 'few'. ;) I should be able to do that until Monday (barring any emergencies). > (BTW, if we're going to throw words like b0rked around, I'd prefer to > reserve that for the refusal to

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-21 Thread Serge Hallyn
Quoting Serge Hallyn (serge.hal...@ubuntu.com): > Quoting Christian Seiler (christ...@iwakd.de): > ... > > If I think about that further, I think the initial bind-mount logic is > > already borked. Because if nested LXC breaks in such a way, so will > > many software that uses cgroups and relies on

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-21 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): ... > If I think about that further, I think the initial bind-mount logic is > already borked. Because if nested LXC breaks in such a way, so will > many software that uses cgroups and relies on standard behaviour. > > I think the correct way for the

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-21 Thread Christian Seiler
Hi Serge, >> Having /lxc makes it much easier to sett what's part of a container >> vs >> what's part of a user session or whatever else uses cgroups these >> days. > > Note that nothing stops you from simply entering cgroup /lxc by hand > before executing a container. Right now the code simply

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-20 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > On Mon, Aug 19, 2013 at 04:57:10PM -0500, Serge Hallyn wrote: > > Quoting Christian Seiler (christ...@iwakd.de): > > > Hi Serge, > > > > > > > Thanks, Christian - I've pushed a new patch to github on top of yours. > > > > Regular start/stop/lxc-cgro

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Michael H. Warfield
On Mon, 2013-08-19 at 16:57 -0500, Serge Hallyn wrote: > Quoting Christian Seiler (christ...@iwakd.de): > > Hi Serge, > > > > > Thanks, Christian - I've pushed a new patch to github on top of yours. > > > Regular start/stop/lxc-cgroup stuff is working for me both with all > > > cgroups composed a

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Christian Seiler
Hi Serge, >> I do have a very stupid question, however: LXC 0.9 used to set the >> cgroup to /lxc/$name. Now it's just /$name. Is that intentional? > > Hm, it was somewhat unconscious but I didn't really mean to do that. > Some cgroup subsystems do incur a performance penalty for every > extra di

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Stéphane Graber
On Mon, Aug 19, 2013 at 04:57:10PM -0500, Serge Hallyn wrote: > Quoting Christian Seiler (christ...@iwakd.de): > > Hi Serge, > > > > > Thanks, Christian - I've pushed a new patch to github on top of yours. > > > Regular start/stop/lxc-cgroup stuff is working for me both with all > > > cgroups comp

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > > Thanks, Christian - I've pushed a new patch to github on top of yours. > > Regular start/stop/lxc-cgroup stuff is working for me both with all > > cgroups composed and separately mounted. > > I can confirm that it works on my setup.

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Christian Seiler
Hi Serge, > Thanks, Christian - I've pushed a new patch to github on top of yours. > Regular start/stop/lxc-cgroup stuff is working for me both with all > cgroups composed and separately mounted. I can confirm that it works on my setup. I do have a very stupid question, however: LXC 0.9 used to

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > > This needs to just be > > > > oldlen = newlen; > > Oh, yes, that's right, it's the buffer length and not the string length. > Sorry, I did that late at night and some things got mixed up in my head. > > >> @@ -1128,7 +1152,7 @

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Christian Seiler
Hi Serge, > This needs to just be > > oldlen = newlen; Oh, yes, that's right, it's the buffer length and not the string length. Sorry, I did that late at night and some things got mixed up in my head. >> @@ -1128,7 +1152,7 @@ void lxc_cgroup_destroy_desc(struct cgroup_desc >> *cgroups) >

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Serge Hallyn
Quoting Serge Hallyn (serge.hal...@ubuntu.com): > Quoting Christian Seiler (christ...@iwakd.de): > > This fixes some minor bugs in the cgroup logic that made start and > > attach fail (at least when all cgroup controllers were mounted > > together). > > > > Signed-off-by: Christian Seiler > > Tha

Re: [lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-19 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > This fixes some minor bugs in the cgroup logic that made start and > attach fail (at least when all cgroup controllers were mounted > together). > > Signed-off-by: Christian Seiler Thanks, a few comments. > --- > src/lxc/cgroup.c | 31 +++

[lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

2013-08-18 Thread Christian Seiler
This fixes some minor bugs in the cgroup logic that made start and attach fail (at least when all cgroup controllers were mounted together). Signed-off-by: Christian Seiler --- src/lxc/cgroup.c | 31 --- src/lxc/commands.c |3 ++- 2 files changed, 30 insertion