代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/fence-agents 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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 08/10] 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 2d860149..2a4a58b3 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 @@ failing."
fail_usage("Failed: No devices found")
options["devices"] = [d for d in re.split(r"\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)
--
2.33.1.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。