From 7f9de59e073b4b2cf51ff36b4bc2f57ba973a0b2 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 4 Jan 2013 12:16:27 -0500 Subject: [PATCH] Set correct systemd KillMode to fix anaconda shutdown hangs (rh #876218) --- NetworkManager.spec | 7 ++++++- rh876218-killmode.patch | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 rh876218-killmode.patch diff --git a/NetworkManager.spec b/NetworkManager.spec index ef65f5b..83e8df8 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -19,7 +19,7 @@ Name: NetworkManager Summary: Network connection manager and user applications Epoch: 1 Version: 0.9.7.0 -Release: 11%{snapshot}%{?dist} +Release: 12%{snapshot}%{?dist} Group: System Environment/Base License: GPLv2+ URL: http://www.gnome.org/projects/NetworkManager/ @@ -28,6 +28,7 @@ Source: %{name}-%{realversion}%{snapshot}.tar.bz2 Source1: NetworkManager.conf Patch1: explain-dns1-dns2.patch Patch2: nss-error.patch +Patch3: rh876218-killmode.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -153,6 +154,7 @@ NetworkManager functionality from applications that use glib. %patch1 -p1 -b .explain-dns1-dns2 %patch2 -p1 -b .nss-error +%patch3 -p1 -b .killmode %build @@ -356,6 +358,9 @@ exit 0 %{_datadir}/gtk-doc/html/libnm-util/* %changelog +* Mon Jan 14 2013 Dan Winship - 0.9.7.0-12.git20121211 +- Set correct systemd KillMode to fix anaconda shutdown hangs (rh #876218) + * Tue Dec 11 2012 Jiří Klimeš - 0.9.7.0-11.git20121211 - Update to git snapshot - core: add support for bridge interfaces diff --git a/rh876218-killmode.patch b/rh876218-killmode.patch new file mode 100644 index 0000000..6e2b2b3 --- /dev/null +++ b/rh876218-killmode.patch @@ -0,0 +1,32 @@ +From 1d89bc0004ec27fbc0c89f17861118c78d7eeab5 Mon Sep 17 00:00:00 2001 +From: Dan Winship +Date: Fri, 4 Jan 2013 11:53:03 -0500 +Subject: [PATCH] systemd: set KillMode=process + +By default, when shutting NM down, systemd will kill everything in its +cgroup. But this can cause problems (eg, NM thinking that dhclient +crashed and then taking down an interface that it would otherwise have +left up). Fix this by setting KillMode=process, which tells systemd to +only kill NM itself, and let NM kill its children. + +https://bugzilla.redhat.com/show_bug.cgi?id=876218 +--- + data/NetworkManager.service.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in +index 9a5f125..16b53b6 100644 +--- a/data/NetworkManager.service.in ++++ b/data/NetworkManager.service.in +@@ -12,6 +12,8 @@ ExecStart=@sbindir@/NetworkManager --no-daemon + # with LOG_PERROR when run in foreground. But systemd redirects stderr to + # syslog by default, which results in logging each message twice. + StandardError=null ++# NM doesn't want systemd to kill its children for it ++KillMode=process + + [Install] + WantedBy=multi-user.target +-- +1.8.0.1 +