- fence_mpath: add support for hex-key format (used in multipath.conf)
Resolves: RHEL-56138 - fence_scsi/fence_mpath: add support for SPC-4 disks Resolves: RHEL-7629
This commit is contained in:
parent
207d27bbaf
commit
147626fca6
@ -0,0 +1,44 @@
|
|||||||
|
From 99c5c3289b23064441f998949808a0b3569c2e3b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Thu, 10 Oct 2024 09:55:16 +0200
|
||||||
|
Subject: [PATCH] fence_mpath: fix 0x-format patch causing unfencing issue, and
|
||||||
|
use re.MULTILINE to avoid duplicating device dev/key lines in
|
||||||
|
/run/cluster/mpath.devices
|
||||||
|
|
||||||
|
---
|
||||||
|
agents/mpath/fence_mpath.py | 7 ++++---
|
||||||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py
|
||||||
|
index 2d8601497..2a4a58b36 100644
|
||||||
|
--- a/agents/mpath/fence_mpath.py
|
||||||
|
+++ b/agents/mpath/fence_mpath.py
|
||||||
|
@@ -40,7 +40,7 @@ def set_status(conn, options):
|
||||||
|
if options["--plug"] not in get_registration_keys(options, dev):
|
||||||
|
count += 1
|
||||||
|
logging.debug("Failed to register key "\
|
||||||
|
- + options["--plug"] + "on device " + dev + "\n")
|
||||||
|
+ + options["--plug"] + " on device " + dev + "\n")
|
||||||
|
continue
|
||||||
|
dev_write(options, dev)
|
||||||
|
|
||||||
|
@@ -147,8 +147,9 @@ def dev_write(options, dev):
|
||||||
|
store_fh = open(file_path, "a+")
|
||||||
|
except IOError:
|
||||||
|
fail_usage("Failed: Cannot open file \""+ file_path + "\"")
|
||||||
|
+ store_fh.seek(0)
|
||||||
|
out = store_fh.read()
|
||||||
|
- if not re.search(r"^" + dev + r"\s+", out):
|
||||||
|
+ if not re.search(r"^{}\s+{}$".format(dev, options["--plug"]), out, flags=re.MULTILINE):
|
||||||
|
store_fh.write(dev + "\t" + options["--plug"] + "\n")
|
||||||
|
store_fh.close()
|
||||||
|
|
||||||
|
@@ -332,7 +333,7 @@ def main():
|
||||||
|
fail_usage("Failed: No devices found")
|
||||||
|
|
||||||
|
options["devices"] = [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d]
|
||||||
|
- options["--plug"] = re.sub(r"^0x0*|^0+", "", options["--plug"])
|
||||||
|
+ options["--plug"] = re.sub(r"^0x0*|^0+", "", options.get("--plug", ""))
|
||||||
|
# Input control END
|
||||||
|
|
||||||
|
result = fence_action(None, options, set_status, get_status)
|
@ -57,7 +57,7 @@
|
|||||||
Name: fence-agents
|
Name: fence-agents
|
||||||
Summary: Set of unified programs capable of host isolation ("fencing")
|
Summary: Set of unified programs capable of host isolation ("fencing")
|
||||||
Version: 4.10.0
|
Version: 4.10.0
|
||||||
Release: 79%{?alphatag:.%{alphatag}}%{?dist}
|
Release: 80%{?alphatag:.%{alphatag}}%{?dist}
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
URL: https://github.com/ClusterLabs/fence-agents
|
URL: https://github.com/ClusterLabs/fence-agents
|
||||||
Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz
|
Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz
|
||||||
@ -242,7 +242,8 @@ Patch55: RHEL-25256-fence_vmware_rest-detect-user-sufficient-rights.patch
|
|||||||
Patch56: RHEL-43235-fence_aws-1-list-add-instance-name-status.patch
|
Patch56: RHEL-43235-fence_aws-1-list-add-instance-name-status.patch
|
||||||
Patch57: RHEL-43235-fence_aws-2-log-error-for-unknown-states.patch
|
Patch57: RHEL-43235-fence_aws-2-log-error-for-unknown-states.patch
|
||||||
Patch58: RHEL-59878-fence_scsi-only-preempt-once-for-mpath-devices.patch
|
Patch58: RHEL-59878-fence_scsi-only-preempt-once-for-mpath-devices.patch
|
||||||
Patch59: RHEL-56138-fence_mpath-support-hex-key-format.patch
|
Patch59: RHEL-56138-fence_mpath-1-support-hex-key-format.patch
|
||||||
|
Patch60: RHEL-56138-fence_mpath-2-fix-unfencing-issue-use-MULTILINE-avoid-duplicates.patch
|
||||||
|
|
||||||
### HA support libs/utils ###
|
### HA support libs/utils ###
|
||||||
# all archs
|
# all archs
|
||||||
@ -424,6 +425,7 @@ BuildRequires: %{systemd_units}
|
|||||||
%patch -p1 -P 57
|
%patch -p1 -P 57
|
||||||
%patch -p1 -P 58
|
%patch -p1 -P 58
|
||||||
%patch -p1 -P 59
|
%patch -p1 -P 59
|
||||||
|
%patch -p1 -P 60
|
||||||
|
|
||||||
# prevent compilation of something that won't get used anyway
|
# prevent compilation of something that won't get used anyway
|
||||||
sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
|
sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
|
||||||
@ -1507,7 +1509,7 @@ are located on corosync cluster nodes.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Oct 9 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-79
|
* Thu Oct 10 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-80
|
||||||
- fence_mpath: add support for hex-key format (used in multipath.conf)
|
- fence_mpath: add support for hex-key format (used in multipath.conf)
|
||||||
Resolves: RHEL-56138
|
Resolves: RHEL-56138
|
||||||
- fence_scsi/fence_mpath: add support for SPC-4 disks
|
- fence_scsi/fence_mpath: add support for SPC-4 disks
|
||||||
|
Loading…
Reference in New Issue
Block a user