From e15206b03ada8a94797f1909203eadaa7d48766e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 30 2021 16:10:53 +0000 Subject: import fence-agents-4.2.1-65.el8 --- diff --git a/SOURCES/bz1470813-fencing-1-disable-timeout.patch b/SOURCES/bz1470813-fencing-1-disable-timeout.patch new file mode 100644 index 0000000..28dc70f --- /dev/null +++ b/SOURCES/bz1470813-fencing-1-disable-timeout.patch @@ -0,0 +1,1233 @@ +From c9e44928d5818bb6c609756bf3ac936afce22610 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Fri, 7 Aug 2020 16:08:47 +0200 +Subject: [PATCH 1/2] fencing: add disable-timeout parameter, and make it + default when run from Pacemaker (at least 2.0+) + +--- + lib/fencing.py.py | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/lib/fencing.py.py b/lib/fencing.py.py +index 63b13036..4a41af02 100644 +--- a/lib/fencing.py.py ++++ b/lib/fencing.py.py +@@ -351,6 +351,12 @@ + "default" : "20", + "required" : "0", + "order" : 200}, ++ "disable_timeout" : { ++ "getopt" : ":", ++ "longopt" : "disable-timeout", ++ "help" : "--disable-timeout=[true/false] Disable timeout (true/false) (default: true when run from Pacemaker 2.0+)", ++ "required" : "0", ++ "order" : 200}, + "power_wait" : { + "getopt" : ":", + "longopt" : "power-wait", +@@ -469,8 +475,8 @@ + DEPENDENCY_OPT = { + "default" : ["help", "debug", "verbose", "verbose_level", + "version", "action", "agent", "power_timeout", +- "shell_timeout", "login_timeout", "power_wait", +- "retry_on", "delay", "quiet"], ++ "shell_timeout", "login_timeout", "disable_timeout", ++ "power_wait", "retry_on", "delay", "quiet"], + "passwd" : ["passwd_script"], + "sudo" : ["sudo_path"], + "secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"], +@@ -769,6 +775,12 @@ def check_input(device_opt, opt, other_conditions = False): + if "--password-script" in options: + options["--password"] = os.popen(options["--password-script"]).read().rstrip() + ++ if os.environ.get("PCMK_service") == "pacemaker-fenced" and "--disable-timeout" not in options: ++ options["--disable-timeout"] = "1" ++ ++ if options.get("--disable-timeout", "").lower() in ["1", "yes", "on", "true"]: ++ options["--power-timeout"] = options["--shell-timeout"] = options["--login-timeout"] = 0 ++ + return options + + ## Obtain a power status from possibly more than one plug + +From 3ca4f45d0d32204fc4346a445720a8b894243604 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 6 Oct 2020 15:05:42 +0200 +Subject: [PATCH 2/2] metadata: update for disable_timeout parameter + +--- + tests/data/metadata/fence_aliyun.xml | 5 +++++ + tests/data/metadata/fence_alom.xml | 5 +++++ + tests/data/metadata/fence_amt.xml | 5 +++++ + tests/data/metadata/fence_amt_ws.xml | 5 +++++ + tests/data/metadata/fence_apc.xml | 5 +++++ + tests/data/metadata/fence_apc_snmp.xml | 5 +++++ + tests/data/metadata/fence_aws.xml | 5 +++++ + tests/data/metadata/fence_azure_arm.xml | 5 +++++ + tests/data/metadata/fence_bladecenter.xml | 5 +++++ + tests/data/metadata/fence_brocade.xml | 5 +++++ + tests/data/metadata/fence_cisco_mds.xml | 5 +++++ + tests/data/metadata/fence_cisco_ucs.xml | 5 +++++ + tests/data/metadata/fence_compute.xml | 5 +++++ + tests/data/metadata/fence_docker.xml | 5 +++++ + tests/data/metadata/fence_drac.xml | 5 +++++ + tests/data/metadata/fence_drac5.xml | 5 +++++ + tests/data/metadata/fence_dummy.xml | 5 +++++ + tests/data/metadata/fence_eaton_snmp.xml | 5 +++++ + tests/data/metadata/fence_emerson.xml | 5 +++++ + tests/data/metadata/fence_eps.xml | 5 +++++ + tests/data/metadata/fence_evacuate.xml | 5 +++++ + tests/data/metadata/fence_gce.xml | 5 +++++ + tests/data/metadata/fence_hds_cb.xml | 5 +++++ + tests/data/metadata/fence_heuristics_ping.xml | 5 +++++ + tests/data/metadata/fence_hpblade.xml | 5 +++++ + tests/data/metadata/fence_ibmblade.xml | 5 +++++ + tests/data/metadata/fence_idrac.xml | 5 +++++ + tests/data/metadata/fence_ifmib.xml | 5 +++++ + tests/data/metadata/fence_ilo.xml | 5 +++++ + tests/data/metadata/fence_ilo2.xml | 5 +++++ + tests/data/metadata/fence_ilo3.xml | 5 +++++ + tests/data/metadata/fence_ilo3_ssh.xml | 5 +++++ + tests/data/metadata/fence_ilo4.xml | 5 +++++ + tests/data/metadata/fence_ilo4_ssh.xml | 5 +++++ + tests/data/metadata/fence_ilo_moonshot.xml | 5 +++++ + tests/data/metadata/fence_ilo_mp.xml | 5 +++++ + tests/data/metadata/fence_ilo_ssh.xml | 5 +++++ + tests/data/metadata/fence_imm.xml | 5 +++++ + tests/data/metadata/fence_intelmodular.xml | 5 +++++ + tests/data/metadata/fence_ipdu.xml | 5 +++++ + tests/data/metadata/fence_ipmilan.xml | 5 +++++ + tests/data/metadata/fence_ironic.xml | 5 +++++ + tests/data/metadata/fence_ldom.xml | 5 +++++ + tests/data/metadata/fence_lpar.xml | 5 +++++ + tests/data/metadata/fence_mpath.xml | 5 +++++ + tests/data/metadata/fence_netio.xml | 5 +++++ + tests/data/metadata/fence_openstack.xml | 5 +++++ + tests/data/metadata/fence_ovh.xml | 5 +++++ + tests/data/metadata/fence_powerman.xml | 5 +++++ + tests/data/metadata/fence_pve.xml | 5 +++++ + tests/data/metadata/fence_raritan.xml | 5 +++++ + tests/data/metadata/fence_rcd_serial.xml | 5 +++++ + tests/data/metadata/fence_redfish.xml | 5 +++++ + tests/data/metadata/fence_rhevm.xml | 5 +++++ + tests/data/metadata/fence_rsa.xml | 5 +++++ + tests/data/metadata/fence_rsb.xml | 5 +++++ + tests/data/metadata/fence_sanbox2.xml | 5 +++++ + tests/data/metadata/fence_sbd.xml | 5 +++++ + tests/data/metadata/fence_scsi.xml | 5 +++++ + tests/data/metadata/fence_tripplite_snmp.xml | 5 +++++ + tests/data/metadata/fence_vbox.xml | 5 +++++ + tests/data/metadata/fence_virsh.xml | 5 +++++ + tests/data/metadata/fence_vmware.xml | 5 +++++ + tests/data/metadata/fence_vmware_rest.xml | 5 +++++ + tests/data/metadata/fence_vmware_soap.xml | 5 +++++ + tests/data/metadata/fence_vmware_vcloud.xml | 5 +++++ + tests/data/metadata/fence_wti.xml | 5 +++++ + tests/data/metadata/fence_xenapi.xml | 5 +++++ + tests/data/metadata/fence_zvmip.xml | 5 +++++ + 73 files changed, 365 insertions(+) + +diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml +index 8f236806..d90acf71 100644 +--- a/tests/data/metadata/fence_aliyun.xml ++++ b/tests/data/metadata/fence_aliyun.xml +@@ -83,6 +83,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml +index ef6c06c3..91679e8e 100644 +--- a/tests/data/metadata/fence_alom.xml ++++ b/tests/data/metadata/fence_alom.xml +@@ -143,6 +143,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml +index ee174852..f2e7ac69 100644 +--- a/tests/data/metadata/fence_amt.xml ++++ b/tests/data/metadata/fence_amt.xml +@@ -116,6 +116,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_amt_ws.xml b/tests/data/metadata/fence_amt_ws.xml +index 9c223c8d..e6e03ea8 100644 +--- a/tests/data/metadata/fence_amt_ws.xml ++++ b/tests/data/metadata/fence_amt_ws.xml +@@ -112,6 +112,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_apc.xml b/tests/data/metadata/fence_apc.xml +index efad9db8..2ee96f32 100644 +--- a/tests/data/metadata/fence_apc.xml ++++ b/tests/data/metadata/fence_apc.xml +@@ -153,6 +153,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_apc_snmp.xml b/tests/data/metadata/fence_apc_snmp.xml +index a1947672..435f96dc 100644 +--- a/tests/data/metadata/fence_apc_snmp.xml ++++ b/tests/data/metadata/fence_apc_snmp.xml +@@ -158,6 +158,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml +index 527fc86c..1f3ab3b9 100644 +--- a/tests/data/metadata/fence_aws.xml ++++ b/tests/data/metadata/fence_aws.xml +@@ -86,6 +86,11 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml +index 42c9952f..7e55863b 100644 +--- a/tests/data/metadata/fence_azure_arm.xml ++++ b/tests/data/metadata/fence_azure_arm.xml +@@ -143,6 +143,11 @@ When using network fencing the reboot-action will cause a quick-return once the + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_bladecenter.xml b/tests/data/metadata/fence_bladecenter.xml +index f2ee28b1..6ff6bee7 100644 +--- a/tests/data/metadata/fence_bladecenter.xml ++++ b/tests/data/metadata/fence_bladecenter.xml +@@ -148,6 +148,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_brocade.xml b/tests/data/metadata/fence_brocade.xml +index f3287503..2cfa7594 100644 +--- a/tests/data/metadata/fence_brocade.xml ++++ b/tests/data/metadata/fence_brocade.xml +@@ -148,6 +148,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml +index a0e62cba..4f744f0a 100644 +--- a/tests/data/metadata/fence_cisco_mds.xml ++++ b/tests/data/metadata/fence_cisco_mds.xml +@@ -157,6 +157,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml +index f4543f4b..a57a8486 100644 +--- a/tests/data/metadata/fence_cisco_ucs.xml ++++ b/tests/data/metadata/fence_cisco_ucs.xml +@@ -133,6 +133,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml +index a5ce53cd..0589c146 100644 +--- a/tests/data/metadata/fence_compute.xml ++++ b/tests/data/metadata/fence_compute.xml +@@ -168,6 +168,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml +index 6e3306d4..789f6c71 100644 +--- a/tests/data/metadata/fence_docker.xml ++++ b/tests/data/metadata/fence_docker.xml +@@ -121,6 +121,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml +index 451ee504..1179727a 100644 +--- a/tests/data/metadata/fence_drac.xml ++++ b/tests/data/metadata/fence_drac.xml +@@ -113,6 +113,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_drac5.xml b/tests/data/metadata/fence_drac5.xml +index 564008ab..9a3c0c1e 100644 +--- a/tests/data/metadata/fence_drac5.xml ++++ b/tests/data/metadata/fence_drac5.xml +@@ -157,6 +157,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_dummy.xml b/tests/data/metadata/fence_dummy.xml +index ec4d5b46..5287ec59 100644 +--- a/tests/data/metadata/fence_dummy.xml ++++ b/tests/data/metadata/fence_dummy.xml +@@ -63,6 +63,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_eaton_snmp.xml b/tests/data/metadata/fence_eaton_snmp.xml +index 1ec07c68..d2260308 100644 +--- a/tests/data/metadata/fence_eaton_snmp.xml ++++ b/tests/data/metadata/fence_eaton_snmp.xml +@@ -157,6 +157,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml +index fbdcbcde..870e363a 100644 +--- a/tests/data/metadata/fence_emerson.xml ++++ b/tests/data/metadata/fence_emerson.xml +@@ -157,6 +157,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml +index 47cad6f0..2e710249 100644 +--- a/tests/data/metadata/fence_eps.xml ++++ b/tests/data/metadata/fence_eps.xml +@@ -120,6 +120,11 @@ Agent basically works by connecting to hidden page and pass appropriate argument + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_evacuate.xml b/tests/data/metadata/fence_evacuate.xml +index f32b48eb..bf34df2e 100644 +--- a/tests/data/metadata/fence_evacuate.xml ++++ b/tests/data/metadata/fence_evacuate.xml +@@ -163,6 +163,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml +index 1ec1aa9e..78c0b0d6 100644 +--- a/tests/data/metadata/fence_gce.xml ++++ b/tests/data/metadata/fence_gce.xml +@@ -113,6 +113,11 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_hds_cb.xml b/tests/data/metadata/fence_hds_cb.xml +index 5529472d..e3f511dd 100644 +--- a/tests/data/metadata/fence_hds_cb.xml ++++ b/tests/data/metadata/fence_hds_cb.xml +@@ -148,6 +148,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_heuristics_ping.xml b/tests/data/metadata/fence_heuristics_ping.xml +index 53e3bb05..4336adf4 100644 +--- a/tests/data/metadata/fence_heuristics_ping.xml ++++ b/tests/data/metadata/fence_heuristics_ping.xml +@@ -88,6 +88,11 @@ This is not a fence agent by itself! Its only purpose is to enable/disable anoth + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_hpblade.xml b/tests/data/metadata/fence_hpblade.xml +index bbb51668..cdc2f85c 100644 +--- a/tests/data/metadata/fence_hpblade.xml ++++ b/tests/data/metadata/fence_hpblade.xml +@@ -148,6 +148,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ibmblade.xml b/tests/data/metadata/fence_ibmblade.xml +index 6585c4fb..b9ffbd1a 100644 +--- a/tests/data/metadata/fence_ibmblade.xml ++++ b/tests/data/metadata/fence_ibmblade.xml +@@ -157,6 +157,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml +index efecc720..c19ceefd 100644 +--- a/tests/data/metadata/fence_idrac.xml ++++ b/tests/data/metadata/fence_idrac.xml +@@ -155,6 +155,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + Path to ipmitool binary +diff --git a/tests/data/metadata/fence_ifmib.xml b/tests/data/metadata/fence_ifmib.xml +index 93bd8aa3..e0e9e0b5 100644 +--- a/tests/data/metadata/fence_ifmib.xml ++++ b/tests/data/metadata/fence_ifmib.xml +@@ -159,6 +159,11 @@ It was written with managed ethernet switches in mind, in order to fence iSCSI S + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml +index 7ed91061..691d48bc 100644 +--- a/tests/data/metadata/fence_ilo.xml ++++ b/tests/data/metadata/fence_ilo.xml +@@ -139,6 +139,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml +index 5527cf21..c43e8738 100644 +--- a/tests/data/metadata/fence_ilo2.xml ++++ b/tests/data/metadata/fence_ilo2.xml +@@ -139,6 +139,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml +index b5db044c..cf85c47f 100644 +--- a/tests/data/metadata/fence_ilo3.xml ++++ b/tests/data/metadata/fence_ilo3.xml +@@ -155,6 +155,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + Path to ipmitool binary +diff --git a/tests/data/metadata/fence_ilo3_ssh.xml b/tests/data/metadata/fence_ilo3_ssh.xml +index a3c8f11c..5433d042 100644 +--- a/tests/data/metadata/fence_ilo3_ssh.xml ++++ b/tests/data/metadata/fence_ilo3_ssh.xml +@@ -156,6 +156,11 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml +index 210b05d2..aaf3bf5a 100644 +--- a/tests/data/metadata/fence_ilo4.xml ++++ b/tests/data/metadata/fence_ilo4.xml +@@ -155,6 +155,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + Path to ipmitool binary +diff --git a/tests/data/metadata/fence_ilo4_ssh.xml b/tests/data/metadata/fence_ilo4_ssh.xml +index 9b993dd5..663853dd 100644 +--- a/tests/data/metadata/fence_ilo4_ssh.xml ++++ b/tests/data/metadata/fence_ilo4_ssh.xml +@@ -156,6 +156,11 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ilo_moonshot.xml b/tests/data/metadata/fence_ilo_moonshot.xml +index 1e31424a..c0739e1b 100644 +--- a/tests/data/metadata/fence_ilo_moonshot.xml ++++ b/tests/data/metadata/fence_ilo_moonshot.xml +@@ -148,6 +148,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml +index b825cd32..1ce0327c 100644 +--- a/tests/data/metadata/fence_ilo_mp.xml ++++ b/tests/data/metadata/fence_ilo_mp.xml +@@ -143,6 +143,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ilo_ssh.xml b/tests/data/metadata/fence_ilo_ssh.xml +index df87fd5f..8a3d5b1a 100644 +--- a/tests/data/metadata/fence_ilo_ssh.xml ++++ b/tests/data/metadata/fence_ilo_ssh.xml +@@ -156,6 +156,11 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml +index d00ad7fa..d969a4c7 100644 +--- a/tests/data/metadata/fence_imm.xml ++++ b/tests/data/metadata/fence_imm.xml +@@ -155,6 +155,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + Path to ipmitool binary +diff --git a/tests/data/metadata/fence_intelmodular.xml b/tests/data/metadata/fence_intelmodular.xml +index ed5afcb8..37d85f65 100644 +--- a/tests/data/metadata/fence_intelmodular.xml ++++ b/tests/data/metadata/fence_intelmodular.xml +@@ -159,6 +159,11 @@ Note: Since firmware update version 2.7, SNMP v2 write support is removed, and r + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ipdu.xml b/tests/data/metadata/fence_ipdu.xml +index 78575c7c..ade366c3 100644 +--- a/tests/data/metadata/fence_ipdu.xml ++++ b/tests/data/metadata/fence_ipdu.xml +@@ -157,6 +157,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml +index d4c23f73..649f5bcd 100644 +--- a/tests/data/metadata/fence_ipmilan.xml ++++ b/tests/data/metadata/fence_ipmilan.xml +@@ -155,6 +155,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + Path to ipmitool binary +diff --git a/tests/data/metadata/fence_ironic.xml b/tests/data/metadata/fence_ironic.xml +index 84beaffc..c79e1f11 100644 +--- a/tests/data/metadata/fence_ironic.xml ++++ b/tests/data/metadata/fence_ironic.xml +@@ -113,6 +113,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ldom.xml b/tests/data/metadata/fence_ldom.xml +index 4bb38571..b02b4883 100644 +--- a/tests/data/metadata/fence_ldom.xml ++++ b/tests/data/metadata/fence_ldom.xml +@@ -150,6 +150,11 @@ Very useful parameter is -c (or cmd_prompt in stdin mode). This must be set to s + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_lpar.xml b/tests/data/metadata/fence_lpar.xml +index 7ddc2c45..94e2273a 100644 +--- a/tests/data/metadata/fence_lpar.xml ++++ b/tests/data/metadata/fence_lpar.xml +@@ -162,6 +162,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml +index 83d69f6c..bf014fcd 100644 +--- a/tests/data/metadata/fence_mpath.xml ++++ b/tests/data/metadata/fence_mpath.xml +@@ -69,6 +69,11 @@ The fence_mpath agent works by having a unique key for each node that has to be + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_netio.xml b/tests/data/metadata/fence_netio.xml +index b409bde7..43aca0af 100644 +--- a/tests/data/metadata/fence_netio.xml ++++ b/tests/data/metadata/fence_netio.xml +@@ -108,6 +108,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_openstack.xml b/tests/data/metadata/fence_openstack.xml +index 645cd655..eddd8de7 100644 +--- a/tests/data/metadata/fence_openstack.xml ++++ b/tests/data/metadata/fence_openstack.xml +@@ -133,6 +133,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_ovh.xml b/tests/data/metadata/fence_ovh.xml +index e8160bf7..551007f1 100644 +--- a/tests/data/metadata/fence_ovh.xml ++++ b/tests/data/metadata/fence_ovh.xml +@@ -98,6 +98,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_powerman.xml b/tests/data/metadata/fence_powerman.xml +index 3bf56882..9df6f25b 100644 +--- a/tests/data/metadata/fence_powerman.xml ++++ b/tests/data/metadata/fence_powerman.xml +@@ -73,6 +73,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_pve.xml b/tests/data/metadata/fence_pve.xml +index 1c83f2ef..37485597 100644 +--- a/tests/data/metadata/fence_pve.xml ++++ b/tests/data/metadata/fence_pve.xml +@@ -131,6 +131,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_raritan.xml b/tests/data/metadata/fence_raritan.xml +index 537cb141..90f21b54 100644 +--- a/tests/data/metadata/fence_raritan.xml ++++ b/tests/data/metadata/fence_raritan.xml +@@ -108,6 +108,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_rcd_serial.xml b/tests/data/metadata/fence_rcd_serial.xml +index b2a20cb7..c13c81ca 100644 +--- a/tests/data/metadata/fence_rcd_serial.xml ++++ b/tests/data/metadata/fence_rcd_serial.xml +@@ -61,6 +61,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml +index 32ea402e..6daf2cd9 100644 +--- a/tests/data/metadata/fence_redfish.xml ++++ b/tests/data/metadata/fence_redfish.xml +@@ -138,6 +138,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml +index deb326c3..ba78a928 100644 +--- a/tests/data/metadata/fence_rhevm.xml ++++ b/tests/data/metadata/fence_rhevm.xml +@@ -152,6 +152,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml +index 51009427..4f7d0b93 100644 +--- a/tests/data/metadata/fence_rsa.xml ++++ b/tests/data/metadata/fence_rsa.xml +@@ -143,6 +143,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml +index 7d8575d1..6f81c6ac 100644 +--- a/tests/data/metadata/fence_rsb.xml ++++ b/tests/data/metadata/fence_rsb.xml +@@ -143,6 +143,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_sanbox2.xml b/tests/data/metadata/fence_sanbox2.xml +index bf07f360..c18beea5 100644 +--- a/tests/data/metadata/fence_sanbox2.xml ++++ b/tests/data/metadata/fence_sanbox2.xml +@@ -118,6 +118,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_sbd.xml b/tests/data/metadata/fence_sbd.xml +index db52b49a..24f648a2 100644 +--- a/tests/data/metadata/fence_sbd.xml ++++ b/tests/data/metadata/fence_sbd.xml +@@ -76,6 +76,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml +index ceb79de5..ea093c7c 100644 +--- a/tests/data/metadata/fence_scsi.xml ++++ b/tests/data/metadata/fence_scsi.xml +@@ -86,6 +86,11 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_tripplite_snmp.xml b/tests/data/metadata/fence_tripplite_snmp.xml +index becc0d18..3d104e06 100644 +--- a/tests/data/metadata/fence_tripplite_snmp.xml ++++ b/tests/data/metadata/fence_tripplite_snmp.xml +@@ -158,6 +158,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_vbox.xml b/tests/data/metadata/fence_vbox.xml +index 045fbe9e..ef37e27d 100644 +--- a/tests/data/metadata/fence_vbox.xml ++++ b/tests/data/metadata/fence_vbox.xml +@@ -150,6 +150,11 @@ By default, vbox needs to log in as a user that is a member of the vboxusers gro + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_virsh.xml b/tests/data/metadata/fence_virsh.xml +index 2ab09c33..2439be68 100644 +--- a/tests/data/metadata/fence_virsh.xml ++++ b/tests/data/metadata/fence_virsh.xml +@@ -150,6 +150,11 @@ By default, virsh needs root account to do properly work. So you must allow ssh + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_vmware.xml b/tests/data/metadata/fence_vmware.xml +index 14b504ed..5a3c2f5b 100644 +--- a/tests/data/metadata/fence_vmware.xml ++++ b/tests/data/metadata/fence_vmware.xml +@@ -156,6 +156,11 @@ After you have successfully installed VI Perl Toolkit or VIX API, you should be + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_vmware_rest.xml b/tests/data/metadata/fence_vmware_rest.xml +index 41b09ba2..3c3693af 100644 +--- a/tests/data/metadata/fence_vmware_rest.xml ++++ b/tests/data/metadata/fence_vmware_rest.xml +@@ -139,6 +139,11 @@ NOTE: If there's more than 1000 VMs there is a filter parameter to work around t + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml +index ee385adf..33d2371b 100644 +--- a/tests/data/metadata/fence_vmware_soap.xml ++++ b/tests/data/metadata/fence_vmware_soap.xml +@@ -130,6 +130,11 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_vmware_vcloud.xml b/tests/data/metadata/fence_vmware_vcloud.xml +index 21c9b77d..eef2cf9a 100644 +--- a/tests/data/metadata/fence_vmware_vcloud.xml ++++ b/tests/data/metadata/fence_vmware_vcloud.xml +@@ -132,6 +132,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml +index 8064b703..e43c0c03 100644 +--- a/tests/data/metadata/fence_wti.xml ++++ b/tests/data/metadata/fence_wti.xml +@@ -148,6 +148,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_xenapi.xml b/tests/data/metadata/fence_xenapi.xml +index a1694ec5..60e6291d 100644 +--- a/tests/data/metadata/fence_xenapi.xml ++++ b/tests/data/metadata/fence_xenapi.xml +@@ -98,6 +98,11 @@ + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + +diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml +index 95c2ded3..094bc6b8 100644 +--- a/tests/data/metadata/fence_zvmip.xml ++++ b/tests/data/metadata/fence_zvmip.xml +@@ -141,6 +141,11 @@ to access the system's directory manager. + + Wait X seconds before fencing is started + ++ ++ ++ ++ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) ++ + + + diff --git a/SOURCES/bz1470813-fencing-2-fix-power-timeout.patch b/SOURCES/bz1470813-fencing-2-fix-power-timeout.patch new file mode 100644 index 0000000..bf736a0 --- /dev/null +++ b/SOURCES/bz1470813-fencing-2-fix-power-timeout.patch @@ -0,0 +1,40 @@ +From 4202a863b25e456b7e419cbfc33c45ae179eb760 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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): diff --git a/SOURCES/bz1470813-fencing-3-make-timeout-0-mean-forever.patch b/SOURCES/bz1470813-fencing-3-make-timeout-0-mean-forever.patch new file mode 100644 index 0000000..9445561 --- /dev/null +++ b/SOURCES/bz1470813-fencing-3-make-timeout-0-mean-forever.patch @@ -0,0 +1,38 @@ +From 4cf6887e98c712b99f741dbfe54932c60e93741b Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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) diff --git a/SOURCES/bz1470813-fencing-4-make-timeout-0-mean-forever.patch b/SOURCES/bz1470813-fencing-4-make-timeout-0-mean-forever.patch new file mode 100644 index 0000000..1bd250f --- /dev/null +++ b/SOURCES/bz1470813-fencing-4-make-timeout-0-mean-forever.patch @@ -0,0 +1,22 @@ +From 083ecce0e7b6cd41eef026c8a1ba986f8814a7d9 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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)) diff --git a/SOURCES/bz1793739-fence_vmware_rest-3-fix-encode-issue.patch b/SOURCES/bz1793739-fence_vmware_rest-3-fix-encode-issue.patch new file mode 100644 index 0000000..55b7f17 --- /dev/null +++ b/SOURCES/bz1793739-fence_vmware_rest-3-fix-encode-issue.patch @@ -0,0 +1,23 @@ +From 2ac3b05200477f3f04ce73de439e84c10a269552 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 2 Jul 2020 12:05:33 +0200 +Subject: [PATCH] fence_vmware_rest: remove .encode() that made the list action + fail on Python 3. It works fine with/without this on Python 2.x + +--- + agents/vmware_rest/fence_vmware_rest.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py +index a038a096..e49fd566 100644 +--- a/agents/vmware_rest/fence_vmware_rest.py ++++ b/agents/vmware_rest/fence_vmware_rest.py +@@ -61,7 +61,7 @@ def get_list(conn, options): + fail(EC_STATUS) + + for r in res["value"]: +- outlets[r["name"].encode("UTF-8")] = ("", state[r["power_state"]]) ++ outlets[r["name"]] = ("", state[r["power_state"]]) + + return outlets + diff --git a/SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch b/SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch new file mode 100644 index 0000000..5e33400 --- /dev/null +++ b/SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch @@ -0,0 +1,75 @@ +From 2c9ee29d1e28dbdd5e305156ae70451e31d976c0 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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 +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 + + Fencing action + +- ++ + + + Application ID +@@ -58,7 +58,7 @@ When using network fencing the reboot-action will cause a quick-return once the + + Physical plug number on device, UUID or identification of machine + +- ++ + + + Application ID diff --git a/SOURCES/bz1841087-fence_scsi-dont-write-key-device-to-file.patch b/SOURCES/bz1841087-fence_scsi-dont-write-key-device-to-file.patch new file mode 100644 index 0000000..5bc1198 --- /dev/null +++ b/SOURCES/bz1841087-fence_scsi-dont-write-key-device-to-file.patch @@ -0,0 +1,60 @@ +From 431e8bc40288d97d80f07ec195c0a07c5f8c065a Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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"] + " " +\ diff --git a/SOURCES/bz1851115-fence_mpath-support-comma-and-space-separated-devices.patch b/SOURCES/bz1851115-fence_mpath-support-comma-and-space-separated-devices.patch new file mode 100644 index 0000000..cd36647 --- /dev/null +++ b/SOURCES/bz1851115-fence_mpath-support-comma-and-space-separated-devices.patch @@ -0,0 +1,23 @@ +From 2d0057dabae0b4cd4394fec5a60a3f649c8e3d2b Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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) diff --git a/SOURCES/bz1853973-fence_ipmilan-allow-increasing-ipmitool-verbosity.patch b/SOURCES/bz1853973-fence_ipmilan-allow-increasing-ipmitool-verbosity.patch new file mode 100644 index 0000000..28abff6 --- /dev/null +++ b/SOURCES/bz1853973-fence_ipmilan-allow-increasing-ipmitool-verbosity.patch @@ -0,0 +1,1489 @@ +From 3c377e48d96fbe80a5be5e9fd1a15c4b3a7d25e4 Mon Sep 17 00:00:00 2001 +From: Reid wahl +Date: Mon, 6 Jul 2020 03:58:42 -0700 +Subject: [PATCH 1/2] fencing: Add verbose_level option + +Currently, `verbose` is a boolean, all-or-nothing option. It would be +useful to be able to set more granular verbosity levels when debugging +an issue. + +This patch adds a `verbose_level` option to allow setting higher +verbosities. This option can be set explicitly (e.g., +`--verbose-level=3`). Alternatively, multiple `verbose` flags (e.g., +`-vvv`) can be passed on the command line; `verbose_level` is set to +the number of `-v` flags. + +If both an explicit `verbose_level` and one or more `-v` options are +set, the `verbose_level` takes precedence and overrides any `-v` flags. +If `verbose_level > 0` and there are no `-v` flags, the `verbose` +option is enabled implicitly. + +Later patches will enable individual fence agents to use the new +verbosity levels. + +Related to: RHBZ#1853973 +--- + lib/fencing.py.py | 58 ++++++++++++++++--- + tests/data/metadata/fence_aliyun.xml | 7 ++- + tests/data/metadata/fence_alom.xml | 7 ++- + tests/data/metadata/fence_amt.xml | 7 ++- + tests/data/metadata/fence_amt_ws.xml | 7 ++- + tests/data/metadata/fence_apc.xml | 7 ++- + tests/data/metadata/fence_apc_snmp.xml | 7 ++- + tests/data/metadata/fence_aws.xml | 7 ++- + tests/data/metadata/fence_azure_arm.xml | 7 ++- + tests/data/metadata/fence_bladecenter.xml | 7 ++- + tests/data/metadata/fence_brocade.xml | 7 ++- + tests/data/metadata/fence_cisco_mds.xml | 7 ++- + tests/data/metadata/fence_cisco_ucs.xml | 7 ++- + tests/data/metadata/fence_compute.xml | 7 ++- + tests/data/metadata/fence_docker.xml | 7 ++- + tests/data/metadata/fence_drac.xml | 7 ++- + tests/data/metadata/fence_drac5.xml | 7 ++- + tests/data/metadata/fence_dummy.xml | 7 ++- + tests/data/metadata/fence_eaton_snmp.xml | 7 ++- + tests/data/metadata/fence_emerson.xml | 7 ++- + tests/data/metadata/fence_eps.xml | 7 ++- + tests/data/metadata/fence_evacuate.xml | 7 ++- + tests/data/metadata/fence_gce.xml | 7 ++- + tests/data/metadata/fence_hds_cb.xml | 7 ++- + tests/data/metadata/fence_heuristics_ping.xml | 7 ++- + tests/data/metadata/fence_hpblade.xml | 7 ++- + tests/data/metadata/fence_ibmblade.xml | 7 ++- + tests/data/metadata/fence_idrac.xml | 7 ++- + tests/data/metadata/fence_ifmib.xml | 7 ++- + tests/data/metadata/fence_ilo.xml | 7 ++- + tests/data/metadata/fence_ilo2.xml | 7 ++- + tests/data/metadata/fence_ilo3.xml | 7 ++- + tests/data/metadata/fence_ilo3_ssh.xml | 7 ++- + tests/data/metadata/fence_ilo4.xml | 7 ++- + tests/data/metadata/fence_ilo4_ssh.xml | 7 ++- + tests/data/metadata/fence_ilo_moonshot.xml | 7 ++- + tests/data/metadata/fence_ilo_mp.xml | 7 ++- + tests/data/metadata/fence_ilo_ssh.xml | 7 ++- + tests/data/metadata/fence_imm.xml | 7 ++- + tests/data/metadata/fence_intelmodular.xml | 7 ++- + tests/data/metadata/fence_ipdu.xml | 7 ++- + tests/data/metadata/fence_ipmilan.xml | 7 ++- + tests/data/metadata/fence_ironic.xml | 7 ++- + tests/data/metadata/fence_ldom.xml | 7 ++- + tests/data/metadata/fence_lpar.xml | 7 ++- + tests/data/metadata/fence_mpath.xml | 7 ++- + tests/data/metadata/fence_netio.xml | 7 ++- + tests/data/metadata/fence_openstack.xml | 7 ++- + tests/data/metadata/fence_ovh.xml | 7 ++- + tests/data/metadata/fence_powerman.xml | 7 ++- + tests/data/metadata/fence_pve.xml | 7 ++- + tests/data/metadata/fence_raritan.xml | 7 ++- + tests/data/metadata/fence_rcd_serial.xml | 7 ++- + tests/data/metadata/fence_redfish.xml | 7 ++- + tests/data/metadata/fence_rhevm.xml | 7 ++- + tests/data/metadata/fence_rsa.xml | 7 ++- + tests/data/metadata/fence_rsb.xml | 7 ++- + tests/data/metadata/fence_sanbox2.xml | 7 ++- + tests/data/metadata/fence_sbd.xml | 7 ++- + tests/data/metadata/fence_scsi.xml | 7 ++- + tests/data/metadata/fence_tripplite_snmp.xml | 7 ++- + tests/data/metadata/fence_vbox.xml | 7 ++- + tests/data/metadata/fence_virsh.xml | 7 ++- + tests/data/metadata/fence_vmware.xml | 7 ++- + tests/data/metadata/fence_vmware_rest.xml | 7 ++- + tests/data/metadata/fence_vmware_soap.xml | 7 ++- + tests/data/metadata/fence_vmware_vcloud.xml | 7 ++- + tests/data/metadata/fence_wti.xml | 7 ++- + tests/data/metadata/fence_xenapi.xml | 7 ++- + tests/data/metadata/fence_zvmip.xml | 7 ++- + 73 files changed, 482 insertions(+), 80 deletions(-) + +diff --git a/lib/fencing.py.py b/lib/fencing.py.py +index 4b54aa7c..63b13036 100644 +--- a/lib/fencing.py.py ++++ b/lib/fencing.py.py +@@ -38,27 +38,40 @@ + "help" : "-h, --help Display this help and exit", + "required" : "0", + "shortdesc" : "Display help and exit", +- "order" : 54}, ++ "order" : 55}, + "version" : { + "getopt" : "V", + "longopt" : "version", + "help" : "-V, --version Display version information and exit", + "required" : "0", + "shortdesc" : "Display version information and exit", +- "order" : 53}, ++ "order" : 54}, + "verbose" : { + "getopt" : "v", + "longopt" : "verbose", +- "help" : "-v, --verbose Verbose mode", ++ "help" : "-v, --verbose Verbose mode. " ++ "Multiple -v flags can be stacked on the command line " ++ "(e.g., -vvv) to increase verbosity.", + "required" : "0", + "order" : 51}, ++ "verbose_level" : { ++ "getopt" : ":", ++ "longopt" : "verbose-level", ++ "type" : "integer", ++ "help" : "--verbose-level " ++ "Level of debugging detail in output. Defaults to the " ++ "number of --verbose flags specified on the command " ++ "line, or to 1 if verbose=1 in a stonith device " ++ "configuration (i.e., on stdin).", ++ "required" : "0", ++ "order" : 52}, + "debug" : { + "getopt" : "D:", + "longopt" : "debug-file", + "help" : "-D, --debug-file=[debugfile] Debugging to output file", + "required" : "0", + "shortdesc" : "Write debug information to given file", +- "order" : 52}, ++ "order" : 53}, + "delay" : { + "getopt" : ":", + "longopt" : "delay", +@@ -454,9 +467,10 @@ + + # options which are added automatically if 'key' is encountered ("default" is always added) + DEPENDENCY_OPT = { +- "default" : ["help", "debug", "verbose", "version", "action", "agent", \ +- "power_timeout", "shell_timeout", "login_timeout", "power_wait", "retry_on", \ +- "delay", "quiet"], ++ "default" : ["help", "debug", "verbose", "verbose_level", ++ "version", "action", "agent", "power_timeout", ++ "shell_timeout", "login_timeout", "power_wait", ++ "retry_on", "delay", "quiet"], + "passwd" : ["passwd_script"], + "sudo" : ["sudo_path"], + "secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"], +@@ -683,6 +697,26 @@ def check_input(device_opt, opt, other_conditions = False): + if options["--action"] in ["metadata", "manpage"] or any(k in options for k in ("--help", "--version")): + return options + ++ try: ++ options["--verbose-level"] = int(options["--verbose-level"]) ++ except ValueError: ++ options["--verbose-level"] = -1 ++ ++ if options["--verbose-level"] < 0: ++ logging.warning("Parse error: Option 'verbose_level' must " ++ "be an integer greater than or equal to 0. " ++ "Setting verbose_level to 0.") ++ options["--verbose-level"] = 0 ++ ++ if options["--verbose-level"] == 0 and "--verbose" in options: ++ logging.warning("Parse error: Ignoring option 'verbose' " ++ "because it conflicts with verbose_level=0") ++ del options["--verbose"] ++ ++ if options["--verbose-level"] > 0: ++ # Ensure verbose key exists ++ options["--verbose"] = 1 ++ + if "--verbose" in options: + logging.getLogger().setLevel(logging.DEBUG) + +@@ -1409,6 +1443,9 @@ def _parse_input_stdin(avail_opt): + opt["--"+all_opt[name]["longopt"]] = "1" + else: + logging.warning("Parse error: Ignoring option '%s' because it does not have value\n", name) ++ ++ opt.setdefault("--verbose-level", opt.get("--verbose", 0)) ++ + return opt + + def _parse_input_cmdline(avail_opt): +@@ -1428,10 +1465,15 @@ def _parse_input_cmdline(avail_opt): + + # Short and long getopt names are changed to consistent "--" + long name (e.g. --username) + long_opts = {} +- for arg_name in list(dict(entered_opt).keys()): ++ verbose_count = 0 ++ for arg_name in [k for (k, v) in entered_opt]: + all_key = [key for (key, value) in list(filtered_opts.items()) \ + if "--" + value.get("longopt", "") == arg_name or "-" + value.get("getopt", "").rstrip(":") == arg_name][0] + long_opts["--" + filtered_opts[all_key]["longopt"]] = dict(entered_opt)[arg_name] ++ if all_key == "verbose": ++ verbose_count += 1 ++ ++ long_opts.setdefault("--verbose-level", verbose_count) + + # This test is specific because it does not apply to input on stdin + if "port_as_ip" in avail_opt and not "--port-as-ip" in long_opts and "--plug" in long_opts: +diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml +index 2de3a8aa..8f236806 100644 +--- a/tests/data/metadata/fence_aliyun.xml ++++ b/tests/data/metadata/fence_aliyun.xml +@@ -46,7 +46,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml +index d6bb3d5b..ef6c06c3 100644 +--- a/tests/data/metadata/fence_alom.xml ++++ b/tests/data/metadata/fence_alom.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml +index 5f0adc98..ee174852 100644 +--- a/tests/data/metadata/fence_amt.xml ++++ b/tests/data/metadata/fence_amt.xml +@@ -80,7 +80,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_amt_ws.xml b/tests/data/metadata/fence_amt_ws.xml +index 86f36f6c..9c223c8d 100644 +--- a/tests/data/metadata/fence_amt_ws.xml ++++ b/tests/data/metadata/fence_amt_ws.xml +@@ -80,7 +80,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_apc.xml b/tests/data/metadata/fence_apc.xml +index 7330d8bc..efad9db8 100644 +--- a/tests/data/metadata/fence_apc.xml ++++ b/tests/data/metadata/fence_apc.xml +@@ -116,7 +116,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_apc_snmp.xml b/tests/data/metadata/fence_apc_snmp.xml +index 7f1c616c..a1947672 100644 +--- a/tests/data/metadata/fence_apc_snmp.xml ++++ b/tests/data/metadata/fence_apc_snmp.xml +@@ -121,7 +121,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml +index 12f67322..527fc86c 100644 +--- a/tests/data/metadata/fence_aws.xml ++++ b/tests/data/metadata/fence_aws.xml +@@ -49,7 +49,12 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml +index 7ea672af..42c9952f 100644 +--- a/tests/data/metadata/fence_azure_arm.xml ++++ b/tests/data/metadata/fence_azure_arm.xml +@@ -106,7 +106,12 @@ When using network fencing the reboot-action will cause a quick-return once the + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_bladecenter.xml b/tests/data/metadata/fence_bladecenter.xml +index 0762e43f..f2ee28b1 100644 +--- a/tests/data/metadata/fence_bladecenter.xml ++++ b/tests/data/metadata/fence_bladecenter.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_brocade.xml b/tests/data/metadata/fence_brocade.xml +index ef2b9833..f3287503 100644 +--- a/tests/data/metadata/fence_brocade.xml ++++ b/tests/data/metadata/fence_brocade.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml +index 15d7798c..a0e62cba 100644 +--- a/tests/data/metadata/fence_cisco_mds.xml ++++ b/tests/data/metadata/fence_cisco_mds.xml +@@ -120,7 +120,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml +index 848e72f8..f4543f4b 100644 +--- a/tests/data/metadata/fence_cisco_ucs.xml ++++ b/tests/data/metadata/fence_cisco_ucs.xml +@@ -96,7 +96,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml +index 2f183268..a5ce53cd 100644 +--- a/tests/data/metadata/fence_compute.xml ++++ b/tests/data/metadata/fence_compute.xml +@@ -131,7 +131,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml +index 3285314c..6e3306d4 100644 +--- a/tests/data/metadata/fence_docker.xml ++++ b/tests/data/metadata/fence_docker.xml +@@ -84,7 +84,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml +index 2184ee0c..451ee504 100644 +--- a/tests/data/metadata/fence_drac.xml ++++ b/tests/data/metadata/fence_drac.xml +@@ -81,7 +81,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_drac5.xml b/tests/data/metadata/fence_drac5.xml +index 069f7b00..564008ab 100644 +--- a/tests/data/metadata/fence_drac5.xml ++++ b/tests/data/metadata/fence_drac5.xml +@@ -120,7 +120,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_dummy.xml b/tests/data/metadata/fence_dummy.xml +index 873c565b..ec4d5b46 100644 +--- a/tests/data/metadata/fence_dummy.xml ++++ b/tests/data/metadata/fence_dummy.xml +@@ -31,7 +31,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_eaton_snmp.xml b/tests/data/metadata/fence_eaton_snmp.xml +index 3dd92dd2..1ec07c68 100644 +--- a/tests/data/metadata/fence_eaton_snmp.xml ++++ b/tests/data/metadata/fence_eaton_snmp.xml +@@ -120,7 +120,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml +index f6886469..fbdcbcde 100644 +--- a/tests/data/metadata/fence_emerson.xml ++++ b/tests/data/metadata/fence_emerson.xml +@@ -120,7 +120,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml +index 26e75477..47cad6f0 100644 +--- a/tests/data/metadata/fence_eps.xml ++++ b/tests/data/metadata/fence_eps.xml +@@ -83,7 +83,12 @@ Agent basically works by connecting to hidden page and pass appropriate argument + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_evacuate.xml b/tests/data/metadata/fence_evacuate.xml +index 95da0e1b..f32b48eb 100644 +--- a/tests/data/metadata/fence_evacuate.xml ++++ b/tests/data/metadata/fence_evacuate.xml +@@ -126,7 +126,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml +index 79b82ebb..3b8a24a4 100644 +--- a/tests/data/metadata/fence_gce.xml ++++ b/tests/data/metadata/fence_gce.xml +@@ -56,7 +56,12 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_hds_cb.xml b/tests/data/metadata/fence_hds_cb.xml +index 71cfd8ed..5529472d 100644 +--- a/tests/data/metadata/fence_hds_cb.xml ++++ b/tests/data/metadata/fence_hds_cb.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_heuristics_ping.xml b/tests/data/metadata/fence_heuristics_ping.xml +index 3dbceeb2..53e3bb05 100644 +--- a/tests/data/metadata/fence_heuristics_ping.xml ++++ b/tests/data/metadata/fence_heuristics_ping.xml +@@ -56,7 +56,12 @@ This is not a fence agent by itself! Its only purpose is to enable/disable anoth + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_hpblade.xml b/tests/data/metadata/fence_hpblade.xml +index 6cdc73ed..bbb51668 100644 +--- a/tests/data/metadata/fence_hpblade.xml ++++ b/tests/data/metadata/fence_hpblade.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ibmblade.xml b/tests/data/metadata/fence_ibmblade.xml +index 5084b3a0..6585c4fb 100644 +--- a/tests/data/metadata/fence_ibmblade.xml ++++ b/tests/data/metadata/fence_ibmblade.xml +@@ -120,7 +120,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml +index 55d9ced3..efecc720 100644 +--- a/tests/data/metadata/fence_idrac.xml ++++ b/tests/data/metadata/fence_idrac.xml +@@ -123,7 +123,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ifmib.xml b/tests/data/metadata/fence_ifmib.xml +index c07a6e1f..93bd8aa3 100644 +--- a/tests/data/metadata/fence_ifmib.xml ++++ b/tests/data/metadata/fence_ifmib.xml +@@ -122,7 +122,12 @@ It was written with managed ethernet switches in mind, in order to fence iSCSI S + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml +index 44b3c43a..7ed91061 100644 +--- a/tests/data/metadata/fence_ilo.xml ++++ b/tests/data/metadata/fence_ilo.xml +@@ -107,7 +107,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml +index e9cae6d2..5527cf21 100644 +--- a/tests/data/metadata/fence_ilo2.xml ++++ b/tests/data/metadata/fence_ilo2.xml +@@ -107,7 +107,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml +index 2a99e0a4..b5db044c 100644 +--- a/tests/data/metadata/fence_ilo3.xml ++++ b/tests/data/metadata/fence_ilo3.xml +@@ -123,7 +123,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo3_ssh.xml b/tests/data/metadata/fence_ilo3_ssh.xml +index e46d607c..a3c8f11c 100644 +--- a/tests/data/metadata/fence_ilo3_ssh.xml ++++ b/tests/data/metadata/fence_ilo3_ssh.xml +@@ -124,7 +124,12 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml +index 68790266..210b05d2 100644 +--- a/tests/data/metadata/fence_ilo4.xml ++++ b/tests/data/metadata/fence_ilo4.xml +@@ -123,7 +123,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo4_ssh.xml b/tests/data/metadata/fence_ilo4_ssh.xml +index a2c4614a..9b993dd5 100644 +--- a/tests/data/metadata/fence_ilo4_ssh.xml ++++ b/tests/data/metadata/fence_ilo4_ssh.xml +@@ -124,7 +124,12 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo_moonshot.xml b/tests/data/metadata/fence_ilo_moonshot.xml +index 00e43840..1e31424a 100644 +--- a/tests/data/metadata/fence_ilo_moonshot.xml ++++ b/tests/data/metadata/fence_ilo_moonshot.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml +index 2bba33dc..b825cd32 100644 +--- a/tests/data/metadata/fence_ilo_mp.xml ++++ b/tests/data/metadata/fence_ilo_mp.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ilo_ssh.xml b/tests/data/metadata/fence_ilo_ssh.xml +index 1c8145b8..df87fd5f 100644 +--- a/tests/data/metadata/fence_ilo_ssh.xml ++++ b/tests/data/metadata/fence_ilo_ssh.xml +@@ -124,7 +124,12 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml +index e22e4723..d00ad7fa 100644 +--- a/tests/data/metadata/fence_imm.xml ++++ b/tests/data/metadata/fence_imm.xml +@@ -123,7 +123,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_intelmodular.xml b/tests/data/metadata/fence_intelmodular.xml +index 5e0d3b19..ed5afcb8 100644 +--- a/tests/data/metadata/fence_intelmodular.xml ++++ b/tests/data/metadata/fence_intelmodular.xml +@@ -122,7 +122,12 @@ Note: Since firmware update version 2.7, SNMP v2 write support is removed, and r + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ipdu.xml b/tests/data/metadata/fence_ipdu.xml +index 546e372c..78575c7c 100644 +--- a/tests/data/metadata/fence_ipdu.xml ++++ b/tests/data/metadata/fence_ipdu.xml +@@ -120,7 +120,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml +index 3e13d288..d4c23f73 100644 +--- a/tests/data/metadata/fence_ipmilan.xml ++++ b/tests/data/metadata/fence_ipmilan.xml +@@ -123,7 +123,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ironic.xml b/tests/data/metadata/fence_ironic.xml +index 5775f285..84beaffc 100644 +--- a/tests/data/metadata/fence_ironic.xml ++++ b/tests/data/metadata/fence_ironic.xml +@@ -76,7 +76,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ldom.xml b/tests/data/metadata/fence_ldom.xml +index b3c53458..4bb38571 100644 +--- a/tests/data/metadata/fence_ldom.xml ++++ b/tests/data/metadata/fence_ldom.xml +@@ -113,7 +113,12 @@ Very useful parameter is -c (or cmd_prompt in stdin mode). This must be set to s + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_lpar.xml b/tests/data/metadata/fence_lpar.xml +index 16d43a78..7ddc2c45 100644 +--- a/tests/data/metadata/fence_lpar.xml ++++ b/tests/data/metadata/fence_lpar.xml +@@ -125,7 +125,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml +index f5e60823..83d69f6c 100644 +--- a/tests/data/metadata/fence_mpath.xml ++++ b/tests/data/metadata/fence_mpath.xml +@@ -37,7 +37,12 @@ The fence_mpath agent works by having a unique key for each node that has to be + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_netio.xml b/tests/data/metadata/fence_netio.xml +index 79d27af3..b409bde7 100644 +--- a/tests/data/metadata/fence_netio.xml ++++ b/tests/data/metadata/fence_netio.xml +@@ -71,7 +71,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_openstack.xml b/tests/data/metadata/fence_openstack.xml +index 22517657..645cd655 100644 +--- a/tests/data/metadata/fence_openstack.xml ++++ b/tests/data/metadata/fence_openstack.xml +@@ -101,7 +101,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_ovh.xml b/tests/data/metadata/fence_ovh.xml +index b2767cc0..e8160bf7 100644 +--- a/tests/data/metadata/fence_ovh.xml ++++ b/tests/data/metadata/fence_ovh.xml +@@ -61,7 +61,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_powerman.xml b/tests/data/metadata/fence_powerman.xml +index ce72e002..3bf56882 100644 +--- a/tests/data/metadata/fence_powerman.xml ++++ b/tests/data/metadata/fence_powerman.xml +@@ -41,7 +41,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_pve.xml b/tests/data/metadata/fence_pve.xml +index 5d744903..1c83f2ef 100644 +--- a/tests/data/metadata/fence_pve.xml ++++ b/tests/data/metadata/fence_pve.xml +@@ -94,7 +94,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_raritan.xml b/tests/data/metadata/fence_raritan.xml +index 565eebc7..537cb141 100644 +--- a/tests/data/metadata/fence_raritan.xml ++++ b/tests/data/metadata/fence_raritan.xml +@@ -71,7 +71,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_rcd_serial.xml b/tests/data/metadata/fence_rcd_serial.xml +index c22f78de..b2a20cb7 100644 +--- a/tests/data/metadata/fence_rcd_serial.xml ++++ b/tests/data/metadata/fence_rcd_serial.xml +@@ -29,7 +29,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml +index 91b483b7..32ea402e 100644 +--- a/tests/data/metadata/fence_redfish.xml ++++ b/tests/data/metadata/fence_redfish.xml +@@ -106,7 +106,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml +index 73c9906f..deb326c3 100644 +--- a/tests/data/metadata/fence_rhevm.xml ++++ b/tests/data/metadata/fence_rhevm.xml +@@ -115,7 +115,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml +index f9a55f82..51009427 100644 +--- a/tests/data/metadata/fence_rsa.xml ++++ b/tests/data/metadata/fence_rsa.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml +index 022835be..7d8575d1 100644 +--- a/tests/data/metadata/fence_rsb.xml ++++ b/tests/data/metadata/fence_rsb.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_sanbox2.xml b/tests/data/metadata/fence_sanbox2.xml +index 7e20c8ce..bf07f360 100644 +--- a/tests/data/metadata/fence_sanbox2.xml ++++ b/tests/data/metadata/fence_sanbox2.xml +@@ -81,7 +81,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_sbd.xml b/tests/data/metadata/fence_sbd.xml +index 6095a74b..db52b49a 100644 +--- a/tests/data/metadata/fence_sbd.xml ++++ b/tests/data/metadata/fence_sbd.xml +@@ -39,7 +39,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml +index d0818b0d..ceb79de5 100644 +--- a/tests/data/metadata/fence_scsi.xml ++++ b/tests/data/metadata/fence_scsi.xml +@@ -54,7 +54,12 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_tripplite_snmp.xml b/tests/data/metadata/fence_tripplite_snmp.xml +index d3769133..becc0d18 100644 +--- a/tests/data/metadata/fence_tripplite_snmp.xml ++++ b/tests/data/metadata/fence_tripplite_snmp.xml +@@ -121,7 +121,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_vbox.xml b/tests/data/metadata/fence_vbox.xml +index 3b53c7d2..045fbe9e 100644 +--- a/tests/data/metadata/fence_vbox.xml ++++ b/tests/data/metadata/fence_vbox.xml +@@ -113,7 +113,12 @@ By default, vbox needs to log in as a user that is a member of the vboxusers gro + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_virsh.xml b/tests/data/metadata/fence_virsh.xml +index 864986d0..2ab09c33 100644 +--- a/tests/data/metadata/fence_virsh.xml ++++ b/tests/data/metadata/fence_virsh.xml +@@ -113,7 +113,12 @@ By default, virsh needs root account to do properly work. So you must allow ssh + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_vmware.xml b/tests/data/metadata/fence_vmware.xml +index 48fc408b..14b504ed 100644 +--- a/tests/data/metadata/fence_vmware.xml ++++ b/tests/data/metadata/fence_vmware.xml +@@ -124,7 +124,12 @@ After you have successfully installed VI Perl Toolkit or VIX API, you should be + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_vmware_rest.xml b/tests/data/metadata/fence_vmware_rest.xml +index 830b6a21..41b09ba2 100644 +--- a/tests/data/metadata/fence_vmware_rest.xml ++++ b/tests/data/metadata/fence_vmware_rest.xml +@@ -102,7 +102,12 @@ NOTE: If there's more than 1000 VMs there is a filter parameter to work around t + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml +index da6a1002..ee385adf 100644 +--- a/tests/data/metadata/fence_vmware_soap.xml ++++ b/tests/data/metadata/fence_vmware_soap.xml +@@ -93,7 +93,12 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_vmware_vcloud.xml b/tests/data/metadata/fence_vmware_vcloud.xml +index 505eaf2b..21c9b77d 100644 +--- a/tests/data/metadata/fence_vmware_vcloud.xml ++++ b/tests/data/metadata/fence_vmware_vcloud.xml +@@ -95,7 +95,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml +index 872e4a90..8064b703 100644 +--- a/tests/data/metadata/fence_wti.xml ++++ b/tests/data/metadata/fence_wti.xml +@@ -111,7 +111,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_xenapi.xml b/tests/data/metadata/fence_xenapi.xml +index f6f4e46d..a1694ec5 100644 +--- a/tests/data/metadata/fence_xenapi.xml ++++ b/tests/data/metadata/fence_xenapi.xml +@@ -61,7 +61,12 @@ + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + +diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml +index 408ad977..95c2ded3 100644 +--- a/tests/data/metadata/fence_zvmip.xml ++++ b/tests/data/metadata/fence_zvmip.xml +@@ -104,7 +104,12 @@ to access the system's directory manager. + + + +- Verbose mode ++ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. ++ ++ ++ ++ ++ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). + + + + +From 60544f8642c483fce74d3c146d29c3c1a8bdd021 Mon Sep 17 00:00:00 2001 +From: Reid wahl +Date: Thu, 9 Jul 2020 22:17:15 -0700 +Subject: [PATCH 2/2] fence_ipmilan: Add ability to increase ipmitool verbosity + +Currently, the `-v` flag only causes the `ipmitool` command line and +output to be printed. + +This patch allows `fence_ipmilan` to accept additional `-v` flags and +pass them on to `ipmitool` to get more verbosity. + +Depends on: PR#346 +Resolves: RHBZ#1853973 +--- + agents/ipmilan/fence_ipmilan.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/agents/ipmilan/fence_ipmilan.py b/agents/ipmilan/fence_ipmilan.py +index ecd35582..ee014e79 100644 +--- a/agents/ipmilan/fence_ipmilan.py ++++ b/agents/ipmilan/fence_ipmilan.py +@@ -92,6 +92,10 @@ def append(cls, cmd, log=None): + # --action / -o + Cmd.append(" chassis power " + action) + ++ # --verbose-level ++ if options["--verbose-level"] > 1: ++ Cmd.append(" -" + "v" * (options["--verbose-level"] - 1)) ++ + return (Cmd.cmd, Cmd.log) + + def define_new_opts(): diff --git a/SOURCES/bz1859932-fence_evacuate-support-private-flavors.patch b/SOURCES/bz1859932-fence_evacuate-support-private-flavors.patch new file mode 100644 index 0000000..60eddd2 --- /dev/null +++ b/SOURCES/bz1859932-fence_evacuate-support-private-flavors.patch @@ -0,0 +1,26 @@ +From 18ef1622475db947aef70042523f4a176c4155bd Mon Sep 17 00:00:00 2001 +From: Luca Miccini +Date: Thu, 23 Jul 2020 14:33:38 +0200 +Subject: [PATCH] [fence_evacuate] Enable evacuation of instances using private + flavors + +This commit extends the flavor.list() api call in the fence_evacuate +agent to fetch private flavors that could be tagged with the 'evacuable' +attribute, allowing instance-ha to be enabled on a per tenant basis. +--- + agents/evacuate/fence_evacuate.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py +index 88837dd8..53d6fd15 100644 +--- a/agents/evacuate/fence_evacuate.py ++++ b/agents/evacuate/fence_evacuate.py +@@ -87,7 +87,7 @@ def _is_server_evacuable(server, evac_flavors, evac_images): + + def _get_evacuable_flavors(connection): + result = [] +- flavors = connection.flavors.list() ++ flavors = connection.flavors.list(is_public=None) + # Since the detailed view for all flavors doesn't provide the extra specs, + # we need to call each of the flavor to get them. + for flavor in flavors: diff --git a/SOURCES/bz1860544-fence_lpar-fix-long-user-host-issue.patch b/SOURCES/bz1860544-fence_lpar-fix-long-user-host-issue.patch new file mode 100644 index 0000000..f65f6ba --- /dev/null +++ b/SOURCES/bz1860544-fence_lpar-fix-long-user-host-issue.patch @@ -0,0 +1,127 @@ +From 3424464d3e447308f171399302cf76eb573a618f Mon Sep 17 00:00:00 2001 +From: Reid wahl +Date: Fri, 24 Jul 2020 18:22:24 -0700 +Subject: [PATCH] fence_lpar: Fix parse error from long command line + +When Pacemaker executes `fence_lpar` and the HMC command line is greater +than 80 characters, a parse error causes agent failure. This can happen +with a long user name and/or long managed system name. It happens only +when Pacemaker spawns the `fence_lpar` process; it does not happen when +`fence_lpar` is run from the CLI. + +A long command line gets a carriage return ('\r') added at the 80 +character mark and wraps back to the beginning of the line with no line +feed ('\n'), overwriting the displayed characters. `fence_lpar`'s regex +matches handle this fine when it's run from the command line. + +The problem is that when Pacemaker spawns fence_lpar, **for some +reason** there are backspace characters in the buffer when we hit the +'\r' character. This seems to overwrite some of the `conn.before` +string. As a result, the regex doesn't match `conn.before`, and the +agent fails. + +This patch works around the `conn.before` weirdness by reading and +discarding the first received line **before** any regex processing. + +Resolves: RHBZ#1860544 +Resolves: RHBZ#1860545 + +Signed-off-by: Reid Wahl +--- + agents/lpar/fence_lpar.py | 33 +++++++++++++++++++++++++++------ + 1 file changed, 27 insertions(+), 6 deletions(-) + +diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py +index 270bbe3b..9dfabc43 100644 +--- a/agents/lpar/fence_lpar.py ++++ b/agents/lpar/fence_lpar.py +@@ -19,6 +19,9 @@ + 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") ++ ++ # First line (command) may cause parsing issues if long ++ conn.readline() + conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) + + try: +@@ -29,6 +32,9 @@ def get_power_status(conn, options): + elif options["--hmc-version"] in ["4", "IVM"]: + conn.send("lssyscfg -r lpar -m "+ options["--managed"] + + " --filter 'lpar_names=" + options["--plug"] + "'\n") ++ ++ # First line (command) may cause parsing issues if long ++ conn.readline() + conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) + + try: +@@ -49,6 +55,9 @@ def set_power_status(conn, options): + if options["--hmc-version"] == "3": + conn.send("chsysstate -o " + options["--action"] + " -r lpar -m " + options["--managed"] + + " -n " + options["--plug"] + "\n") ++ ++ # First line (command) may cause parsing issues if long ++ conn.readline() + conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) + elif options["--hmc-version"] in ["4", "IVM"]: + if options["--action"] == "on": +@@ -60,17 +69,23 @@ def set_power_status(conn, options): + else: + conn.send("chsysstate -o shutdown -r lpar --immed" + + " -m " + options["--managed"] + " -n " + options["--plug"] + "\n") ++ ++ # First line (command) may cause parsing issues if long ++ conn.readline() + conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) + + def get_lpar_list(conn, options): + outlets = {} + if options["--hmc-version"] == "3": + conn.send("query_partition_names -m " + options["--managed"] + "\n") ++ ++ ## We have to remove first line (command) ++ conn.readline() + conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) + +- ## We have to remove first 3 lines (command + header) and last line (part of new prompt) ++ ## We have to remove next 2 lines (header) and last line (part of new prompt) + #### +- res = re.search("^.+?\n(.+?\n){2}(.*)\n.*$", conn.before, re.S) ++ res = re.search("^(.+?\n){2}(.*)\n.*$", conn.before, re.S) + + if res == None: + fail_usage("Unable to parse output of list command") +@@ -81,11 +96,14 @@ def get_lpar_list(conn, options): + 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 first line (command) and last line (part of new prompt) ++ ## We have to remove last line (part of new prompt) + #### +- res = re.search("^.+?\n(.*)\n.*$", conn.before, re.S) ++ res = re.search("^(.*)\n.*$", conn.before, re.S) + + if res == None: + fail_usage("Unable to parse output of list command") +@@ -100,11 +118,14 @@ def get_lpar_list(conn, options): + elif options["--hmc-version"] == "IVM": + 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 first line (command) and last line (part of new prompt) ++ ## We have to remove last line (part of new prompt) + #### +- res = re.search("^.+?\n(.*)\n.*$", conn.before, re.S) ++ res = re.search("^(.*)\n.*$", conn.before, re.S) + + if res == None: + fail_usage("Unable to parse output of list command") diff --git a/SOURCES/bz1861926-fence_lpar-fix-list-status-action.patch b/SOURCES/bz1861926-fence_lpar-fix-list-status-action.patch new file mode 100644 index 0000000..5842f73 --- /dev/null +++ b/SOURCES/bz1861926-fence_lpar-fix-list-status-action.patch @@ -0,0 +1,145 @@ +From 6d0b2cb598135b697ee583e3514aa427fc0e4cf8 Mon Sep 17 00:00:00 2001 +From: Reid Wahl +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 +--- + 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 +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 +--- + 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)) diff --git a/SOURCES/bz1896827-fence_aws-add-imdsv2-support.patch b/SOURCES/bz1896827-fence_aws-add-imdsv2-support.patch new file mode 100644 index 0000000..a5bdad3 --- /dev/null +++ b/SOURCES/bz1896827-fence_aws-add-imdsv2-support.patch @@ -0,0 +1,40 @@ +From c9f8890264e0257197b31124dbb26c1046475314 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Fri, 13 Nov 2020 14:30:43 +0100 +Subject: [PATCH] fence_aws: add support for IMDSv2 + +--- + agents/aws/fence_aws.py | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py +index 483a2991..e2a2391f 100644 +--- a/agents/aws/fence_aws.py ++++ b/agents/aws/fence_aws.py +@@ -3,12 +3,13 @@ + import sys, re + import logging + import atexit +-import requests + sys.path.append("@FENCEAGENTSLIBDIR@") + from fencing import * + from fencing import fail, fail_usage, run_delay, EC_STATUS, SyslogLibHandler + ++import requests + import boto3 ++from requests import HTTPError + from botocore.exceptions import ConnectionError, ClientError, EndpointConnectionError, NoRegionError + + logger = logging.getLogger("fence_aws") +@@ -19,8 +20,9 @@ + + def get_instance_id(): + try: +- r = requests.get('http://169.254.169.254/latest/meta-data/instance-id') +- return r.content.decode("UTF-8") ++ token = requests.put('http://169.254.169.254/latest/api/token', headers={"X-aws-ec2-metadata-token-ttl-seconds" : "21600"}).content.decode("UTF-8") ++ r = requests.get('http://169.254.169.254/latest/meta-data/instance-id', headers={"X-aws-ec2-metadata-token" : token}).content.decode("UTF-8") ++ return r + except HTTPError as http_err: + logger.error('HTTP error occurred while trying to access EC2 metadata server: %s', http_err) + except Exception as err: diff --git a/SOURCES/bz1906978-fence_gce-default-to-onoff.patch b/SOURCES/bz1906978-fence_gce-default-to-onoff.patch new file mode 100644 index 0000000..9642832 --- /dev/null +++ b/SOURCES/bz1906978-fence_gce-default-to-onoff.patch @@ -0,0 +1,36 @@ +From 6f1743a7c34b00b0d1602675598ae22a2a3de6b4 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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 + + + +- ++ + diff --git a/SOURCES/bz1914313-fence_zvmip-fix-disable-timeout.patch b/SOURCES/bz1914313-fence_zvmip-fix-disable-timeout.patch new file mode 100644 index 0000000..ee80db1 --- /dev/null +++ b/SOURCES/bz1914313-fence_zvmip-fix-disable-timeout.patch @@ -0,0 +1,23 @@ +From 900afe24edf0f400e9f1ed9b4df66e62cfee380e Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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: diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index d1ae1ff..a020e2d 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: 50%{?alphatag:.%{alphatag}}%{?dist} +Release: 65%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -107,6 +107,21 @@ Patch65: bz1793739-fence_vmware_rest-1-fix-encoding.patch Patch66: bz1793739-fence_vmware_rest-2-support-utf-8-vm-names.patch Patch67: bz1839776-fence_aws-catch-connectionerror.patch Patch68: bz1796654-fence_vmware_soap-log-exception-message-for-SSLError.patch +Patch69: bz1793739-fence_vmware_rest-3-fix-encode-issue.patch +Patch70: bz1860544-fence_lpar-fix-long-user-host-issue.patch +Patch71: bz1859932-fence_evacuate-support-private-flavors.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 %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 @@ -253,6 +268,21 @@ BuildRequires: python3-google-api-client %patch66 -p1 %patch67 -p1 %patch68 -p1 +%patch69 -p1 +%patch70 -p1 +%patch71 -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 sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac @@ -450,7 +480,14 @@ The fence-agents-amt-ws package contains a fence agent for AMT (WS-Man) devices. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for APC devices -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -512,7 +549,14 @@ Fence agent for Azure Resource Manager instances. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for IBM BladeCenter -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -527,7 +571,14 @@ via telnet or SSH. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for Brocade switches -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -587,7 +638,14 @@ Fence agent for Nova compute nodes. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for Dell DRAC 5 -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -675,7 +733,14 @@ ping-heuristics. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for HP BladeSystem devices -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -737,7 +802,14 @@ the HTTP(s) protocol. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for HP iLO Moonshot devices -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -752,7 +824,15 @@ via telnet or SSH. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for HP iLO MP devices -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif +Requires: fence-agents-common = %{version}-%{release} Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -855,7 +935,14 @@ Fence agent for use with kdump crash recovery service. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for IBM LPAR -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -913,7 +1000,14 @@ Fence agent for RHEV-M via REST API. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for IBM RSA II -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -929,7 +1023,14 @@ via telnet or SSH. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for Fujitsu RSB -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -1017,7 +1118,14 @@ Fence agent for VMWare with SOAP API v4.1+. License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for WTI Network power switches -Requires: telnet openssh-clients +Requires: openssh-clients +%if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} +%if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?centos} && 0%{?centos} < 8) +Requires: telnet +%else +Recommends: telnet +%endif +%endif Requires: fence-agents-common >= %{version}-%{release} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch @@ -1044,6 +1152,54 @@ Fence agent for IBM z/VM over IP. %endif %changelog +* Tue Feb 2 2021 Oyvind Albrigtsen - 4.2.1-65 +- fence_gce: default to onoff + Resolves: rhbz#1906978 + +* Mon Jan 11 2021 Oyvind Albrigtsen - 4.2.1-63 +- fence_zvmip: fix disable-timeout not working correctly + Resolves: rhbz#1914313 + +* Fri Nov 13 2020 Oyvind Albrigtsen - 4.2.1-62 +- fence_aws: add support for IMDSv2 + Resolves: rhbz#1896827 + +* Tue Nov 10 2020 Oyvind Albrigtsen - 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 - 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 - 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 + Resolves: rhbz#1851232 + +* Fri Aug 7 2020 Oyvind Albrigtsen - 4.2.1-53 +- fence_evacuate: enable evacuation of instances using private flavors + Resolves: rhbz#1859932 + +* Tue Jul 28 2020 Oyvind Albrigtsen - 4.2.1-52 +- fence_lpar: fix issue with long username, hostname, etc not + working when the command run by the agent exceeds 80 characters + Resolves: rhbz#1860544 + +* Thu Jul 2 2020 Oyvind Albrigtsen - 4.2.1-51 +- fence_vmware_rest: fix encoding issues + Resolves: rhbz#1793739 + * Thu Jun 11 2020 Oyvind Albrigtsen - 4.2.1-50 - fence_vmware_soap: log exception message for SSLError exception Resolves: rhbz#1796654 @@ -1052,10 +1208,6 @@ Fence agent for IBM z/VM over IP. - fence_aws: improve logging by catching ConnectionError exception Resolves: rhbz#1839776 -* Wed May 20 2020 Oyvind Albrigtsen - 4.2.1-48 -- fence_vmware_rest: fix encoding issues - Resolves: rhbz#1793739 - * Fri May 15 2020 Oyvind Albrigtsen - 4.2.1-47 - fence_vmware_rest: add filter parameter to avoid 1000 VM API limit and avoid failing when hitting it during the monitor-action