From d51e66c57b798f4f22bde28d72f4c11afd474f7e Mon Sep 17 00:00:00 2001 From: kouwenqi Date: Tue, 2 Apr 2024 15:47:33 +0800 Subject: [PATCH] multipathd.socket: add missing conditions from service unit This aligns 'multipathd' socket and service units, by adding the start conditions that are set on the service but not on the socket. It should help avoiding situations where the socket unit ends up marked as failed after hitting its retry-limit. --- ...t-add-missing-conditions-from-servic.patch | 34 +++++++++++++++++++ multipath-tools.spec | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0028-multipathd.socket-add-missing-conditions-from-servic.patch diff --git a/0028-multipathd.socket-add-missing-conditions-from-servic.patch b/0028-multipathd.socket-add-missing-conditions-from-servic.patch new file mode 100644 index 0000000..09df87e --- /dev/null +++ b/0028-multipathd.socket-add-missing-conditions-from-servic.patch @@ -0,0 +1,34 @@ +From 4167af5bddb9fb1003e7919432e6cc24469ee166 Mon Sep 17 00:00:00 2001 +From: Luca BRUNO +Date: Fri, 24 Sep 2021 09:34:01 +0000 +Subject: [PATCH] multipathd.socket: add missing conditions from service unit + +This aligns 'multipathd' socket and service units, by adding the +start conditions that are set on the service but not on the socket. +It should help avoiding situations where the socket unit ends up +marked as failed after hitting its retry-limit. + +Fixes: https://github.com/opensvc/multipath-tools/issues/15 +Signed-off-by: Luca BRUNO +Reviewed-by: Martin Wilck +--- + multipathd/multipathd.socket | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/multipathd/multipathd.socket b/multipathd/multipathd.socket +index 0ed4a1f7..c777e5e3 100644 +--- a/multipathd/multipathd.socket ++++ b/multipathd/multipathd.socket +@@ -1,6 +1,9 @@ + [Unit] + Description=multipathd control socket + DefaultDependencies=no ++ConditionKernelCommandLine=!nompath ++ConditionKernelCommandLine=!multipath=off ++ConditionVirtualization=!container + Before=sockets.target + + [Socket] +-- +2.23.0 + diff --git a/multipath-tools.spec b/multipath-tools.spec index a3f1352..a5a30a2 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,7 +1,7 @@ #needsrootforbuild Name: multipath-tools Version: 0.8.7 -Release: 10 +Release: 11 Summary: Tools to manage multipath devices with the device-mapper License: GPL-2.0-or-later and LGPL-2.0-only URL: http://christophe.varoqui.free.fr/ @@ -36,6 +36,7 @@ Patch24: 0024-libmultipath-use-directio-checker-for-LIO-targets.patch Patch25: 0025-multipathd-make-pr-registration-consistent.patch Patch26: 0026-libmultipath-io_err_stat-don-t-free-aio-memory-befor.patch Patch27: 0027-libmultipath-io_err_stat-call-io_destroy-inside-free.patch +Patch28: 0028-multipathd.socket-add-missing-conditions-from-servic.patch BuildRequires: multipath-tools, libcmocka, libcmocka-devel BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 @@ -183,6 +184,9 @@ fi %changelog +* Tue Apr 2 2024 kouwenqi - 0.8.7-11 +- multipathd.socket: add missing conditions from service unit + * Tue Dec 19 2023 wangzhiqiang - 0.8.7-10 - fix coredump in io_err_stat