summaryrefslogtreecommitdiffstats
path: root/import-layers
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2016-12-09 09:16:20 -0800
committerPatrick Williams <patrick@stwcx.xyz>2017-04-21 09:51:24 +0000
commit22e4c658983be1390a2cdbb5be3c706368e7a957 (patch)
treec6476a76f093a43283682c1531b768850aa04710 /import-layers
parent5ade84093f48fd2e9ed0c9a7a8c4fa32e6b77bd0 (diff)
downloadtalos-openbmc-22e4c658983be1390a2cdbb5be3c706368e7a957.tar.gz
talos-openbmc-22e4c658983be1390a2cdbb5be3c706368e7a957.zip
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) Change-Id: If6c390e63fce765a7fd456d40dfcd869e48f5f7e 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> Signed-off-by: Saqib Khan <khansa@us.ibm.com>
Diffstat (limited to 'import-layers')
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch
new file mode 100644
index 000000000..ef2d86804
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch
@@ -0,0 +1,51 @@
+This is a direct backport from systemd-233's stream to fix lxc/docker.
+
+% 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.
+
+## begin backport ##
+
+From 843d5baf6aad6c53fc00ea8d95d83209a4f92de1 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu, 10 Nov 2016 05:33:13 +0100
+Subject: [PATCH] core: don't use the unified hierarchy for the systemd cgroup
+ yet (#4628)
+
+Too many things don't get along with the unified hierarchy yet:
+
+ * https://github.com/opencontainers/runc/issues/1175
+ * https://github.com/docker/docker/issues/28109
+ * https://github.com/lxc/lxc/issues/1280
+
+So revert the default to the legacy hierarchy for now. Developers of the above
+software can opt into the unified hierarchy with
+"systemd.legacy_systemd_cgroup_controller=0".
+---
+ src/basic/cgroup-util.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
+index 5e73753..dc13025 100644
+--- a/src/basic/cgroup-util.c
++++ b/src/basic/cgroup-util.c
+@@ -2423,10 +2423,10 @@ bool cg_is_unified_systemd_controller_wanted(void) {
+
+ r = get_proc_cmdline_key("systemd.legacy_systemd_cgroup_controller=", &value);
+ if (r < 0)
+- return true;
++ return false;
+
+ if (r == 0)
+- wanted = true;
++ wanted = false;
+ else
+ wanted = parse_boolean(value) <= 0;
+ }
+--
+2.10.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb
index 204c5111f..54c8a5bbf 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_232.bb
@@ -32,6 +32,7 @@ SRC_URI += " \
file://0017-remove-duplicate-include-uchar.h.patch \
file://0018-check-for-uchar.h-in-configure.patch \
file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
+ file://0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch \
"
SRC_URI_append_libc-uclibc = "\
file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
OpenPOWER on IntegriCloud