!6 fix watchdog trigger multipath disconnect behavior
From: @zhao-chaoxiang Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
e69a9aaa2d
@ -0,0 +1,30 @@
|
||||
diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py
|
||||
index e4f59836..b17388eb 100644
|
||||
--- a/agents/mpath/fence_mpath.py
|
||||
+++ b/agents/mpath/fence_mpath.py
|
||||
@@ -117,12 +117,14 @@ def get_reservation_key(options, dev):
|
||||
match = re.search(r"\s+key\s*=\s*0x(\S+)\s+", out["out"], re.IGNORECASE)
|
||||
return match.group(1) if match else None
|
||||
|
||||
-def get_registration_keys(options, dev):
|
||||
+def get_registration_keys(options, dev, fail=True):
|
||||
keys = []
|
||||
cmd = options["--mpathpersist-path"] + " -i -k -d " + dev
|
||||
out = run_cmd(options, cmd)
|
||||
if out["err"]:
|
||||
- fail_usage("Cannot get registration keys")
|
||||
+ fail_usage("Cannot get registration keys", fail)
|
||||
+ if not fail:
|
||||
+ return []
|
||||
for line in out["out"].split("\n"):
|
||||
match = re.search(r"\s+0x(\S+)\s*", line)
|
||||
if match:
|
||||
@@ -183,7 +185,7 @@ def mpath_check(hardreboot=False):
|
||||
logging.error("No devices found")
|
||||
return 0
|
||||
for dev, key in list(devs.items()):
|
||||
- if key in get_registration_keys(options, dev):
|
||||
+ if key in get_registration_keys(options, dev, fail=False):
|
||||
logging.debug("key " + key + " registered with device " + dev)
|
||||
return 0
|
||||
else:
|
||||
@ -29,7 +29,7 @@
|
||||
Name: fence-agents
|
||||
Summary: Set of unified programs capable of host isolation ("fencing")
|
||||
Version: 4.2.1
|
||||
Release: 32
|
||||
Release: 33
|
||||
License: GPLv2+ and LGPLv2+ and ASL 2.0 and BSD and MIT and Python-2.0 and Artistic-1.0-Perl
|
||||
Group: System Environment/Base
|
||||
URL: https://github.com/ClusterLabs/fence-agents
|
||||
@ -76,6 +76,7 @@ Patch36: bz1720198-fence_scsi-watchdog-fix-retry-failing-on-first-try.patch
|
||||
Patch37: bz1732773-fence_vmware_rest-fix-keyerror-suspended-vms.patch
|
||||
Patch38: bz1748443-fence_zvmip-python3-fixes.patch
|
||||
Patch39: bz1762432-fence_compute-disable-service-after-force-down.patch
|
||||
Patch40: bz1751704-fence_mpath-fix-watchdog-trigger-multipath-disconnect.patch
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hpblade ibmblade ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan mpath kdump redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti
|
||||
@ -191,6 +192,7 @@ BuildRequires: python3-google-api-client
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
|
||||
# prevent compilation of something that won't get used anyway
|
||||
sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
|
||||
@ -963,6 +965,9 @@ Fence agent for IBM z/VM over IP.
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jul 25 2022 zhaochaoxiang <zhaochaoxiang@kylinos.cn> - 4.2.1-33
|
||||
- fix watchdog trigger multipath disconnect
|
||||
|
||||
* Fri Jan 29 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 4.2.1-32
|
||||
- Remove the azure plug-in
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user