All of lore.kernel.org
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: linux-raid@vger.kernel.org
Cc: Coly Li <colyli@suse.de>, Benjamin Brunner <bbrunner@suse.com>,
	Neil Brown <neilb@suse.de>, Jes Sorensen <jsorensen@fb.com>
Subject: [PATCH] mdadm/systemd: change KillMode from none to mixed in service files
Date: Wed,  1 Dec 2021 14:22:45 +0800	[thread overview]
Message-ID: <20211201062245.6636-1-colyli@suse.de> (raw)

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


             reply	other threads:[~2021-12-01  6:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  6:22 Coly Li [this message]
2021-12-01 16:08 ` [PATCH] mdadm/systemd: change KillMode from none to mixed in service files 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211201062245.6636-1-colyli@suse.de \
    --to=colyli@suse.de \
    --cc=bbrunner@suse.com \
    --cc=jsorensen@fb.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.