From 8e36eaeaece599778f6c4de05fed2038c5f4518e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 06 2021 14:16:25 +0000 Subject: import fence-agents-4.2.1-69.el8 --- diff --git a/SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch b/SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch new file mode 100644 index 0000000..4151486 --- /dev/null +++ b/SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch @@ -0,0 +1,47 @@ +From b322891e91649d47656d63c73a0e08e9627f0b38 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Wed, 28 Apr 2021 12:20:07 +0200 +Subject: [PATCH] fencing: add stonith_status_sleep parameter for sleep between + status calls during a STONITH action + +--- + lib/fencing.py.py | 13 +++++++++++-- + 76 files changed, 386 insertions(+), 2 deletions(-) + +diff --git a/lib/fencing.py.py b/lib/fencing.py.py +index 9654f57be..bd7f529f7 100644 +--- a/lib/fencing.py.py ++++ b/lib/fencing.py.py +@@ -367,6 +367,14 @@ + "default" : "0", + "required" : "0", + "order" : 200}, ++ "stonith_status_sleep" : { ++ "getopt" : ":", ++ "longopt" : "stonith-status-sleep", ++ "type" : "second", ++ "help" : "--stonith-status-sleep=[seconds] Sleep X seconds between status calls during a STONITH action", ++ "default" : "1", ++ "required" : "0", ++ "order" : 200}, + "missing_as_off" : { + "getopt" : "", + "longopt" : "missing-as-off", +@@ -478,7 +486,8 @@ + "default" : ["help", "debug", "verbose", "verbose_level", + "version", "action", "agent", "power_timeout", + "shell_timeout", "login_timeout", "disable_timeout", +- "power_wait", "retry_on", "delay", "quiet"], ++ "power_wait", "stonith_status_sleep", "retry_on", "delay", ++ "quiet"], + "passwd" : ["passwd_script"], + "sudo" : ["sudo_path"], + "secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"], +@@ -828,7 +837,7 @@ def async_set_multi_power_fn(connection, options, set_power_fn, get_power_fn, re + + for _ in itertools.count(1): + if get_multi_power_fn(connection, options, get_power_fn) != options["--action"]: +- time.sleep(1) ++ time.sleep(int(options["--stonith-status-sleep"])) + else: + return True diff --git a/SOURCES/bz1780825-fencing-2-metadata-fix-long-parameters.patch b/SOURCES/bz1780825-fencing-2-metadata-fix-long-parameters.patch new file mode 100644 index 0000000..5aea6f9 --- /dev/null +++ b/SOURCES/bz1780825-fencing-2-metadata-fix-long-parameters.patch @@ -0,0 +1,22 @@ +From 199b5e8a63d8b3457262751b7fbe187f92b38e73 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 4 May 2021 09:33:34 +0200 +Subject: [PATCH] fencing: fix issue with hardcoded help text length for + metadata + +--- + lib/fencing.py.py | 2 +- + 77 files changed, 153 insertions(+), 153 deletions(-) + +diff --git a/lib/fencing.py.py b/lib/fencing.py.py +index bd7f529f7..b0ddde850 100644 +--- a/lib/fencing.py.py ++++ b/lib/fencing.py.py +@@ -641,7 +641,7 @@ def metadata(options, avail_opt, docs): + mixed = _encode_html_entities(mixed) + + if not "shortdesc" in opt: +- shortdesc = re.sub("\s\s+", " ", opt["help"][31:]) ++ shortdesc = re.sub(".*\s\s+", "", opt["help"][31:]) + else: + shortdesc = opt["shortdesc"] diff --git a/SOURCES/bz1780825-fencing-add-stonith_status_sleep.patch b/SOURCES/bz1780825-fencing-add-stonith_status_sleep.patch deleted file mode 100644 index 4151486..0000000 --- a/SOURCES/bz1780825-fencing-add-stonith_status_sleep.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b322891e91649d47656d63c73a0e08e9627f0b38 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 28 Apr 2021 12:20:07 +0200 -Subject: [PATCH] fencing: add stonith_status_sleep parameter for sleep between - status calls during a STONITH action - ---- - lib/fencing.py.py | 13 +++++++++++-- - 76 files changed, 386 insertions(+), 2 deletions(-) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 9654f57be..bd7f529f7 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -367,6 +367,14 @@ - "default" : "0", - "required" : "0", - "order" : 200}, -+ "stonith_status_sleep" : { -+ "getopt" : ":", -+ "longopt" : "stonith-status-sleep", -+ "type" : "second", -+ "help" : "--stonith-status-sleep=[seconds] Sleep X seconds between status calls during a STONITH action", -+ "default" : "1", -+ "required" : "0", -+ "order" : 200}, - "missing_as_off" : { - "getopt" : "", - "longopt" : "missing-as-off", -@@ -478,7 +486,8 @@ - "default" : ["help", "debug", "verbose", "verbose_level", - "version", "action", "agent", "power_timeout", - "shell_timeout", "login_timeout", "disable_timeout", -- "power_wait", "retry_on", "delay", "quiet"], -+ "power_wait", "stonith_status_sleep", "retry_on", "delay", -+ "quiet"], - "passwd" : ["passwd_script"], - "sudo" : ["sudo_path"], - "secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"], -@@ -828,7 +837,7 @@ def async_set_multi_power_fn(connection, options, set_power_fn, get_power_fn, re - - for _ in itertools.count(1): - if get_multi_power_fn(connection, options, get_power_fn) != options["--action"]: -- time.sleep(1) -+ time.sleep(int(options["--stonith-status-sleep"])) - else: - return True diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index a0fa4a0..c355db6 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -29,7 +29,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.2.1 -Release: 68%{?alphatag:.%{alphatag}}%{?dist} +Release: 69%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -125,7 +125,8 @@ Patch83: bz1906978-fence_gce-default-to-onoff.patch Patch84: bz1925015-fence_ipmilan-add-fence_ipmilanplus.patch Patch85: bz1920947-fence_redfish-add-diag-action.patch Patch86: bz1941989-fence_aws-add-filter-parameter.patch -Patch87: bz1780825-fencing-add-stonith_status_sleep.patch +Patch87: bz1780825-fencing-1-add-stonith_status_sleep.patch +Patch88: bz1780825-fencing-2-metadata-fix-long-parameters.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 hds_cb 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 @@ -291,6 +292,7 @@ BuildRequires: python3-google-api-client %patch85 -p1 %patch86 -p1 -F1 %patch87 -p1 +%patch88 -p1 # prevent compilation of something that won't get used anyway sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac @@ -1181,10 +1183,12 @@ Fence agent for IBM z/VM over IP. %endif %changelog -* Fri Apr 30 2021 Oyvind Albrigtsen - 4.2.1-68 +* Tue May 4 2021 Oyvind Albrigtsen - 4.2.1-69 - fencing: add "stonith_status_sleep" parameter to set sleep between status calls during STONITH action Resolves: rhbz#1780825 + +* Fri Apr 30 2021 Oyvind Albrigtsen - 4.2.1-68 - fence_aws: add "filter" parameter Resolves: rhbz#1941989