summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-03-02 17:12:06 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-03-02 17:47:29 +0100
commit105abf27c12074952872678463b2cf331150a2ce (patch)
treeb0918d30a79da8e013e4e618ae860e15243d2afd
parent4087024a9b1dcad5c819cde0d2902b94f6beeef4 (diff)
downloadNetworkManager-105abf27c12074952872678463b2cf331150a2ce.tar.gz
Revert "dispatcher/systemd: order NetworkManager-dispatcher.service Before=NetworkManager.service"
The 'Before' dependency between NM-dispatcher and NM causes a deadlock when stopping the NM service. When terminating, NM wants to D-Bus activate NM-dispatcher to synchronously handle pre-down events; but NM-dispatcher start is ordered after NM shutdown due to the following behavior described in systemd.unit(5) man page: Given two units with any ordering dependency between them, if one unit is shut down and the other is started up, the shutdown is ordered before the start-up. It doesn't matter if the ordering dependency is After= or Before=, in this case. It also doesn't matter which of the two is shut down, as long as one is shut down and the other is started up; the shutdown is ordered before the start-up in all cases. So, NM is waiting NM-dispatcher to start and NM-dispatcher is queued by systemd, waiting that NM is stopped. The result is a 90 seconds delay, after which systemd kills NM and continues. The dependency was added so that during shutdown NM-dispatcher would be stopped after NM. I don't think it worked as expected because NM-dispatcher is not supposed to be active most of the times, and so it doesn't need a dependency that delays its stop after NM. This reverts commit acc335aad4c310fef3760d43b2fb137e5206615c.
-rw-r--r--data/NetworkManager-dispatcher.service.in6
1 files changed, 0 insertions, 6 deletions
diff --git a/data/NetworkManager-dispatcher.service.in b/data/NetworkManager-dispatcher.service.in
index 80dc2a1b8d..c450478bac 100644
--- a/data/NetworkManager-dispatcher.service.in
+++ b/data/NetworkManager-dispatcher.service.in
@@ -1,12 +1,6 @@
[Unit]
Description=Network Manager Script Dispatcher Service
-# Order the dispatcher before NetworkManager. While dispatcher
-# is D-Bus activate (and not intended to be explicitly wanted by
-# another service/target), the ordering dependency matters during
-# shutdown. We want first NetworkManager to be stopped.
-Before=NetworkManager.service
-
[Service]
Type=dbus
BusName=org.freedesktop.nm_dispatcher