[PATCH 1/1] systemd: prevent sigkill from being sent

Antoni Segura Puimedon asegurap at redhat.com
Mon Mar 24 15:01:19 UTC 2014



----- Original Message -----
> From: "Antoni S. Puimedon" <asegurap at redhat.com>
> To: sanlock-devel at lists.fedorahosted.org
> Cc: "Antoni S. Puimedon" <asegurap at redhat.com>
> Sent: Monday, March 24, 2014 3:59:42 PM
> Subject: [PATCH 1/1] systemd: prevent sigkill from being sent
> 
> This patch reduces the usage of sysV init scripts by the systemd
> service files and introduces the usage of SendSIGKILL=no to
> prevent ungraceful killing.
> 
> Bug-Url: https://bugzilla.redhat.com/1064991
> Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
> ---
>  init.d/sanlock-tmpfile.conf | 1 +
>  init.d/sanlock.service      | 6 +++---
>  init.d/wdmd-tmpfile.conf    | 1 +
>  init.d/wdmd.service         | 7 ++++---
>  4 files changed, 9 insertions(+), 6 deletions(-)
>  create mode 100644 init.d/sanlock-tmpfile.conf
>  create mode 100644 init.d/wdmd-tmpfile.conf
> 
> diff --git a/init.d/sanlock-tmpfile.conf b/init.d/sanlock-tmpfile.conf
> new file mode 100644
> index 0000000..63fb676
> --- /dev/null
> +++ b/init.d/sanlock-tmpfile.conf
> @@ -0,0 +1 @@
> +d /var/run/sanlock 755 sanlock sanlock
> diff --git a/init.d/sanlock.service b/init.d/sanlock.service
> index 64d9ced..ea3a666 100644
> --- a/init.d/sanlock.service
> +++ b/init.d/sanlock.service
> @@ -4,10 +4,10 @@ After=syslog.target
>  Wants=wdmd.service
>  
>  [Service]
> -Type=forking
> +Type=simple
>  ControlGroup=cpu:/
> -ExecStart=/lib/systemd/systemd-sanlock start
> -ExecStop=/lib/systemd/systemd-sanlock stop
> +ExecStart=/usr/sbin/sanlock -U sanlock -G sanlock
> +SendSIGKILL=no
>  
>  [Install]
>  WantedBy=multi-user.target
> diff --git a/init.d/wdmd-tmpfile.conf b/init.d/wdmd-tmpfile.conf
> new file mode 100644
> index 0000000..a1e742a
> --- /dev/null
> +++ b/init.d/wdmd-tmpfile.conf
> @@ -0,0 +1 @@
> +d /var/run/wdmd 755 sanlock sanlock
> diff --git a/init.d/wdmd.service b/init.d/wdmd.service
> index efe46bf..4f09f2a 100644
> --- a/init.d/wdmd.service
> +++ b/init.d/wdmd.service
> @@ -3,10 +3,11 @@ Description=Watchdog Multiplexing Daemon
>  After=syslog.target
>  
>  [Service]
> -Type=forking
> +Type=simple
>  ControlGroup=cpu:/
> -ExecStart=/lib/systemd/systemd-wdmd start
> -ExecStop=/lib/systemd/systemd-wdmd stop
> +ExecStartPre=/lib/systemd/systemd-wdmd watchdog_check
> +ExecStart=/usr/sbin/wdmd -G sanlock
> +SendSIGKILL=no
>  
>  [Install]
>  WantedBy=multi-user.target
> --
> 1.8.5.3
> 
I'll try to verify today both on fedora and arch linux.


More information about the sanlock-devel mailing list