|
Dusty Mabe |
fbb253 |
From 1f21fac646daa46cbe184ef8ff7705842f06ba15 Mon Sep 17 00:00:00 2001
|
|
Dusty Mabe |
fbb253 |
From: Dusty Mabe <dusty@dustymabe.com>
|
|
Dusty Mabe |
fbb253 |
Date: Wed, 14 Apr 2021 10:46:12 -0400
|
|
Dusty Mabe |
fbb253 |
Subject: [PATCH] fix(network-manager): nm-run.service: don't kill forked
|
|
Dusty Mabe |
fbb253 |
processes
|
|
Dusty Mabe |
fbb253 |
|
|
Dusty Mabe |
fbb253 |
If teaming is set up via NetworkManager we don't want systemd to take
|
|
Dusty Mabe |
fbb253 |
down the userspace teamd process when NetworkManager quits. `KillMode=process`
|
|
Dusty Mabe |
fbb253 |
will allow it to leave those processes behind.
|
|
Dusty Mabe |
fbb253 |
|
|
Dusty Mabe |
fbb253 |
This is fallout from the change to run NetworkManager via systemd (c17c5b7).
|
|
Dusty Mabe |
fbb253 |
|
|
Dusty Mabe |
fbb253 |
With `KillMode=process` we get something like:
|
|
Dusty Mabe |
fbb253 |
|
|
Dusty Mabe |
fbb253 |
```
|
|
Dusty Mabe |
fbb253 |
sh-5.1# journalctl -u nm-run -o cat | tail
|
|
Dusty Mabe |
fbb253 |
<info> [1618411262.7030] quitting now that startup is complete
|
|
Dusty Mabe |
fbb253 |
<info> [1618411262.7030] device (team0): carrier: link connected
|
|
Dusty Mabe |
fbb253 |
<info> [1618411262.7033] device (team0): team port ens2 was released
|
|
Dusty Mabe |
fbb253 |
<info> [1618411262.7033] device (team0): team port ens3 was released
|
|
Dusty Mabe |
fbb253 |
<info> [1618411262.7033] manager: NetworkManager state is now CONNECTED_SITE
|
|
Dusty Mabe |
fbb253 |
<info> [1618411262.7034] exiting (success)
|
|
Dusty Mabe |
fbb253 |
nm-run.service: Deactivated successfully.
|
|
Dusty Mabe |
fbb253 |
nm-run.service: Unit process 476 (teamd) remains running after unit stopped.
|
|
Dusty Mabe |
fbb253 |
Finished nm-run.service.
|
|
Dusty Mabe |
fbb253 |
```
|
|
Dusty Mabe |
fbb253 |
---
|
|
Dusty Mabe |
fbb253 |
modules.d/35network-manager/nm-run.service | 2 ++
|
|
Dusty Mabe |
fbb253 |
1 file changed, 2 insertions(+)
|
|
Dusty Mabe |
fbb253 |
|
|
Dusty Mabe |
fbb253 |
diff --git a/modules.d/35network-manager/nm-run.service b/modules.d/35network-manager/nm-run.service
|
|
Dusty Mabe |
fbb253 |
index f3493c41..b667ce37 100644
|
|
Dusty Mabe |
fbb253 |
--- a/modules.d/35network-manager/nm-run.service
|
|
Dusty Mabe |
fbb253 |
+++ b/modules.d/35network-manager/nm-run.service
|
|
Dusty Mabe |
fbb253 |
@@ -23,6 +23,8 @@ ConditionPathExistsGlob=|/etc/sysconfig/network-scripts/ifcfg-*
|
|
Dusty Mabe |
fbb253 |
#run the script and wait before it finishes
|
|
Dusty Mabe |
fbb253 |
Type=oneshot
|
|
Dusty Mabe |
fbb253 |
ExecStart=/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
|
|
Dusty Mabe |
fbb253 |
+#don't kill forked off processes (for example: teamd for teaming)
|
|
Dusty Mabe |
fbb253 |
+KillMode=process
|
|
Dusty Mabe |
fbb253 |
|
|
Dusty Mabe |
fbb253 |
[Install]
|
|
Dusty Mabe |
fbb253 |
WantedBy=initrd.target
|
|
Dusty Mabe |
fbb253 |
--
|
|
Dusty Mabe |
fbb253 |
2.30.2
|
|
Dusty Mabe |
fbb253 |
|