summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2016-12-09 09:16:20 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-13 22:55:21 +0000
commit651713adb4318167c069122d9fa3b8d0d4e978b2 (patch)
tree44bd42ebb3bbec7ee056ff8422da86323bf8e12c
parent556bdb6642294f820b06415aa5243c6beef18a17 (diff)
downloadpoky-651713adb4318167c069122d9fa3b8d0d4e978b2.tar.gz
systemd: Backport cgroup fix from 233 to 232
There is a critical regression in the default behavior with systemd 232 which prevents lxc, docker, and opencontainers from working properly out of the box. The change was already committed to the systemd 233 code stream. The failure looks like what is shown below. % lxc-start -n container -F lxc-start: cgfsng.c: parse_hierarchies: 825 Failed to find current cgroup for controller 'name=systemd' lxc-start: cgfsng.c: all_controllers_found: 431 no systemd controller mountpoint found lxc-start: start.c: lxc_spawn: 1082 failed initializing cgroup support lxc-start: start.c: __lxc_start: 1332 failed to spawn 'container' lxc-start: lxc_start.c: main: 344 The container failed to start. lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options. Commit 843d5baf6aad6c53fc00ea8d95d83209a4f92de1 from the systemd git has been backported and can be dropped in a future uprev. (From OE-Core rev: d212e97aeae502cd0d11cb922f7711aee5c1ace0) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch51
-rw-r--r--meta/recipes-core/systemd/systemd_232.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch b/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch
new file mode 100644
index 0000000000..ef2d868048
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch
@@ -0,0 +1,51 @@
1This is a direct backport from systemd-233's stream to fix lxc/docker.
2
3% lxc-start -n container -F
4lxc-start: cgfsng.c: parse_hierarchies: 825 Failed to find current cgroup for controller 'name=systemd'
5lxc-start: cgfsng.c: all_controllers_found: 431 no systemd controller mountpoint found
6lxc-start: start.c: lxc_spawn: 1082 failed initializing cgroup support
7lxc-start: start.c: __lxc_start: 1332 failed to spawn 'container'
8lxc-start: lxc_start.c: main: 344 The container failed to start.
9lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
10
11## begin backport ##
12
13From 843d5baf6aad6c53fc00ea8d95d83209a4f92de1 Mon Sep 17 00:00:00 2001
14From: Martin Pitt <martin.pitt@ubuntu.com>
15Date: Thu, 10 Nov 2016 05:33:13 +0100
16Subject: [PATCH] core: don't use the unified hierarchy for the systemd cgroup
17 yet (#4628)
18
19Too 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
25So revert the default to the legacy hierarchy for now. Developers of the above
26software can opt into the unified hierarchy with
27"systemd.legacy_systemd_cgroup_controller=0".
28---
29 src/basic/cgroup-util.c | 4 ++--
30 1 file changed, 2 insertions(+), 2 deletions(-)
31
32diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
33index 5e73753..dc13025 100644
34--- a/src/basic/cgroup-util.c
35+++ b/src/basic/cgroup-util.c
36@@ -2423,10 +2423,10 @@ bool cg_is_unified_systemd_controller_wanted(void) {
37
38 r = get_proc_cmdline_key("systemd.legacy_systemd_cgroup_controller=", &value);
39 if (r < 0)
40- return true;
41+ return false;
42
43 if (r == 0)
44- wanted = true;
45+ wanted = false;
46 else
47 wanted = parse_boolean(value) <= 0;
48 }
49--
502.10.1
51
diff --git a/meta/recipes-core/systemd/systemd_232.bb b/meta/recipes-core/systemd/systemd_232.bb
index baee02ed73..a978becdd8 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -32,6 +32,7 @@ SRC_URI += " \
32 file://0017-remove-duplicate-include-uchar.h.patch \ 32 file://0017-remove-duplicate-include-uchar.h.patch \
33 file://0018-check-for-uchar.h-in-configure.patch \ 33 file://0018-check-for-uchar.h-in-configure.patch \
34 file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \ 34 file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
35 file://0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch \
35" 36"
36SRC_URI_append_libc-uclibc = "\ 37SRC_URI_append_libc-uclibc = "\
37 file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \ 38 file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \