All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mdadm/systemd: change KillMode from none to mixed in service files
@ 2021-12-01  6:22 Coly Li
  2021-12-01 16:08 ` mtkaczyk
  0 siblings, 1 reply; 10+ messages in thread
From: Coly Li @ 2021-12-01  6:22 UTC (permalink / raw)
  To: linux-raid; +Cc: Coly Li, Benjamin Brunner, Neil Brown, Jes Sorensen

For mdadm's systemd configuration, current systemd KillMode is "none" in
following service files,
- mdadm-grow-continue@.service
- mdmon@.service

This "none" mode is strongly recommended againsted by systemd developers
(see man 5 system.kill for "KillMode=" section), and is considering to
remove in future systemd version.

A proper KillMode is "mixed", which is explained in the system.kill man
page as,
"If set to mixed, the SIGTERM signal (see below) is sent to the main
process while the subsequent SIGKILL signal (see below) is sent to all
remaining processes of the unit's control group."

This patch changes KillMode in above listed service files from "none"
to "mixed", to follow systemd recommendation and avoid potential
unnecessary issue.

Suggested-by: Benjamin Brunner <bbrunner@suse.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Jes Sorensen <jsorensen@fb.com>
---
 systemd/mdadm-grow-continue@.service | 2 +-
 systemd/mdmon@.service               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/systemd/mdadm-grow-continue@.service b/systemd/mdadm-grow-continue@.service
index 5c667d2..5fe9d99 100644
--- a/systemd/mdadm-grow-continue@.service
+++ b/systemd/mdadm-grow-continue@.service
@@ -14,4 +14,4 @@ ExecStart=BINDIR/mdadm --grow --continue /dev/%I
 StandardInput=null
 StandardOutput=null
 StandardError=null
-KillMode=none
+KillMode=mixed
diff --git a/systemd/mdmon@.service b/systemd/mdmon@.service
index 85a3a7c..5ef1bf5 100644
--- a/systemd/mdmon@.service
+++ b/systemd/mdmon@.service
@@ -25,4 +25,4 @@ Type=forking
 # it out) and systemd will remove it when transitioning from
 # initramfs to rootfs.
 #PIDFile=/run/mdadm/%I.pid
-KillMode=none
+KillMode=mixed
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-12-08 21:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01  6:22 [PATCH] mdadm/systemd: change KillMode from none to mixed in service files Coly Li
2021-12-01 16:08 ` mtkaczyk
2021-12-01 16:23   ` Coly Li
2021-12-01 16:28     ` Benjamin Brunner
2021-12-01 16:43       ` Coly Li
2021-12-01 21:51         ` NeilBrown
2021-12-05 13:42           ` Coly Li
2021-12-07 12:34             ` Benjamin Brunner
2021-12-08 16:25               ` Franck Bui
2021-12-08 21:27                 ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.