From 5e95e230263113664f98af436cb243e01b8f681d Mon Sep 17 00:00:00 2001 From: mischief Date: Thu, 19 Mar 2015 13:50:26 -0700 Subject: [PATCH] sys-apps/systemd: fix networkd-wait-online interface checks to prevents hangs on systems with multiple NICs --- ...temd-networkd-wait-online-with-multi.patch | 36 +++++++++++++++++++ ...md-218-r7.ebuild => systemd-218-r8.ebuild} | 3 ++ ...md-219-r2.ebuild => systemd-219-r3.ebuild} | 3 ++ 3 files changed, 42 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/218-0006-networkd-fix-systemd-networkd-wait-online-with-multi.patch rename sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/{systemd-218-r7.ebuild => systemd-218-r8.ebuild} (99%) rename sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/{systemd-219-r2.ebuild => systemd-219-r3.ebuild} (99%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/218-0006-networkd-fix-systemd-networkd-wait-online-with-multi.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/218-0006-networkd-fix-systemd-networkd-wait-online-with-multi.patch new file mode 100644 index 0000000000..751eed7146 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/218-0006-networkd-fix-systemd-networkd-wait-online-with-multi.patch @@ -0,0 +1,36 @@ +From 325461e38bd4536342da50e00c8d86f6a348ef5c Mon Sep 17 00:00:00 2001 +From: mischief +Date: Thu, 19 Mar 2015 16:04:43 -0700 +Subject: [PATCH] networkd: fix systemd-networkd-wait-online with multiple NICs + +when checking interface status, systemd-networkd-wait-online +will continue to wait if any interface is still configuring or +being processed by udev. this patch allows it to return if any +one interface is degraded/routable, as per the manual. +--- + src/network/networkd-wait-online-manager.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/network/networkd-wait-online-manager.c b/src/network/networkd-wait-online-manager.c +index 1c997a5..1ac162a 100644 +--- a/src/network/networkd-wait-online-manager.c ++++ b/src/network/networkd-wait-online-manager.c +@@ -74,13 +74,13 @@ bool manager_all_configured(Manager *m) { + if (!l->state) { + log_debug("link %s has not yet been processed by udev", + l->ifname); +- return false; ++ continue; + } + + if (streq(l->state, "configuring")) { + log_debug("link %s is being processed by networkd", + l->ifname); +- return false; ++ continue; + } + + if (l->operational_state && +-- +2.0.5 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-218-r7.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-218-r8.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-218-r7.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-218-r8.ebuild index f41890c3ba..7a1ad8ee33 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-218-r7.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-218-r8.ebuild @@ -193,6 +193,9 @@ fi # Fix for coreos/bugs #293 epatch "${FILESDIR}"/219-0003-nspawn-map-all-seccomp-filters-to-capabilities.patch + # https://github.com/coreos/bugs/issues/279 + epatch "${FILESDIR}"/218-0006-networkd-fix-systemd-networkd-wait-online-with-multi.patch + autotools-utils_src_prepare } diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-219-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-219-r3.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-219-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-219-r3.ebuild index a981d7d5c8..1f2be830fb 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-219-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-219-r3.ebuild @@ -189,6 +189,9 @@ fi # Fix for coreos/bugs #293 epatch "${FILESDIR}"/219-0003-nspawn-map-all-seccomp-filters-to-capabilities.patch + # https://github.com/coreos/bugs/issues/279 + epatch "${FILESDIR}"/218-0006-networkd-fix-systemd-networkd-wait-online-with-multi.patch + autotools-utils_src_prepare }