import fence-agents-4.2.1-65.el8
This commit is contained in:
parent
fe31f47816
commit
65733bbc6f
1233
SOURCES/bz1470813-fencing-1-disable-timeout.patch
Normal file
1233
SOURCES/bz1470813-fencing-1-disable-timeout.patch
Normal file
File diff suppressed because it is too large
Load Diff
40
SOURCES/bz1470813-fencing-2-fix-power-timeout.patch
Normal file
40
SOURCES/bz1470813-fencing-2-fix-power-timeout.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 4202a863b25e456b7e419cbfc33c45ae179eb760 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Thu, 15 Oct 2020 10:34:03 +0200
|
||||||
|
Subject: [PATCH] fencing: fix power-timeout when using new disable-timeout
|
||||||
|
parameter
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/fencing.py.py | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
|
||||||
|
index 4a41af02..4639a9a5 100644
|
||||||
|
--- a/lib/fencing.py.py
|
||||||
|
+++ b/lib/fencing.py.py
|
||||||
|
@@ -10,6 +10,8 @@
|
||||||
|
import textwrap
|
||||||
|
import __main__
|
||||||
|
|
||||||
|
+import itertools
|
||||||
|
+
|
||||||
|
RELEASE_VERSION = "@RELEASE_VERSION@"
|
||||||
|
|
||||||
|
__all__ = ['atexit_handler', 'check_input', 'process_input', 'all_opt', 'show_docs',
|
||||||
|
@@ -821,11 +823,15 @@ def async_set_multi_power_fn(connection, options, set_power_fn, get_power_fn, re
|
||||||
|
set_power_fn(connection, options)
|
||||||
|
time.sleep(int(options["--power-wait"]))
|
||||||
|
|
||||||
|
- for _ in range(int(options["--power-timeout"])):
|
||||||
|
+ for _ in itertools.count(1):
|
||||||
|
if get_multi_power_fn(connection, options, get_power_fn) != options["--action"]:
|
||||||
|
time.sleep(1)
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
+
|
||||||
|
+ if int(options["--power-timeout"]) > 0 and _ >= int(options["--power-timeout"]):
|
||||||
|
+ break
|
||||||
|
+
|
||||||
|
return False
|
||||||
|
|
||||||
|
def sync_set_multi_power_fn(connection, options, sync_set_power_fn, retry_attempts):
|
@ -0,0 +1,38 @@
|
|||||||
|
From 4cf6887e98c712b99f741dbfe54932c60e93741b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Tue, 3 Nov 2020 14:30:12 +0100
|
||||||
|
Subject: [PATCH] fencing: fix to make timeout(s)=0 be treated as forever for
|
||||||
|
agents using pexpect
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/fencing.py.py | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
|
||||||
|
index 4639a9a5..fa34f13a 100644
|
||||||
|
--- a/lib/fencing.py.py
|
||||||
|
+++ b/lib/fencing.py.py
|
||||||
|
@@ -500,10 +500,13 @@ def __init__(self, options, command, **kwargs):
|
||||||
|
self.opt = options
|
||||||
|
|
||||||
|
def log_expect(self, pattern, timeout):
|
||||||
|
- result = self.expect(pattern, timeout)
|
||||||
|
+ result = self.expect(pattern, timeout if timeout != 0 else None)
|
||||||
|
logging.debug("Received: %s", self.before + self.after)
|
||||||
|
return result
|
||||||
|
|
||||||
|
+ def read_nonblocking(self, size, timeout):
|
||||||
|
+ return pexpect.spawn.read_nonblocking(self, size=100, timeout=timeout if timeout != 0 else None)
|
||||||
|
+
|
||||||
|
def send(self, message):
|
||||||
|
logging.debug("Sent: %s", message)
|
||||||
|
return pexpect.spawn.send(self, message)
|
||||||
|
@@ -516,7 +519,7 @@ def frun(command, timeout=30, withexitstatus=False, events=None,
|
||||||
|
extra_args=None, logfile=None, cwd=None, env=None, **kwargs):
|
||||||
|
if sys.version_info[0] > 2:
|
||||||
|
kwargs.setdefault('encoding', 'utf-8')
|
||||||
|
- return pexpect.run(command, timeout=timeout,
|
||||||
|
+ return pexpect.run(command, timeout=timeout if timeout != 0 else None,
|
||||||
|
withexitstatus=withexitstatus, events=events,
|
||||||
|
extra_args=extra_args, logfile=logfile, cwd=cwd,
|
||||||
|
env=env, **kwargs)
|
@ -0,0 +1,22 @@
|
|||||||
|
From 083ecce0e7b6cd41eef026c8a1ba986f8814a7d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Thu, 5 Nov 2020 11:53:55 +0100
|
||||||
|
Subject: [PATCH] fencing: fix run_command() to allow timeout=0 to mean forever
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/fencing.py.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
|
||||||
|
index fa34f13a..9654f57b 100644
|
||||||
|
--- a/lib/fencing.py.py
|
||||||
|
+++ b/lib/fencing.py.py
|
||||||
|
@@ -1062,7 +1062,7 @@ def run_command(options, command, timeout=None, env=None, log_command=None):
|
||||||
|
|
||||||
|
thread = threading.Thread(target=process.wait)
|
||||||
|
thread.start()
|
||||||
|
- thread.join(timeout)
|
||||||
|
+ thread.join(timeout if timeout else None)
|
||||||
|
if thread.is_alive():
|
||||||
|
process.kill()
|
||||||
|
fail(EC_TIMED_OUT, stop=(int(options.get("retry", 0)) < 1))
|
75
SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch
Normal file
75
SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From 2c9ee29d1e28dbdd5e305156ae70451e31d976c0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Thu, 4 Jun 2020 14:43:15 +0200
|
||||||
|
Subject: [PATCH 1/2] fence_azure_arm: log metadata when debugging
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/azure_fence.py.py | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/lib/azure_fence.py.py b/lib/azure_fence.py.py
|
||||||
|
index 7bb43adc..4e44ca9d 100644
|
||||||
|
--- a/lib/azure_fence.py.py
|
||||||
|
+++ b/lib/azure_fence.py.py
|
||||||
|
@@ -41,6 +41,7 @@ def get_from_metadata(parameter):
|
||||||
|
import requests
|
||||||
|
try:
|
||||||
|
r = requests.get('http://169.254.169.254/metadata/instance?api-version=2017-08-01', headers = {"Metadata":"true"})
|
||||||
|
+ logging.debug("metadata: " + str(r.json()))
|
||||||
|
return str(r.json()["compute"][parameter])
|
||||||
|
except:
|
||||||
|
logging.warning("Not able to use metadata service. Am I running in Azure?")
|
||||||
|
|
||||||
|
From e3e3199cbf35855c6ab512ac06d7249df94eb3e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Thu, 4 Jun 2020 14:43:52 +0200
|
||||||
|
Subject: [PATCH 2/2] fence_azure_arm: fixes to make MSI support work
|
||||||
|
|
||||||
|
---
|
||||||
|
agents/azure_arm/fence_azure_arm.py | 3 ++-
|
||||||
|
tests/data/metadata/fence_azure_arm.xml | 4 ++--
|
||||||
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py
|
||||||
|
index be0d4034..6b1a3770 100755
|
||||||
|
--- a/agents/azure_arm/fence_azure_arm.py
|
||||||
|
+++ b/agents/azure_arm/fence_azure_arm.py
|
||||||
|
@@ -184,7 +184,7 @@ def main():
|
||||||
|
compute_client = None
|
||||||
|
network_client = None
|
||||||
|
|
||||||
|
- device_opt = ["login", "passwd", "port", "resourceGroup", "tenantId", "subscriptionId", "network-fencing", "msi", "cloud"]
|
||||||
|
+ device_opt = ["login", "no_login", "no_password", "passwd", "port", "resourceGroup", "tenantId", "subscriptionId", "network-fencing", "msi", "cloud"]
|
||||||
|
|
||||||
|
atexit.register(atexit_handler)
|
||||||
|
|
||||||
|
@@ -222,6 +222,7 @@ def main():
|
||||||
|
|
||||||
|
try:
|
||||||
|
config = azure_fence.get_azure_config(options)
|
||||||
|
+ options["--resourceGroup"] = config.RGName
|
||||||
|
compute_client = azure_fence.get_azure_compute_client(config)
|
||||||
|
if "--network-fencing" in options:
|
||||||
|
network_client = azure_fence.get_azure_network_client(config)
|
||||||
|
diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml
|
||||||
|
index 97ecfdba..7ea672af 100644
|
||||||
|
--- a/tests/data/metadata/fence_azure_arm.xml
|
||||||
|
+++ b/tests/data/metadata/fence_azure_arm.xml
|
||||||
|
@@ -23,7 +23,7 @@ When using network fencing the reboot-action will cause a quick-return once the
|
||||||
|
<content type="string" default="reboot" />
|
||||||
|
<shortdesc lang="en">Fencing action</shortdesc>
|
||||||
|
</parameter>
|
||||||
|
- <parameter name="login" unique="0" required="1" deprecated="1">
|
||||||
|
+ <parameter name="login" unique="0" required="0" deprecated="1">
|
||||||
|
<getopt mixed="-l, --username=[appid]" />
|
||||||
|
<content type="string" />
|
||||||
|
<shortdesc lang="en">Application ID</shortdesc>
|
||||||
|
@@ -58,7 +58,7 @@ When using network fencing the reboot-action will cause a quick-return once the
|
||||||
|
<content type="string" />
|
||||||
|
<shortdesc lang="en">Physical plug number on device, UUID or identification of machine</shortdesc>
|
||||||
|
</parameter>
|
||||||
|
- <parameter name="username" unique="0" required="1" obsoletes="login">
|
||||||
|
+ <parameter name="username" unique="0" required="0" obsoletes="login">
|
||||||
|
<getopt mixed="-l, --username=[appid]" />
|
||||||
|
<content type="string" />
|
||||||
|
<shortdesc lang="en">Application ID</shortdesc>
|
@ -0,0 +1,60 @@
|
|||||||
|
From 431e8bc40288d97d80f07ec195c0a07c5f8c065a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Tue, 10 Nov 2020 12:46:50 +0100
|
||||||
|
Subject: [PATCH] fence_scsi: dont write key to device if it's already
|
||||||
|
registered, and open file correctly to avoid using regex against end-of-file
|
||||||
|
|
||||||
|
---
|
||||||
|
agents/scsi/fence_scsi.py | 12 +++++-------
|
||||||
|
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py
|
||||||
|
index 77817f35..9a86689d 100644
|
||||||
|
--- a/agents/scsi/fence_scsi.py
|
||||||
|
+++ b/agents/scsi/fence_scsi.py
|
||||||
|
@@ -135,6 +135,8 @@ def register_dev(options, dev):
|
||||||
|
for slave in get_mpath_slaves(dev):
|
||||||
|
register_dev(options, slave)
|
||||||
|
return True
|
||||||
|
+ if get_reservation_key(options, dev, False) == options["--key"]:
|
||||||
|
+ return True
|
||||||
|
reset_dev(options, dev)
|
||||||
|
cmd = options["--sg_persist-path"] + " -n -o -I -S " + options["--key"] + " -d " + dev
|
||||||
|
cmd += " -Z" if "--aptpl" in options else ""
|
||||||
|
@@ -148,14 +150,14 @@ def reserve_dev(options, dev):
|
||||||
|
return not bool(run_cmd(options, cmd)["err"])
|
||||||
|
|
||||||
|
|
||||||
|
-def get_reservation_key(options, dev):
|
||||||
|
+def get_reservation_key(options, dev, fail=True):
|
||||||
|
reset_dev(options,dev)
|
||||||
|
opts = ""
|
||||||
|
if "--readonly" in options:
|
||||||
|
opts = "-y "
|
||||||
|
cmd = options["--sg_persist-path"] + " -n -i " + opts + "-r -d " + dev
|
||||||
|
out = run_cmd(options, cmd)
|
||||||
|
- if out["err"]:
|
||||||
|
+ if out["err"] and fail:
|
||||||
|
fail_usage("Cannot get reservation key")
|
||||||
|
match = re.search(r"\s+key=0x(\S+)\s+", out["out"], re.IGNORECASE)
|
||||||
|
return match.group(1) if match else None
|
||||||
|
@@ -257,6 +259,7 @@ def dev_write(dev, options):
|
||||||
|
f = open(file_path, "a+")
|
||||||
|
except IOError:
|
||||||
|
fail_usage("Failed: Cannot open file \""+ file_path + "\"")
|
||||||
|
+ f.seek(0)
|
||||||
|
out = f.read()
|
||||||
|
if not re.search(r"^" + dev + "\s+", out, flags=re.MULTILINE):
|
||||||
|
f.write(dev + "\n")
|
||||||
|
@@ -277,11 +280,6 @@ def dev_read(fail=True):
|
||||||
|
return devs
|
||||||
|
|
||||||
|
|
||||||
|
-def dev_delete(options):
|
||||||
|
- file_path = options["store_path"] + ".dev"
|
||||||
|
- os.remove(file_path) if os.path.exists(file_path) else None
|
||||||
|
-
|
||||||
|
-
|
||||||
|
def get_clvm_devices(options):
|
||||||
|
devs = []
|
||||||
|
cmd = options["--vgs-path"] + " " +\
|
@ -0,0 +1,23 @@
|
|||||||
|
From 2d0057dabae0b4cd4394fec5a60a3f649c8e3d2b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Wed, 1 Jul 2020 13:18:26 +0200
|
||||||
|
Subject: [PATCH] fence_mpath: allow spaces for comma-separated devices and add
|
||||||
|
support for space-separated devices
|
||||||
|
|
||||||
|
---
|
||||||
|
agents/mpath/fence_mpath.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py
|
||||||
|
index a3d9fe23..bc15aae2 100644
|
||||||
|
--- a/agents/mpath/fence_mpath.py
|
||||||
|
+++ b/agents/mpath/fence_mpath.py
|
||||||
|
@@ -297,7 +297,7 @@ def main():
|
||||||
|
if not ("--devices" in options and options["--devices"]):
|
||||||
|
fail_usage("Failed: No devices found")
|
||||||
|
|
||||||
|
- options["devices"] = options["--devices"].split(",")
|
||||||
|
+ options["devices"] = [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d]
|
||||||
|
# Input control END
|
||||||
|
|
||||||
|
result = fence_action(None, options, set_status, get_status)
|
File diff suppressed because it is too large
Load Diff
145
SOURCES/bz1861926-fence_lpar-fix-list-status-action.patch
Normal file
145
SOURCES/bz1861926-fence_lpar-fix-list-status-action.patch
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
From 6d0b2cb598135b697ee583e3514aa427fc0e4cf8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Reid Wahl <nrwahl@protonmail.com>
|
||||||
|
Date: Wed, 29 Jul 2020 18:33:17 -0700
|
||||||
|
Subject: [PATCH 1/2] fence_lpar: Fix list-status action
|
||||||
|
|
||||||
|
The `list-status` action prints "UNKNOWN" status for all LPARs when
|
||||||
|
`--hmc-version` is `"4"` or `"IVM"`.
|
||||||
|
|
||||||
|
This commit fixes that by mapping the statuses returned by the HMC
|
||||||
|
(e.g., "Running") to the statuses that the fencing library expects
|
||||||
|
(e.g., "on").
|
||||||
|
|
||||||
|
Resolves: RHBZ#1861926
|
||||||
|
|
||||||
|
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
|
||||||
|
---
|
||||||
|
agents/lpar/fence_lpar.py | 27 +++++++++++++++------------
|
||||||
|
1 file changed, 15 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py
|
||||||
|
index 9dfabc43..03068466 100644
|
||||||
|
--- a/agents/lpar/fence_lpar.py
|
||||||
|
+++ b/agents/lpar/fence_lpar.py
|
||||||
|
@@ -16,6 +16,16 @@
|
||||||
|
from fencing import *
|
||||||
|
from fencing import fail, fail_usage, EC_STATUS_HMC
|
||||||
|
|
||||||
|
+##
|
||||||
|
+## Transformation to standard ON/OFF status if possible
|
||||||
|
+def _normalize_status(status):
|
||||||
|
+ if status in ["Running", "Open Firmware", "Shutting Down", "Starting"]:
|
||||||
|
+ status = "on"
|
||||||
|
+ else:
|
||||||
|
+ status = "off"
|
||||||
|
+
|
||||||
|
+ return status
|
||||||
|
+
|
||||||
|
def get_power_status(conn, options):
|
||||||
|
if options["--hmc-version"] == "3":
|
||||||
|
conn.send("lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--plug"] + " -F name,state\n")
|
||||||
|
@@ -42,14 +52,7 @@ def get_power_status(conn, options):
|
||||||
|
except AttributeError:
|
||||||
|
fail(EC_STATUS_HMC)
|
||||||
|
|
||||||
|
- ##
|
||||||
|
- ## Transformation to standard ON/OFF status if possible
|
||||||
|
- if status in ["Running", "Open Firmware", "Shutting Down", "Starting"]:
|
||||||
|
- status = "on"
|
||||||
|
- else:
|
||||||
|
- status = "off"
|
||||||
|
-
|
||||||
|
- return status
|
||||||
|
+ return _normalize_status(status)
|
||||||
|
|
||||||
|
def set_power_status(conn, options):
|
||||||
|
if options["--hmc-version"] == "3":
|
||||||
|
@@ -111,10 +114,10 @@ def get_lpar_list(conn, options):
|
||||||
|
lines = res.group(1).split("\n")
|
||||||
|
for outlet_line in lines:
|
||||||
|
try:
|
||||||
|
- (port, status) = outlet_line.split(":")
|
||||||
|
+ (port, status) = outlet_line.rstrip().split(":")
|
||||||
|
except ValueError:
|
||||||
|
fail_usage('Output does not match expected HMC version, try different one');
|
||||||
|
- outlets[port] = ("", status)
|
||||||
|
+ outlets[port] = ("", _normalize_status(status))
|
||||||
|
elif options["--hmc-version"] == "IVM":
|
||||||
|
conn.send("lssyscfg -r lpar -m " + options["--managed"] +
|
||||||
|
" -F name,state\n")
|
||||||
|
@@ -133,10 +136,10 @@ def get_lpar_list(conn, options):
|
||||||
|
lines = res.group(1).split("\n")
|
||||||
|
for outlet_line in lines:
|
||||||
|
try:
|
||||||
|
- (port, status) = outlet_line.split(",")
|
||||||
|
+ (port, status) = outlet_line.rstrip().split(",")
|
||||||
|
except ValueError:
|
||||||
|
fail_usage('Output does not match expected HMC version, try different one');
|
||||||
|
- outlets[port] = ("", status)
|
||||||
|
+ outlets[port] = ("", _normalize_status(status))
|
||||||
|
|
||||||
|
return outlets
|
||||||
|
|
||||||
|
|
||||||
|
From 4f7b40c0cde896f2f5b09e796ba34450e90aee6c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Reid Wahl <nrwahl@protonmail.com>
|
||||||
|
Date: Wed, 29 Jul 2020 18:43:47 -0700
|
||||||
|
Subject: [PATCH 2/2] fence_lpar: Reduce code duplication in get_lpar_list
|
||||||
|
|
||||||
|
The logic for HMC version 4 and HMC version IVM are the same except for
|
||||||
|
the use of a different separator character. This commit condenses them
|
||||||
|
into one block.
|
||||||
|
|
||||||
|
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
|
||||||
|
---
|
||||||
|
agents/lpar/fence_lpar.py | 28 ++++------------------------
|
||||||
|
1 file changed, 4 insertions(+), 24 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py
|
||||||
|
index 03068466..7560a82c 100644
|
||||||
|
--- a/agents/lpar/fence_lpar.py
|
||||||
|
+++ b/agents/lpar/fence_lpar.py
|
||||||
|
@@ -96,31 +96,11 @@ def get_lpar_list(conn, options):
|
||||||
|
lines = res.group(2).split("\n")
|
||||||
|
for outlet_line in lines:
|
||||||
|
outlets[outlet_line.rstrip()] = ("", "")
|
||||||
|
- elif options["--hmc-version"] == "4":
|
||||||
|
- conn.send("lssyscfg -r lpar -m " + options["--managed"] +
|
||||||
|
- " -F name:state\n")
|
||||||
|
-
|
||||||
|
- ## We have to remove first line (command)
|
||||||
|
- conn.readline()
|
||||||
|
- conn.log_expect(options["--command-prompt"], int(options["--power-timeout"]))
|
||||||
|
-
|
||||||
|
- ## We have to remove last line (part of new prompt)
|
||||||
|
- ####
|
||||||
|
- res = re.search("^(.*)\n.*$", conn.before, re.S)
|
||||||
|
-
|
||||||
|
- if res == None:
|
||||||
|
- fail_usage("Unable to parse output of list command")
|
||||||
|
+ elif options["--hmc-version"] in ["4", "IVM"]:
|
||||||
|
+ sep = ":" if options["--hmc-version"] == "4" else ","
|
||||||
|
|
||||||
|
- lines = res.group(1).split("\n")
|
||||||
|
- for outlet_line in lines:
|
||||||
|
- try:
|
||||||
|
- (port, status) = outlet_line.rstrip().split(":")
|
||||||
|
- except ValueError:
|
||||||
|
- fail_usage('Output does not match expected HMC version, try different one');
|
||||||
|
- outlets[port] = ("", _normalize_status(status))
|
||||||
|
- elif options["--hmc-version"] == "IVM":
|
||||||
|
conn.send("lssyscfg -r lpar -m " + options["--managed"] +
|
||||||
|
- " -F name,state\n")
|
||||||
|
+ " -F name" + sep + "state\n")
|
||||||
|
|
||||||
|
## We have to remove first line (command)
|
||||||
|
conn.readline()
|
||||||
|
@@ -136,7 +116,7 @@ def get_lpar_list(conn, options):
|
||||||
|
lines = res.group(1).split("\n")
|
||||||
|
for outlet_line in lines:
|
||||||
|
try:
|
||||||
|
- (port, status) = outlet_line.rstrip().split(",")
|
||||||
|
+ (port, status) = outlet_line.rstrip().split(sep)
|
||||||
|
except ValueError:
|
||||||
|
fail_usage('Output does not match expected HMC version, try different one');
|
||||||
|
outlets[port] = ("", _normalize_status(status))
|
36
SOURCES/bz1906978-fence_gce-default-to-onoff.patch
Normal file
36
SOURCES/bz1906978-fence_gce-default-to-onoff.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 6f1743a7c34b00b0d1602675598ae22a2a3de6b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Thu, 14 Jan 2021 15:11:14 +0100
|
||||||
|
Subject: [PATCH] fence_gce: default to onoff
|
||||||
|
|
||||||
|
---
|
||||||
|
agents/gce/fence_gce.py | 2 --
|
||||||
|
tests/data/metadata/fence_gce.xml | 2 +-
|
||||||
|
2 files changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py
|
||||||
|
index bf5f5693..84cf3634 100644
|
||||||
|
--- a/agents/gce/fence_gce.py
|
||||||
|
+++ b/agents/gce/fence_gce.py
|
||||||
|
@@ -334,8 +334,6 @@ def main():
|
||||||
|
define_new_opts()
|
||||||
|
|
||||||
|
all_opt["power_timeout"]["default"] = "60"
|
||||||
|
- all_opt["method"]["default"] = "cycle"
|
||||||
|
- all_opt["method"]["help"] = "-m, --method=[method] Method to fence (onoff|cycle) (Default: cycle)"
|
||||||
|
|
||||||
|
options = check_input(device_opt, process_input(device_opt))
|
||||||
|
|
||||||
|
diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml
|
||||||
|
index 33478721..77812ffb 100644
|
||||||
|
--- a/tests/data/metadata/fence_gce.xml
|
||||||
|
+++ b/tests/data/metadata/fence_gce.xml
|
||||||
|
@@ -12,7 +12,7 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui
|
||||||
|
</parameter>
|
||||||
|
<parameter name="method" unique="0" required="0">
|
||||||
|
<getopt mixed="-m, --method=[method]" />
|
||||||
|
- <content type="select" default="cycle" >
|
||||||
|
+ <content type="select" default="onoff" >
|
||||||
|
<option value="onoff" />
|
||||||
|
<option value="cycle" />
|
||||||
|
</content>
|
23
SOURCES/bz1914313-fence_zvmip-fix-disable-timeout.patch
Normal file
23
SOURCES/bz1914313-fence_zvmip-fix-disable-timeout.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From 900afe24edf0f400e9f1ed9b4df66e62cfee380e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Fri, 8 Jan 2021 16:16:59 +0100
|
||||||
|
Subject: [PATCH] fence_zvmip: fix shell-timeout when using new disable-timeout
|
||||||
|
parameter
|
||||||
|
|
||||||
|
---
|
||||||
|
agents/zvm/fence_zvmip.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py
|
||||||
|
index 5b272bb9..001106a4 100644
|
||||||
|
--- a/agents/zvm/fence_zvmip.py
|
||||||
|
+++ b/agents/zvm/fence_zvmip.py
|
||||||
|
@@ -28,7 +28,7 @@ def open_socket(options):
|
||||||
|
|
||||||
|
conn = socket.socket()
|
||||||
|
conn.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||||
|
- conn.settimeout(float(options["--shell-timeout"]))
|
||||||
|
+ conn.settimeout(float(options["--shell-timeout"]) or None)
|
||||||
|
try:
|
||||||
|
conn.connect(addr)
|
||||||
|
except socket.error:
|
@ -29,7 +29,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.2.1
|
Version: 4.2.1
|
||||||
Release: 53%{?alphatag:.%{alphatag}}%{?dist}.2
|
Release: 65%{?alphatag:.%{alphatag}}%{?dist}
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: https://github.com/ClusterLabs/fence-agents
|
URL: https://github.com/ClusterLabs/fence-agents
|
||||||
@ -110,7 +110,18 @@ Patch68: bz1796654-fence_vmware_soap-log-exception-message-for-SSLError.patch
|
|||||||
Patch69: bz1793739-fence_vmware_rest-3-fix-encode-issue.patch
|
Patch69: bz1793739-fence_vmware_rest-3-fix-encode-issue.patch
|
||||||
Patch70: bz1860544-fence_lpar-fix-long-user-host-issue.patch
|
Patch70: bz1860544-fence_lpar-fix-long-user-host-issue.patch
|
||||||
Patch71: bz1859932-fence_evacuate-support-private-flavors.patch
|
Patch71: bz1859932-fence_evacuate-support-private-flavors.patch
|
||||||
Patch72: bz1905595-fence_aws-add-imdsv2-support.patch
|
Patch72: bz1818157-fence_azure_arm-fix-MSI-support.patch
|
||||||
|
Patch73: bz1851115-fence_mpath-support-comma-and-space-separated-devices.patch
|
||||||
|
Patch74: bz1853973-fence_ipmilan-allow-increasing-ipmitool-verbosity.patch
|
||||||
|
Patch75: bz1861926-fence_lpar-fix-list-status-action.patch
|
||||||
|
Patch76: bz1470813-fencing-1-disable-timeout.patch
|
||||||
|
Patch77: bz1470813-fencing-2-fix-power-timeout.patch
|
||||||
|
Patch78: bz1470813-fencing-3-make-timeout-0-mean-forever.patch
|
||||||
|
Patch79: bz1470813-fencing-4-make-timeout-0-mean-forever.patch
|
||||||
|
Patch80: bz1841087-fence_scsi-dont-write-key-device-to-file.patch
|
||||||
|
Patch81: bz1896827-fence_aws-add-imdsv2-support.patch
|
||||||
|
Patch82: bz1914313-fence_zvmip-fix-disable-timeout.patch
|
||||||
|
Patch83: bz1906978-fence_gce-default-to-onoff.patch
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
%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 kdump lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti
|
%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 kdump lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti
|
||||||
@ -261,6 +272,17 @@ BuildRequires: python3-google-api-client
|
|||||||
%patch70 -p1
|
%patch70 -p1
|
||||||
%patch71 -p1
|
%patch71 -p1
|
||||||
%patch72 -p1
|
%patch72 -p1
|
||||||
|
%patch73 -p1
|
||||||
|
%patch74 -p1
|
||||||
|
%patch75 -p1
|
||||||
|
%patch76 -p1
|
||||||
|
%patch77 -p1
|
||||||
|
%patch78 -p1
|
||||||
|
%patch79 -p1
|
||||||
|
%patch80 -p1
|
||||||
|
%patch81 -p1
|
||||||
|
%patch82 -p1
|
||||||
|
%patch83 -p1
|
||||||
|
|
||||||
# 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
|
||||||
@ -1130,13 +1152,40 @@ Fence agent for IBM z/VM over IP.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Dec 9 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-53.2
|
* Tue Feb 2 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-65
|
||||||
- fence_aws: add support for IMDSv2
|
- fence_gce: default to onoff
|
||||||
Resolves: rhbz#1905595
|
Resolves: rhbz#1906978
|
||||||
|
|
||||||
* Tue Sep 29 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-53.1
|
* Mon Jan 11 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-63
|
||||||
|
- fence_zvmip: fix disable-timeout not working correctly
|
||||||
|
Resolves: rhbz#1914313
|
||||||
|
|
||||||
|
* Fri Nov 13 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-62
|
||||||
|
- fence_aws: add support for IMDSv2
|
||||||
|
Resolves: rhbz#1896827
|
||||||
|
|
||||||
|
* Tue Nov 10 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-61
|
||||||
|
- fence_scsi: dont write key to device if it's already registered,
|
||||||
|
and dont write device to file when cluster is started again
|
||||||
|
Resolves: rhbz#1841087
|
||||||
|
|
||||||
|
* Thu Nov 5 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-59
|
||||||
|
- fencing: add disable-timeout parameter and make it true by default
|
||||||
|
for Pacemaker 2.0+
|
||||||
|
Resolves: rhbz#1470813, rhbz#1436429
|
||||||
|
|
||||||
|
* Mon Sep 14 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-54
|
||||||
|
- fence_azure_arm: fix MSI support
|
||||||
|
Resolves: rhbz#1818157
|
||||||
|
- fence_mpath: allow spaces for comma-separated devices and add
|
||||||
|
support for space-separated devices
|
||||||
|
Resolves: rhbz#1851115
|
||||||
|
- fence_ipmilan: add ability to increase ipmitool verbosity
|
||||||
|
Resolves: rhbz#1853973
|
||||||
|
- fence_lpar: fix list-status action
|
||||||
|
Resolves: rhbz#1861926
|
||||||
- all agents: make telnet a weak dependency
|
- all agents: make telnet a weak dependency
|
||||||
Resolves: rhbz#1883420
|
Resolves: rhbz#1851232
|
||||||
|
|
||||||
* Fri Aug 7 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-53
|
* Fri Aug 7 2020 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-53
|
||||||
- fence_evacuate: enable evacuation of instances using private flavors
|
- fence_evacuate: enable evacuation of instances using private flavors
|
||||||
|
Loading…
Reference in New Issue
Block a user