From: Serge Hallyn Date: Wed, 16 Mar 2016 06:02:10 +0000 (-0700) Subject: cgroups: try to load cgmanager first X-Git-Tag: lxc-2.0.0.rc11~4^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ec45e7faa3648a36cb01aed9e230bd49b450fe0;p=thirdparty%2Flxc.git cgroups: try to load cgmanager first If cgmanager is running, use it. This allows the admin to simply stop cgmanager if they don't want to use it. The other way there is no way to choose to use cgmanager. Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index 684a3c3df..1a92ef42a 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -46,11 +46,11 @@ void cgroup_ops_init(void) } DEBUG("cgroup_init"); - ops = cgfsng_ops_init(); #if HAVE_CGMANAGER - if (!ops) - ops = cgm_ops_init(); + ops = cgm_ops_init(); #endif + if (!ops) + ops = cgfsng_ops_init(); if (!ops) ops = cgfs_ops_init(); if (ops) diff --git a/src/tests/lxc-test-automount b/src/tests/lxc-test-automount index 6a06d7acd..450537537 100644 --- a/src/tests/lxc-test-automount +++ b/src/tests/lxc-test-automount @@ -24,6 +24,9 @@ [ -f /proc/self/ns/cgroup ] && exit 0 +# cgmanager doesn't do the same cgroup filesystem mounting +cgm ping && exit 0 + set -ex cleanup() {