[NetworkManager/f18] Set correct systemd KillMode to fix anaconda shutdown hangs (rh #876218)

Dan Winship danw at fedoraproject.org
Fri Jan 4 17:19:29 UTC 2013


commit 7d2cb179235481e494990cad96f2452b4326054d
Author: Dan Winship <danw at gnome.org>
Date:   Fri Jan 4 12:16:27 2013 -0500

    Set correct systemd KillMode to fix anaconda shutdown hangs (rh #876218)

 NetworkManager.spec     |    7 ++++++-
 rh876218-killmode.patch |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/NetworkManager.spec b/NetworkManager.spec
index 59980e5..580eaed 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/
@@ -34,6 +34,7 @@ Patch5: udev-uninitialized-devices.patch
 Patch6: rh875085-set-hostname.patch
 Patch7: rh831735-etc-hostname.patch
 Patch8: rh830434-ifcfg-missing-ipv6.patch
+Patch9: rh876218-killmode.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -165,6 +166,7 @@ NetworkManager functionality from applications that use glib.
 %patch6 -p1 -b .set-hostname
 %patch7 -p1 -b .etc-hostname
 %patch8 -p1 -b .ifcfg-missing-ipv6
+%patch9 -p1 -b .killmode
 
 %build
 
@@ -368,6 +370,9 @@ exit 0
 %{_datadir}/gtk-doc/html/libnm-util/*
 
 %changelog
+* Fri Jan  4 2013 Dan Winship <danw at redhat.com> - 0.9.7.0-12.git20121004
+- Set correct systemd KillMode to fix anaconda shutdown hangs (rh #876218)
+
 * Tue Dec 18 2012 Jiří Klimeš <jklimes at redhat.com> - 0.9.7.0-11.git20121004
 - ifcfg-rh: write missing IPv6 setting as IPv6 with "auto" method (rh #830434)
 
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 <danw at gnome.org>
+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
+


More information about the scm-commits mailing list