[lxc-devel] Latest test results - Was: cgroups: support cgroups mounted in multiple places (v3)
Hey all... So my testing has continued and I've now regression tested the v3 patch and extended my testing. Looks like, over all, everything came together nicely. I'd ack that... Since Serge integrated my minor little patch into his patch, I don't think this needs a formal ack from me but it definitely gets a big thumbs up here. Now, that being said... My original testbeds were 2 out-of-date F12 i686 systems which needed updating and had single cgroup mount points and 1 F15 x86_64 system with systemd mounted cgroup on multiple mount points. Since then, I've updated the F12 systems to F14 (with a test stop at F13 along the way). Test results with the v3 patch... F15 systemd: Passed. F12 single mount: Passed. F13 single mount: Passed. F14 single mount: Passed. F14 libcgroup:Failed. I had the default /etc/cgconfig.conf file and here are the results: [root@berserker-base ~]# cat /etc/cgconfig.conf # # Copyright IBM Corporation. 2007 # # Authors: Balbir Singh # This program is free software; you can redistribute it and/or modify it # under the terms of version 2.1 of the GNU Lesser General Public License # as published by the Free Software Foundation. # # This program is distributed in the hope that it would be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # See man cgconfig.conf for further details. # # By default, mount all separately controllers # to /cgroup/ mount { cpuset = /cgroup/cpuset; cpu = /cgroup/cpu; cpuacct = /cgroup/cpuacct; memory = /cgroup/memory; devices = /cgroup/devices; freezer = /cgroup/freezer; net_cls = /cgroup/net_cls; ns = /cgroup/ns; blkio = /cgroup/blkio; } [root@berserker-base ~]# uname -a Linux berserker-base.wittsend.com 2.6.35.13-92.fc14.i686 #1 SMP Sat May 21 17:39:42 UTC 2011 i686 i686 i386 GNU/Linux [root@berserker-base ~]# mount -t cgroup cgroup on /cgroup/cpuset type cgroup (rw,relatime,cpuset) cgroup on /cgroup/cpu type cgroup (rw,relatime,cpu) cgroup on /cgroup/cpuacct type cgroup (rw,relatime,cpuacct) cgroup on /cgroup/memory type cgroup (rw,relatime,memory) cgroup on /cgroup/devices type cgroup (rw,relatime,devices) cgroup on /cgroup/freezer type cgroup (rw,relatime,freezer) cgroup on /cgroup/net_cls type cgroup (rw,relatime,net_cls) cgroup on /cgroup/ns type cgroup (rw,relatime,ns) cgroup on /cgroup/blkio type cgroup (rw,relatime,blkio) [root@berserker-base ~]# lxc-start -n Ashaman lxc-start: no ns_cgroup option specified lxc-start: failed to spawn 'Ashaman' lxc-start: No such file or directory - failed to remove cgroup '/cgroup/cpuset/Ashaman' If I add a mount point to mount the whole cgroup thing on /sys/fs/cgroup (this kernel supports it) and reboot then it all works. This is that mount point: [root@berserker-base ~]# mount -t cgroup cgroup on /sys/fs/cgroup type cgroup (rw,relatime,blkio,net_cls,freezer,devices,memory,cpuacct,cpu,ns,cpuset) IAC... The v3 patch does no harm to existing, working, cases and certainly covers the systemd case with F15 and that multipoint mount on /sys/fs/cgroup. The lxc stuff is broken on F15 without it. That's an important step forward and needs to be pushed. Not sure what the deal is here above with the libcgroup "cgconfig" service enabled on F14 (maybe I'm doing something wrong) but that should not be a show stopper as a mount point in fstab deals with that situation nicely. I'd like to see this applied ASAP and a turn cranked on the revision handle as this is needed for F15 and beyond. Regards, Mike On Thu, 2011-06-30 at 21:02 -0500, Serge E. Hallyn wrote: > (sorry for the extra traffic.) > > With this patch, lxc works for me both with all cgroups mounted with > ns cgroup on /cgroup, and with libcgroup mounting all cgroups > separately. > > To do this, instead of looking for one cgroup called 'lxc' or > otherwise taking the first cgroup we find, we actually create a > container in every mounted cgroup fs. Right now it's done under the > root of each fs. We may want to put that under lxc, or, better yet, > make that configurable. > > Changelog: > Michael H. Warfield: Handle the case where subsystem doesn't have '.'. > Daniel Lezcano: clean up incorrect reentrant use of mntent helpers > v3: use the rest of Daniel's cleanups > > TODO: add a configurable directory name, 'lxc' by default, under which > all lxc cgroups are created (i.e. /sys/fs/cgroup/lxc) > > Signed-off-by: Serge Hallyn > --- > src/lxc/cgroup.c | 234 > ++--- > src/lxc/cgroup.h |2 +- > src/lxc/freezer.c |2 +- > src/lxc/lxc.h |8 +- > src/lxc/state.c |2 +- > 5 files changed, 139 insertions(+), 109 deletions(-) > > diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c > index a068a01..950869a 100644 > --- a/src/lxc/cgroup.c > +++ b/src/lxc/cgroup.c > @@ -52,90 +52,
Re: [lxc-devel] [Lxc-users] Latest test results - Was: cgroups: support cgroups mounted in multiple places (v3)
Quoting Michael H. Warfield (m...@wittsend.com): ... > F15 systemd: Passed. > F12 single mount: Passed. > F13 single mount: Passed. > F14 single mount: Passed. > F14 libcgroup:Failed. > > I had the default /etc/cgconfig.conf file and here are the results: > > [root@berserker-base ~]# cat /etc/cgconfig.conf > # > # Copyright IBM Corporation. 2007 > # > # Authors: Balbir Singh > # This program is free software; you can redistribute it and/or modify it > # under the terms of version 2.1 of the GNU Lesser General Public License > # as published by the Free Software Foundation. > # > # This program is distributed in the hope that it would be useful, but > # WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > # > # See man cgconfig.conf for further details. > # > # By default, mount all separately controllers > # to /cgroup/ > > mount { > cpuset = /cgroup/cpuset; > cpu = /cgroup/cpu; > cpuacct = /cgroup/cpuacct; > memory = /cgroup/memory; > devices = /cgroup/devices; > freezer = /cgroup/freezer; > net_cls = /cgroup/net_cls; > ns = /cgroup/ns; > blkio = /cgroup/blkio; > } > > [root@berserker-base ~]# uname -a > Linux berserker-base.wittsend.com 2.6.35.13-92.fc14.i686 #1 SMP Sat May 21 > 17:39:42 UTC 2011 i686 i686 i386 GNU/Linux > [root@berserker-base ~]# mount -t cgroup > cgroup on /cgroup/cpuset type cgroup (rw,relatime,cpuset) > cgroup on /cgroup/cpu type cgroup (rw,relatime,cpu) > cgroup on /cgroup/cpuacct type cgroup (rw,relatime,cpuacct) > cgroup on /cgroup/memory type cgroup (rw,relatime,memory) > cgroup on /cgroup/devices type cgroup (rw,relatime,devices) > cgroup on /cgroup/freezer type cgroup (rw,relatime,freezer) > cgroup on /cgroup/net_cls type cgroup (rw,relatime,net_cls) > cgroup on /cgroup/ns type cgroup (rw,relatime,ns) > cgroup on /cgroup/blkio type cgroup (rw,relatime,blkio) > [root@berserker-base ~]# lxc-start -n Ashaman > lxc-start: no ns_cgroup option specified Just a thought - does F14's kernel not support clone_children? See output of ls /cgroup/cpuset and see if /cgroup/cpuset/cgroup.clone_children exists. If not, then yeah there's nothing that can be done without the ns cgroup. Thanks for testing! -serge -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 ___ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel
Re: [lxc-devel] [Lxc-users] Latest test results - Was: cgroups: support cgroups mounted in multiple places (v3)
On Sat, 2011-07-02 at 15:13 -0500, Serge Hallyn wrote: > Quoting Michael H. Warfield (m...@wittsend.com): > ... > > F15 systemd: Passed. > > F12 single mount: Passed. > > F13 single mount: Passed. > > F14 single mount: Passed. > > F14 libcgroup:Failed. > > > > I had the default /etc/cgconfig.conf file and here are the results: > > > > [root@berserker-base ~]# cat /etc/cgconfig.conf > > # > > # Copyright IBM Corporation. 2007 > > # > > # Authors: Balbir Singh > > # This program is free software; you can redistribute it and/or modify it > > # under the terms of version 2.1 of the GNU Lesser General Public License > > # as published by the Free Software Foundation. > > # > > # This program is distributed in the hope that it would be useful, but > > # WITHOUT ANY WARRANTY; without even the implied warranty of > > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > # > > # See man cgconfig.conf for further details. > > # > > # By default, mount all separately controllers > > # to /cgroup/ > > > > mount { > > cpuset = /cgroup/cpuset; > > cpu = /cgroup/cpu; > > cpuacct = /cgroup/cpuacct; > > memory = /cgroup/memory; > > devices = /cgroup/devices; > > freezer = /cgroup/freezer; > > net_cls = /cgroup/net_cls; > > ns = /cgroup/ns; > > blkio = /cgroup/blkio; > > } > > > > [root@berserker-base ~]# uname -a > > Linux berserker-base.wittsend.com 2.6.35.13-92.fc14.i686 #1 SMP Sat May 21 > > 17:39:42 UTC 2011 i686 i686 i386 GNU/Linux > > [root@berserker-base ~]# mount -t cgroup > > cgroup on /cgroup/cpuset type cgroup (rw,relatime,cpuset) > > cgroup on /cgroup/cpu type cgroup (rw,relatime,cpu) > > cgroup on /cgroup/cpuacct type cgroup (rw,relatime,cpuacct) > > cgroup on /cgroup/memory type cgroup (rw,relatime,memory) > > cgroup on /cgroup/devices type cgroup (rw,relatime,devices) > > cgroup on /cgroup/freezer type cgroup (rw,relatime,freezer) > > cgroup on /cgroup/net_cls type cgroup (rw,relatime,net_cls) > > cgroup on /cgroup/ns type cgroup (rw,relatime,ns) > > cgroup on /cgroup/blkio type cgroup (rw,relatime,blkio) > > [root@berserker-base ~]# lxc-start -n Ashaman > > lxc-start: no ns_cgroup option specified > Just a thought - does F14's kernel not support clone_children? See output > of ls /cgroup/cpuset and see if /cgroup/cpuset/cgroup.clone_children exists. > If not, then yeah there's nothing that can be done without the ns cgroup. 1) The ns cgroup does exist and is mounted. 2) It works with the single mount point and clone children is not present. To answer your question... [mhw@berserker-base ~]$ ls /cgroup/cpuset/ cgroup.event_controlcpuset.memory_spread_page cgroup.procscpuset.memory_spread_slab cpuset.cpu_exclusivecpuset.mems cpuset.cpus cpuset.sched_load_balance cpuset.mem_exclusivecpuset.sched_relax_domain_level cpuset.mem_hardwall libvirt cpuset.memory_migrate notify_on_release cpuset.memory_pressure release_agent cpuset.memory_pressure_enabled tasks I guess not... > Thanks for testing! If that's all I can do, I'll do the best I can. I'm currently up to my eyeballs in another OpenSource project, some XAUTH coding in Openswan. I need about 6 clones of me, I swear. :-P > -serge Regards, Mike -- Michael H. Warfield (AI4NB) | (770) 985-6132 | m...@wittsend.com /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0x674627FF| possible worlds. A pessimist is sure of it! signature.asc Description: This is a digitally signed message part -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2___ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel
Re: [lxc-devel] [Lxc-users] Latest test results - Was: cgroups: support cgroups mounted in multiple places (v3)
On Sat, 2011-07-02 at 23:04 +, Serge E. Hallyn wrote: > Quoting Michael H. Warfield (m...@wittsend.com): > > On Sat, 2011-07-02 at 15:13 -0500, Serge Hallyn wrote: > > > Quoting Michael H. Warfield (m...@wittsend.com): > > > ... > > > > F15 systemd: Passed. > > > > F12 single mount: Passed. > > > > F13 single mount: Passed. > > > > F14 single mount: Passed. > > > > F14 libcgroup:Failed. > > > > > > > > I had the default /etc/cgconfig.conf file and here are the results: > > > > > > > > [root@berserker-base ~]# cat /etc/cgconfig.conf > > > > # > > > > # Copyright IBM Corporation. 2007 > > > > # > > > > # Authors: Balbir Singh > > > > # This program is free software; you can redistribute it and/or modify > > > > it > > > > # under the terms of version 2.1 of the GNU Lesser General Public > > > > License > > > > # as published by the Free Software Foundation. > > > > # > > > > # This program is distributed in the hope that it would be useful, but > > > > # WITHOUT ANY WARRANTY; without even the implied warranty of > > > > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > > # > > > > # See man cgconfig.conf for further details. > > > > # > > > > # By default, mount all separately controllers > > > > # to /cgroup/ > > > > > > > > mount { > > > > cpuset = /cgroup/cpuset; > > > > cpu = /cgroup/cpu; > > > > cpuacct = /cgroup/cpuacct; > > > > memory = /cgroup/memory; > > > > devices = /cgroup/devices; > > > > freezer = /cgroup/freezer; > > > > net_cls = /cgroup/net_cls; > > > > ns = /cgroup/ns; > > > > blkio = /cgroup/blkio; > > > > } > > > > > > > > [root@berserker-base ~]# uname -a > > > > Linux berserker-base.wittsend.com 2.6.35.13-92.fc14.i686 #1 SMP Sat May > > > > 21 17:39:42 UTC 2011 i686 i686 i386 GNU/Linux > > > > [root@berserker-base ~]# mount -t cgroup > > > > cgroup on /cgroup/cpuset type cgroup (rw,relatime,cpuset) > > > > cgroup on /cgroup/cpu type cgroup (rw,relatime,cpu) > > > > cgroup on /cgroup/cpuacct type cgroup (rw,relatime,cpuacct) > > > > cgroup on /cgroup/memory type cgroup (rw,relatime,memory) > > > > cgroup on /cgroup/devices type cgroup (rw,relatime,devices) > > > > cgroup on /cgroup/freezer type cgroup (rw,relatime,freezer) > > > > cgroup on /cgroup/net_cls type cgroup (rw,relatime,net_cls) > > > > cgroup on /cgroup/ns type cgroup (rw,relatime,ns) > > > > cgroup on /cgroup/blkio type cgroup (rw,relatime,blkio) > > > > [root@berserker-base ~]# lxc-start -n Ashaman > > > > lxc-start: no ns_cgroup option specified > > > > > Just a thought - does F14's kernel not support clone_children? See output > > > of ls /cgroup/cpuset and see if /cgroup/cpuset/cgroup.clone_children > > > exists. > > > If not, then yeah there's nothing that can be done without the ns cgroup. > > > > 1) The ns cgroup does exist and is mounted. > Yes but it needs to be composed with the others :) > > 2) It works with the single mount point and clone children is not > > present. > Ok, cool. So the results make perfect sense. Sounds like we are in violent agreement then. Acked-by: Michael H. Warfield > thanks, > -serge Regards, Mike -- Michael H. Warfield (AI4NB) | (770) 985-6132 | m...@wittsend.com /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0x674627FF| possible worlds. A pessimist is sure of it! signature.asc Description: This is a digitally signed message part -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2___ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel