]> code.ossystems Code Review - openembedded-core.git/blob
e96d4d78036cb9da3cf269de44a391d065c9e902
[openembedded-core.git] /
1 This is a direct backport from systemd-233's stream to fix lxc/docker.
2
3 % lxc-start -n container -F
4 lxc-start: cgfsng.c: parse_hierarchies: 825 Failed to find current cgroup for controller 'name=systemd'
5 lxc-start: cgfsng.c: all_controllers_found: 431 no systemd controller mountpoint found
6 lxc-start: start.c: lxc_spawn: 1082 failed initializing cgroup support
7 lxc-start: start.c: __lxc_start: 1332 failed to spawn 'container'
8 lxc-start: lxc_start.c: main: 344 The container failed to start.
9 lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
10
11 ## begin backport ##
12
13 From 843d5baf6aad6c53fc00ea8d95d83209a4f92de1 Mon Sep 17 00:00:00 2001
14 From: Martin Pitt <martin.pitt@ubuntu.com>
15 Date: Thu, 10 Nov 2016 05:33:13 +0100
16 Subject: [PATCH] core: don't use the unified hierarchy for the systemd cgroup
17  yet (#4628)
18
19 Too many things don't get along with the unified hierarchy yet:
20
21  * https://github.com/opencontainers/runc/issues/1175
22  * https://github.com/docker/docker/issues/28109
23  * https://github.com/lxc/lxc/issues/1280
24
25 So revert the default to the legacy hierarchy for now. Developers of the above
26 software can opt into the unified hierarchy with
27 "systemd.legacy_systemd_cgroup_controller=0".
28
29 Upstream-Status: Backport
30 ---
31  src/basic/cgroup-util.c | 4 ++--
32  1 file changed, 2 insertions(+), 2 deletions(-)
33
34 diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
35 index 5e73753..dc13025 100644
36 --- a/src/basic/cgroup-util.c
37 +++ b/src/basic/cgroup-util.c
38 @@ -2423,10 +2423,10 @@ bool cg_is_unified_systemd_controller_wanted(void) {
39  
40                  r = get_proc_cmdline_key("systemd.legacy_systemd_cgroup_controller=", &value);
41                  if (r < 0)
42 -                        return true;
43 +                        return false;
44  
45                  if (r == 0)
46 -                        wanted = true;
47 +                        wanted = false;
48                  else
49                          wanted = parse_boolean(value) <= 0;
50          }
51 -- 
52 2.10.1
53