From b67eddece72719def8d88f525a38a49ff981b0d4 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Thu, 8 Nov 2018 14:06:01 -0500 Subject: Revert "Don't return the error if unable to create the network namespace" This reverts commit 87497e8ebce78079ea5423ecb6080e82cfa36106. systemd-hostnamed no longer hangs without network namespace support: PrivateNetwork=yes is configured, but the kernel does not support network namespaces, ignoring. (From meta-phosphor rev: 3b6dd35154ba5e105ad1d4b65746711654ed34b0) Change-Id: I41b5e1ae952b8bc3bc07819d7ab7e0fffd3629c7 Signed-off-by: Brad Bishop --- ...ror-if-unable-to-create-network-namespace.patch | 39 ---------------------- .../recipes-core/systemd/systemd_%.bbappend | 3 -- 2 files changed, 42 deletions(-) delete mode 100644 meta-phosphor/recipes-core/systemd/systemd/0005-dont-return-error-if-unable-to-create-network-namespace.patch (limited to 'meta-phosphor/recipes-core/systemd') diff --git a/meta-phosphor/recipes-core/systemd/systemd/0005-dont-return-error-if-unable-to-create-network-namespace.patch b/meta-phosphor/recipes-core/systemd/systemd/0005-dont-return-error-if-unable-to-create-network-namespace.patch deleted file mode 100644 index d83bf72ef..000000000 --- a/meta-phosphor/recipes-core/systemd/systemd/0005-dont-return-error-if-unable-to-create-network-namespace.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 870b79559cd5841b3f680c914b4b2e770a9961cf Mon Sep 17 00:00:00 2001 -From: Ratan Gupta -Date: Thu, 20 Jul 2017 11:59:14 +0530 -Subject: [PATCH] Don't return the error if unable to create the network - namespace - -On systems where kernel is not configured with namespace support -then don't return error during setting up network namespace. - -Signed-off-by: Ratan Gupta ---- - src/core/namespace.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/core/namespace.c b/src/core/namespace.c -index 1195e9a..f30dacf 100644 ---- a/src/core/namespace.c -+++ b/src/core/namespace.c -@@ -986,7 +986,7 @@ int setup_netns(int netns_storage_socket[2]) { - /* Nothing stored yet, so let's create a new namespace */ - - if (unshare(CLONE_NEWNET) < 0) { -- r = -errno; -+ r = 0; - goto fail; - } - -@@ -994,7 +994,7 @@ int setup_netns(int netns_storage_socket[2]) { - - netns = open("/proc/self/ns/net", O_RDONLY|O_CLOEXEC|O_NOCTTY); - if (netns < 0) { -- r = -errno; -+ r = 0; - goto fail; - } - --- -1.9.1 - diff --git a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend index 7a4f49c07..9611cabae 100644 --- a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend +++ b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend @@ -8,9 +8,6 @@ PACKAGECONFIG_remove = "machined hibernate ldconfig binfmt backlight localed \ FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" SRC_URI += "file://default.network" SRC_URI += "file://0001-sd-bus-Don-t-automatically-add-ObjectManager.patch" -#TODO upstream the below patch via below issue -#https://github.com/openbmc/openbmc/issues/2016 -SRC_URI += "file://0005-dont-return-error-if-unable-to-create-network-namespace.patch" SRC_URI += "file://0006-core-fix-the-check-if-CONFIG_CGROUP_BPF-is-on.patch" RRECOMMENDS_${PN} += "obmc-targets" -- cgit v1.2.3