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

This commit is contained in:
Dan Winship 2013-01-04 12:16:27 -05:00
parent 3cbd4c0545
commit 7f9de59e07
2 changed files with 38 additions and 1 deletions

View File

@ -19,7 +19,7 @@ Name: NetworkManager
Summary: Network connection manager and user applications Summary: Network connection manager and user applications
Epoch: 1 Epoch: 1
Version: 0.9.7.0 Version: 0.9.7.0
Release: 11%{snapshot}%{?dist} Release: 12%{snapshot}%{?dist}
Group: System Environment/Base Group: System Environment/Base
License: GPLv2+ License: GPLv2+
URL: http://www.gnome.org/projects/NetworkManager/ URL: http://www.gnome.org/projects/NetworkManager/
@ -28,6 +28,7 @@ Source: %{name}-%{realversion}%{snapshot}.tar.bz2
Source1: NetworkManager.conf Source1: NetworkManager.conf
Patch1: explain-dns1-dns2.patch Patch1: explain-dns1-dns2.patch
Patch2: nss-error.patch Patch2: nss-error.patch
Patch3: rh876218-killmode.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 %patch1 -p1 -b .explain-dns1-dns2
%patch2 -p1 -b .nss-error %patch2 -p1 -b .nss-error
%patch3 -p1 -b .killmode
%build %build
@ -356,6 +358,9 @@ exit 0
%{_datadir}/gtk-doc/html/libnm-util/* %{_datadir}/gtk-doc/html/libnm-util/*
%changelog %changelog
* Mon Jan 14 2013 Dan Winship <danw@redhat.com> - 0.9.7.0-12.git20121211
- Set correct systemd KillMode to fix anaconda shutdown hangs (rh #876218)
* Tue Dec 11 2012 Jiří Klimeš <jklimes@redhat.com> - 0.9.7.0-11.git20121211 * Tue Dec 11 2012 Jiří Klimeš <jklimes@redhat.com> - 0.9.7.0-11.git20121211
- Update to git snapshot - Update to git snapshot
- core: add support for bridge interfaces - core: add support for bridge interfaces

32
rh876218-killmode.patch Normal file
View File

@ -0,0 +1,32 @@
From 1d89bc0004ec27fbc0c89f17861118c78d7eeab5 Mon Sep 17 00:00:00 2001
From: Dan Winship <danw@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