From 13e8cd83eef3dc0fc799356b29e1d57a720a09cc Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 12 Aug 2025 10:37:54 +0000 Subject: [PATCH] import OL fence-agents-4.16.0-5.el10_0.3 --- .fence-agents.metadata | 102 +- .gitignore | 102 +- ...nts-metadata-update-IO-Power-Network.patch | 1701 -------------- ...fence_cisco_mds-undo-metadata-change.patch | 35 - ...ce_zvmip-1-document-user-permissions.patch | 159 -- ...fence_zvmip-2-fix-manpage-formatting.patch | 41 - ...rt-fix-bundled-jinja2-CVE-2024-22195.patch | 63 - ...rt-fix-bundled-jinja2-CVE-2024-34064.patch | 65 - ...t-fix-bundled-urllib3-CVE-2024-37891.patch | 32 - ...s-fix-bundled-urllib3-CVE-2024-37891.patch | 32 - ...L-50223-setuptools-fix-CVE-2024-6345.patch | 203 -- SOURCES/RHEL-5397-4-fence_scsi-log-err.patch | 22 - ...7-fence_scsi-1-fix-ISID-reg-handling.patch | 68 - ...nce_scsi-2-fix-ISID-reg-handling-off.patch | 103 - .../RHEL-5397-fence_scsi-3-fix-run_cmd.patch | 93 - ...-only-preempt-once-for-mpath-devices.patch | 40 - ...vate-endpoint-and-token-file-support.patch | 120 - ...-fence_azure_arm-use-azure-identity.patch} | 247 +- ..._epsr2-for-ePowerSwitch-R2-and-newer.patch | 365 --- ...0-fence_ibm_vpc-refresh-bearer-token.patch | 38 + SOURCES/build-pythonpath.patch | 113 + SOURCES/bundled-kubevirt.patch | 12 + SOURCES/bundled-pycurl.patch | 110 + SOURCES/bundled-suds.patch | 10 + .../bz1470813-fencing-1-disable-timeout.patch | 1233 ---------- ...z1470813-fencing-2-fix-power-timeout.patch | 40 - ...encing-3-make-timeout-0-mean-forever.patch | 38 - ...encing-4-make-timeout-0-mean-forever.patch | 22 - ...70827-all-agents-log-exceptions-fail.patch | 198 -- .../bz1650214-fence_azure_arm-bundled.patch | 12 - ...-fence_hpblade-fix-log_expect_syntax.patch | 50 - ...orrect-SCSI-key-node-ID-10-or-higher.patch | 24 - ...73-fence_vmware_soap-cleanup-sigterm.patch | 41 - ...-1-fence_scsi-watchdog-retry-support.patch | 146 -- ...54976-2-build-fix-check_used_options.patch | 23 - SOURCES/bz1666914-1-fence_redfish.patch | 812 ------- ...14-2-fence_redfish-fail-invalid-cert.patch | 60 - ...1-fence_redfish-use-ipport-parameter.patch | 43 - ...-ip-parameter-backward-compatibility.patch | 24 - ..._gce-add-serviceaccount-file-support.patch | 73 - ...fence_gce-fix-python3-encoding-issue.patch | 22 - ...700546-fence_azure_arm-skip_shutdown.patch | 48 - ...redfish-full-redfish-spec-compliance.patch | 65 - ...9780-fence_rhevm-RHEV-v4-API-support.patch | 164 -- ...-fence_mpath-fix-watchdog-hardreboot.patch | 21 - ...2263-fence_rhevm-1-use-UTF8-encoding.patch | 32 - ...ce_rhevm-2-fix-debug-encoding-issues.patch | 31 - ...714458-fence_scsi-node-id-new-format.patch | 30 - ...chdog-fix-retry-failing-on-first-try.patch | 42 - ...4862-fence_ibm_vpc-fence_ibm_powervs.patch | 740 ------ ...z1732766-fence_aliyun-1-add-RAM-role.patch | 152 -- ...aliyun-2-import-EcsRamRoleCredential.patch | 39 - ...ware_rest-fix-keyerror-suspended-vms.patch | 23 - ...nce_iloX_ssh-monitor-timeout-warning.patch | 25 - .../bz1748443-fence_zvmip-python3-fixes.patch | 43 - ...96-fence_scsi-add-readonly-parameter.patch | 79 - ...atchdog-trigger-multipath-disconnect.patch | 40 - ...e_mpath-1-add-plug-parameter-support.patch | 197 -- ...ce_mpath-2-fix-plug-parameter-issues.patch | 73 - ...ence_evacuate-1-fix-region_name-type.patch | 66 - ...ence_evacuate-2-fix-project-shortopt.patch | 77 - ...ute-disable-service-after-force-down.patch | 42 - ...24-fence_vmware_rest-improve-logging.patch | 61 - ...63674-fence_rhevm-add-cookie-support.patch | 109 - ...-fencing-improve-stdin-quote-parsing.patch | 23 - ...1-fencing-inetX_only-SSH-fence_zvmip.patch | 756 ------ ...h-fence_vmware_soap-suppress-warning.patch | 51 - ...ence_scsi-add-hash-key-value-support.patch | 237 -- .../bz1774458-fence_sbd-stderr-support.patch | 39 - ...5-fencing-1-add-stonith_status_sleep.patch | 47 - ...ncing-2-metadata-fix-long-parameters.patch | 22 - ...rove-logging-and-metadata-usage-text.patch | 130 -- ...re_soap-set-timeout-cleanup-tmp-dirs.patch | 70 - ...-fence_vmware_soap-login-timeout-15s.patch | 23 - ...739-fence_vmware_rest-1-fix-encoding.patch | 23 - ...vmware_rest-2-support-utf-8-vm-names.patch | 38 - ...fence_vmware_rest-3-fix-encode-issue.patch | 23 - ...p-log-exception-message-for-SSLError.patch | 23 - ...nce_mpath-fix-reserve-parameter-typo.patch | 22 - ...57-fence_aws-improve-parameter-logic.patch | 48 - ...16203-fence_aws-1-fix-race-condition.patch | 421 ---- ...203-fence_aws-2-fix-python3-encoding.patch | 22 - ...8157-fence_azure_arm-fix-MSI-support.patch | 75 - ...ware_rest-improve-exception-handling.patch | 44 - ...e_vmware_rest-1-add-filter-parameter.patch | 92 - ...are_rest-2-fix-1000-VM-monitor-error.patch | 76 - ...ence_evacuate-fix-insecure-parameter.patch | 122 - ...9776-fence_aws-catch-connectionerror.patch | 95 - ...e_scsi-dont-write-key-device-to-file.patch | 60 - ...rt-comma-and-space-separated-devices.patch | 23 - ...-allow-increasing-ipmitool-verbosity.patch | 1489 ------------ ...nce_evacuate-support-private-flavors.patch | 26 - ...-fence_lpar-fix-long-user-host-issue.patch | 127 -- ...26-fence_lpar-fix-list-status-action.patch | 145 -- SOURCES/bz1886074-1-fencing-source_env.patch | 17 - SOURCES/bz1886074-2-fence_openstack.patch | 460 ---- ...-source_env-dont-process-empty-lines.patch | 22 - ...1896827-fence_aws-add-imdsv2-support.patch | 40 - ...bz1906978-fence_gce-default-to-onoff.patch | 36 - ...4313-fence_zvmip-fix-disable-timeout.patch | 23 - ...0947-fence_redfish-1-add-diag-action.patch | 53 - ...ence_redfish-2-add-diag-action-logic.patch | 49 - .../bz1920947-fence_redfish-3-fix-typo.patch | 22 - ...7-fence_mpath-watchdog-retry-support.patch | 111 - ...-fence_ipmilan-add-fence_ipmilanplus.patch | 38 - ...41989-fence_aws-add-filter-parameter.patch | 91 - ...bz1942363-fence_gce-default-to-cycle.patch | 37 - ...3163-fence_zvmip-add-ssl-tls-support.patch | 100 - ...969953-fence_gce-1-add-proxy-support.patch | 70 - SOURCES/bz1969953-fence_gce-2-bundled.patch | 10 - ...9953-fence_gce-3-fix-httplib2-import.patch | 18 - ...e_sbd-dont-spam-logs-disable-timeout.patch | 23 - ...77588-1-fencing-add-EC_FETCH_VM_UUID.patch | 22 - SOURCES/bz1977588-2-fence_kubevirt.patch | 144 -- ...z1977588-3-fence_kubevirt-fix-status.patch | 55 - ...8-4-fence_kubevirt-power-timeout-40s.patch | 35 - ..._kubevirt-get-namespace-from-context.patch | 88 - ...0710-1-fence_amt_ws-fix-or-dead-code.patch | 22 - ...bz2010710-2-fence_amt_ws-boot-option.patch | 32 - ...bz2048857-fence_aws-botocore-bundled.patch | 11 - ...21-1-all-agents-unify-ssl-parameters.patch | 243 -- ...z2072421-2-fence_zvmip-connect-error.patch | 30 - SOURCES/bz2078244-fence_gce-update.patch | 563 ----- ...pc-fence_ilo_moonshot-import-logging.patch | 34 - ...9-2-fence_lpar-fix-import-fail_usage.patch | 65 - ...2080994-fence_ibm_vpc-fix-parameters.patch | 65 - ...1826-fence_ibm_vpc-add-proxy-support.patch | 62 - ...bm_powervs-proxy-private-api-servers.patch | 455 ---- ...ence_ibm_vpc-add-token-cache-support.patch | 431 ---- ...only-output-additional-info-on-debug.patch | 33 - ...6-fence_ibm_powervs-improve-defaults.patch | 46 - ...2152105-fencing-1-add-plug_separator.patch | 74 - ...2105-fencing-2-update-DEPENDENCY_OPT.patch | 1212 ---------- ...ibm_powervs-performance-improvements.patch | 150 -- ...z2160478-fence_scsi-fix-validate-all.patch | 30 - ..._aws-1-add-skip-race-check-parameter.patch | 165 -- ...fail-when-power-action-request-fails.patch | 21 - ..._scsi-1-detect-devices-in-shared-vgs.patch | 58 - ...si-2-support-space-separated-devices.patch | 92 - ...-fence_azure-arm-1-stack-hub-support.patch | 113 - ...rm-2-metadata-endpoint-error-message.patch | 32 - ...t-fix-bundled-dateutil-CVE-2007-4559.patch | 17 - ...s-fix-bundled-dateutil-CVE-2007-4559.patch | 16 - SOURCES/fence_aliyun-1.patch | 344 --- SOURCES/fence_aliyun-2.patch | 58 - SOURCES/fence_aliyun-3-logging.patch | 51 - SOURCES/fence_aliyun-4-bundled.patch | 11 - .../fence_aliyun-5-list-instance-names.patch | 31 - ...ce_aliyun-6-correct-help-indentation.patch | 31 - .../fence_cisco_ucs-encode-POSTFIELDS.patch | 22 - ...te-fence_evacuate-fix-compute-domain.patch | 232 -- ...evacuate-fix-evacuable-tag-mix-issue.patch | 20 - ...kdriver-logging-default-method-cycle.patch | 674 ------ .../fence_gce-2-filter-aggregatedlist.patch | 25 - ...fence_gce-3-stackdriver-logging-note.patch | 34 - ..._ipmilan-show-correct-default-method.patch | 26 - ...pilan-fence_ilo_ssh-add-ilo5-support.patch | 33 - SOURCES/fence_kdump-fix-strncpy-issue.patch | 36 - SOURCES/fence_mpath-watchdog-support.patch | 176 -- SOURCES/fix-version.patch | 10 - SOURCES/ha-cloud-support-aliyun.patch | 10 + SOURCES/ha-cloud-support-aws.patch | 10 + SOURCES/ha-cloud-support-azure.patch | 16 + SOURCES/ha-cloud-support-google.patch | 10 + SOURCES/python3-has_key-fixes.patch | 74 - SOURCES/requirements-aliyun.txt | 3 + SOURCES/requirements-aws.txt | 2 + SOURCES/requirements-common.txt | 3 + SOURCES/requirements-google.txt | 4 + SPECS/fence-agents.spec | 2030 +++++------------ 170 files changed, 1131 insertions(+), 21809 deletions(-) delete mode 100644 SOURCES/RHEL-14031-1-all-agents-metadata-update-IO-Power-Network.patch delete mode 100644 SOURCES/RHEL-14031-2-fence_cisco_mds-undo-metadata-change.patch delete mode 100644 SOURCES/RHEL-14343-fence_zvmip-1-document-user-permissions.patch delete mode 100644 SOURCES/RHEL-14343-fence_zvmip-2-fix-manpage-formatting.patch delete mode 100644 SOURCES/RHEL-22174-kubevirt-fix-bundled-jinja2-CVE-2024-22195.patch delete mode 100644 SOURCES/RHEL-35655-kubevirt-fix-bundled-jinja2-CVE-2024-34064.patch delete mode 100644 SOURCES/RHEL-43568-1-kubevirt-fix-bundled-urllib3-CVE-2024-37891.patch delete mode 100644 SOURCES/RHEL-43568-2-aws-fix-bundled-urllib3-CVE-2024-37891.patch delete mode 100644 SOURCES/RHEL-50223-setuptools-fix-CVE-2024-6345.patch delete mode 100644 SOURCES/RHEL-5397-4-fence_scsi-log-err.patch delete mode 100644 SOURCES/RHEL-5397-fence_scsi-1-fix-ISID-reg-handling.patch delete mode 100644 SOURCES/RHEL-5397-fence_scsi-2-fix-ISID-reg-handling-off.patch delete mode 100644 SOURCES/RHEL-5397-fence_scsi-3-fix-run_cmd.patch delete mode 100644 SOURCES/RHEL-56840-fence_scsi-only-preempt-once-for-mpath-devices.patch delete mode 100644 SOURCES/RHEL-65025-fence_ibm_powervs-add-private-endpoint-and-token-file-support.patch rename SOURCES/{RHEL-76492-fence_azure_arm-use-azure-identity.patch => RHEL-76495-fence_azure_arm-use-azure-identity.patch} (62%) delete mode 100644 SOURCES/RHEL-7734-fence_eps-add-fence_epsr2-for-ePowerSwitch-R2-and-newer.patch create mode 100644 SOURCES/RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch create mode 100644 SOURCES/build-pythonpath.patch create mode 100644 SOURCES/bundled-kubevirt.patch create mode 100644 SOURCES/bundled-pycurl.patch create mode 100644 SOURCES/bundled-suds.patch delete mode 100644 SOURCES/bz1470813-fencing-1-disable-timeout.patch delete mode 100644 SOURCES/bz1470813-fencing-2-fix-power-timeout.patch delete mode 100644 SOURCES/bz1470813-fencing-3-make-timeout-0-mean-forever.patch delete mode 100644 SOURCES/bz1470813-fencing-4-make-timeout-0-mean-forever.patch delete mode 100644 SOURCES/bz1470827-all-agents-log-exceptions-fail.patch delete mode 100644 SOURCES/bz1650214-fence_azure_arm-bundled.patch delete mode 100644 SOURCES/bz1654616-fence_hpblade-fix-log_expect_syntax.patch delete mode 100644 SOURCES/bz1654968-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch delete mode 100644 SOURCES/bz1654973-fence_vmware_soap-cleanup-sigterm.patch delete mode 100644 SOURCES/bz1654976-1-fence_scsi-watchdog-retry-support.patch delete mode 100644 SOURCES/bz1654976-2-build-fix-check_used_options.patch delete mode 100644 SOURCES/bz1666914-1-fence_redfish.patch delete mode 100644 SOURCES/bz1666914-2-fence_redfish-fail-invalid-cert.patch delete mode 100644 SOURCES/bz1677327-1-fence_redfish-use-ipport-parameter.patch delete mode 100644 SOURCES/bz1677327-2-fence_redfish-ip-parameter-backward-compatibility.patch delete mode 100644 SOURCES/bz1685814-fence_gce-add-serviceaccount-file-support.patch delete mode 100644 SOURCES/bz1696584-fence_gce-fix-python3-encoding-issue.patch delete mode 100644 SOURCES/bz1700546-fence_azure_arm-skip_shutdown.patch delete mode 100644 SOURCES/bz1704228-fence_redfish-full-redfish-spec-compliance.patch delete mode 100644 SOURCES/bz1709780-fence_rhevm-RHEV-v4-API-support.patch delete mode 100644 SOURCES/bz1709926-fence_mpath-fix-watchdog-hardreboot.patch delete mode 100644 SOURCES/bz1712263-fence_rhevm-1-use-UTF8-encoding.patch delete mode 100644 SOURCES/bz1712263-fence_rhevm-2-fix-debug-encoding-issues.patch delete mode 100644 SOURCES/bz1714458-fence_scsi-node-id-new-format.patch delete mode 100644 SOURCES/bz1720198-fence_scsi-watchdog-fix-retry-failing-on-first-try.patch delete mode 100644 SOURCES/bz1728203-bz1874862-fence_ibm_vpc-fence_ibm_powervs.patch delete mode 100644 SOURCES/bz1732766-fence_aliyun-1-add-RAM-role.patch delete mode 100644 SOURCES/bz1732766-fence_aliyun-2-import-EcsRamRoleCredential.patch delete mode 100644 SOURCES/bz1732773-fence_vmware_rest-fix-keyerror-suspended-vms.patch delete mode 100644 SOURCES/bz1734811-fence_iloX_ssh-monitor-timeout-warning.patch delete mode 100644 SOURCES/bz1748443-fence_zvmip-python3-fixes.patch delete mode 100644 SOURCES/bz1750596-fence_scsi-add-readonly-parameter.patch delete mode 100644 SOURCES/bz1751704-fence_mpath-fix-watchdog-trigger-multipath-disconnect.patch delete mode 100644 SOURCES/bz1753228-fence_mpath-1-add-plug-parameter-support.patch delete mode 100644 SOURCES/bz1753228-fence_mpath-2-fix-plug-parameter-issues.patch delete mode 100644 SOURCES/bz1760201-fence_compute-fence_evacuate-1-fix-region_name-type.patch delete mode 100644 SOURCES/bz1760201-fence_compute-fence_evacuate-2-fix-project-shortopt.patch delete mode 100644 SOURCES/bz1760213-fence_compute-disable-service-after-force-down.patch delete mode 100644 SOURCES/bz1760224-fence_vmware_rest-improve-logging.patch delete mode 100644 SOURCES/bz1763674-fence_rhevm-add-cookie-support.patch delete mode 100644 SOURCES/bz1769783-fencing-improve-stdin-quote-parsing.patch delete mode 100644 SOURCES/bz1771594-1-fencing-inetX_only-SSH-fence_zvmip.patch delete mode 100644 SOURCES/bz1771594-2-fence_redfish-fence_vmware_soap-suppress-warning.patch delete mode 100644 SOURCES/bz1773890-fence_scsi-add-hash-key-value-support.patch delete mode 100644 SOURCES/bz1774458-fence_sbd-stderr-support.patch delete mode 100644 SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch delete mode 100644 SOURCES/bz1780825-fencing-2-metadata-fix-long-parameters.patch delete mode 100644 SOURCES/bz1781357-fence_aws-improve-logging-and-metadata-usage-text.patch delete mode 100644 SOURCES/bz1787178-1-fence_vmware_soap-set-timeout-cleanup-tmp-dirs.patch delete mode 100644 SOURCES/bz1787178-2-fence_vmware_soap-login-timeout-15s.patch delete mode 100644 SOURCES/bz1793739-fence_vmware_rest-1-fix-encoding.patch delete mode 100644 SOURCES/bz1793739-fence_vmware_rest-2-support-utf-8-vm-names.patch delete mode 100644 SOURCES/bz1793739-fence_vmware_rest-3-fix-encode-issue.patch delete mode 100644 SOURCES/bz1796654-fence_vmware_soap-log-exception-message-for-SSLError.patch delete mode 100644 SOURCES/bz1798641-fence_mpath-fix-reserve-parameter-typo.patch delete mode 100644 SOURCES/bz1810457-fence_aws-improve-parameter-logic.patch delete mode 100644 SOURCES/bz1816203-fence_aws-1-fix-race-condition.patch delete mode 100644 SOURCES/bz1816203-fence_aws-2-fix-python3-encoding.patch delete mode 100644 SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch delete mode 100644 SOURCES/bz1827559-fence_vmware_rest-improve-exception-handling.patch delete mode 100644 SOURCES/bz1827652-fence_vmware_rest-1-add-filter-parameter.patch delete mode 100644 SOURCES/bz1827652-fence_vmware_rest-2-fix-1000-VM-monitor-error.patch delete mode 100644 SOURCES/bz1830776-fence_compute-fence_evacuate-fix-insecure-parameter.patch delete mode 100644 SOURCES/bz1839776-fence_aws-catch-connectionerror.patch delete mode 100644 SOURCES/bz1841087-fence_scsi-dont-write-key-device-to-file.patch delete mode 100644 SOURCES/bz1851115-fence_mpath-support-comma-and-space-separated-devices.patch delete mode 100644 SOURCES/bz1853973-fence_ipmilan-allow-increasing-ipmitool-verbosity.patch delete mode 100644 SOURCES/bz1859932-fence_evacuate-support-private-flavors.patch delete mode 100644 SOURCES/bz1860544-fence_lpar-fix-long-user-host-issue.patch delete mode 100644 SOURCES/bz1861926-fence_lpar-fix-list-status-action.patch delete mode 100644 SOURCES/bz1886074-1-fencing-source_env.patch delete mode 100644 SOURCES/bz1886074-2-fence_openstack.patch delete mode 100644 SOURCES/bz1886074-4-fencing-source_env-dont-process-empty-lines.patch delete mode 100644 SOURCES/bz1896827-fence_aws-add-imdsv2-support.patch delete mode 100644 SOURCES/bz1906978-fence_gce-default-to-onoff.patch delete mode 100644 SOURCES/bz1914313-fence_zvmip-fix-disable-timeout.patch delete mode 100644 SOURCES/bz1920947-fence_redfish-1-add-diag-action.patch delete mode 100644 SOURCES/bz1920947-fence_redfish-2-add-diag-action-logic.patch delete mode 100644 SOURCES/bz1920947-fence_redfish-3-fix-typo.patch delete mode 100644 SOURCES/bz1922437-fence_mpath-watchdog-retry-support.patch delete mode 100644 SOURCES/bz1925015-fence_ipmilan-add-fence_ipmilanplus.patch delete mode 100644 SOURCES/bz1941989-fence_aws-add-filter-parameter.patch delete mode 100644 SOURCES/bz1942363-fence_gce-default-to-cycle.patch delete mode 100644 SOURCES/bz1963163-fence_zvmip-add-ssl-tls-support.patch delete mode 100644 SOURCES/bz1969953-fence_gce-1-add-proxy-support.patch delete mode 100644 SOURCES/bz1969953-fence_gce-2-bundled.patch delete mode 100644 SOURCES/bz1969953-fence_gce-3-fix-httplib2-import.patch delete mode 100644 SOURCES/bz1971683-fence_sbd-dont-spam-logs-disable-timeout.patch delete mode 100644 SOURCES/bz1977588-1-fencing-add-EC_FETCH_VM_UUID.patch delete mode 100644 SOURCES/bz1977588-2-fence_kubevirt.patch delete mode 100644 SOURCES/bz1977588-3-fence_kubevirt-fix-status.patch delete mode 100644 SOURCES/bz1977588-4-fence_kubevirt-power-timeout-40s.patch delete mode 100644 SOURCES/bz1977588-5-fence_kubevirt-get-namespace-from-context.patch delete mode 100644 SOURCES/bz2010710-1-fence_amt_ws-fix-or-dead-code.patch delete mode 100644 SOURCES/bz2010710-2-fence_amt_ws-boot-option.patch delete mode 100644 SOURCES/bz2048857-fence_aws-botocore-bundled.patch delete mode 100644 SOURCES/bz2072421-1-all-agents-unify-ssl-parameters.patch delete mode 100644 SOURCES/bz2072421-2-fence_zvmip-connect-error.patch delete mode 100644 SOURCES/bz2078244-fence_gce-update.patch delete mode 100644 SOURCES/bz2080729-1-fence_apc-fence_ilo_moonshot-import-logging.patch delete mode 100644 SOURCES/bz2080729-2-fence_lpar-fix-import-fail_usage.patch delete mode 100644 SOURCES/bz2080994-fence_ibm_vpc-fix-parameters.patch delete mode 100644 SOURCES/bz2091826-fence_ibm_vpc-add-proxy-support.patch delete mode 100644 SOURCES/bz2092921-fence_ibm_powervs-proxy-private-api-servers.patch delete mode 100644 SOURCES/bz2102024-fence_ibm_vpc-add-token-cache-support.patch delete mode 100644 SOURCES/bz2134017-fence_lpar-only-output-additional-info-on-debug.patch delete mode 100644 SOURCES/bz2136076-fence_ibm_powervs-improve-defaults.patch delete mode 100644 SOURCES/bz2152105-fencing-1-add-plug_separator.patch delete mode 100644 SOURCES/bz2152105-fencing-2-update-DEPENDENCY_OPT.patch delete mode 100644 SOURCES/bz2155453-fence_ibm_powervs-performance-improvements.patch delete mode 100644 SOURCES/bz2160478-fence_scsi-fix-validate-all.patch delete mode 100644 SOURCES/bz2183158-fence_aws-1-add-skip-race-check-parameter.patch delete mode 100644 SOURCES/bz2183158-fence_aws-2-fail-when-power-action-request-fails.patch delete mode 100644 SOURCES/bz2187329-fence_scsi-1-detect-devices-in-shared-vgs.patch delete mode 100644 SOURCES/bz2187329-fence_scsi-2-support-space-separated-devices.patch delete mode 100644 SOURCES/bz2211460-fence_azure-arm-1-stack-hub-support.patch delete mode 100644 SOURCES/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch delete mode 100644 SOURCES/bz2218234-1-kubevirt-fix-bundled-dateutil-CVE-2007-4559.patch delete mode 100644 SOURCES/bz2218234-2-aws-fix-bundled-dateutil-CVE-2007-4559.patch delete mode 100644 SOURCES/fence_aliyun-1.patch delete mode 100644 SOURCES/fence_aliyun-2.patch delete mode 100644 SOURCES/fence_aliyun-3-logging.patch delete mode 100644 SOURCES/fence_aliyun-4-bundled.patch delete mode 100644 SOURCES/fence_aliyun-5-list-instance-names.patch delete mode 100644 SOURCES/fence_aliyun-6-correct-help-indentation.patch delete mode 100644 SOURCES/fence_cisco_ucs-encode-POSTFIELDS.patch delete mode 100644 SOURCES/fence_compute-fence_evacuate-fix-compute-domain.patch delete mode 100644 SOURCES/fence_evacuate-fix-evacuable-tag-mix-issue.patch delete mode 100644 SOURCES/fence_gce-1-stackdriver-logging-default-method-cycle.patch delete mode 100644 SOURCES/fence_gce-2-filter-aggregatedlist.patch delete mode 100644 SOURCES/fence_gce-3-stackdriver-logging-note.patch delete mode 100644 SOURCES/fence_ilo3-fence_ipmilan-show-correct-default-method.patch delete mode 100644 SOURCES/fence_impilan-fence_ilo_ssh-add-ilo5-support.patch delete mode 100644 SOURCES/fence_kdump-fix-strncpy-issue.patch delete mode 100644 SOURCES/fence_mpath-watchdog-support.patch delete mode 100644 SOURCES/fix-version.patch create mode 100644 SOURCES/ha-cloud-support-aliyun.patch create mode 100644 SOURCES/ha-cloud-support-aws.patch create mode 100644 SOURCES/ha-cloud-support-azure.patch create mode 100644 SOURCES/ha-cloud-support-google.patch delete mode 100644 SOURCES/python3-has_key-fixes.patch create mode 100644 SOURCES/requirements-aliyun.txt create mode 100644 SOURCES/requirements-aws.txt create mode 100644 SOURCES/requirements-common.txt create mode 100644 SOURCES/requirements-google.txt diff --git a/.fence-agents.metadata b/.fence-agents.metadata index b878bd1..abf48db 100644 --- a/.fence-agents.metadata +++ b/.fence-agents.metadata @@ -1,62 +1,52 @@ -3297473a9d57e93ff378eab173990c1b64673c01 SOURCES/Jinja2-3.0.2.tar.gz -e1b766b2b1601fde67b3b19ed2f13b9746bb1cca SOURCES/MarkupSafe-2.0.1.tar.gz -3880207fdf0db1eeadf976092c8fbf80a7335c24 SOURCES/PyJWT-2.4.0.tar.gz -a8c40a3ae9d4c159382a58db3153d83e5521c51e SOURCES/PyYAML-6.0.tar.gz 0c47ce98be5a519023c16e10027ed1268c489fcc SOURCES/adal-1.2.7.tar.gz -0a56f6d9ed2014a363486d33b63eca094379be06 SOURCES/aliyun-python-sdk-core-2.13.1.tar.gz -c2a98b9a1562d223a76514f05028488ca000c395 SOURCES/aliyun-python-sdk-ecs-4.9.3.tar.gz -f14647a4d37a9a254c4e711b95a7654fc418e41e SOURCES/aliyun-python-sdk-vpc-3.0.2.tar.gz +f524069cc0d499c78034b66cf0e8e45344e89791 SOURCES/aliyun-cli-3.0.198.tar.gz +c6a6dd2c97adb5a22856ce78ad9e3fdc1cbb9760 SOURCES/aliyun-cli-go-vendor.tar.gz +87ad43ef7b7e1cbcba1d743541b3118cffda63f8 SOURCES/aliyun-openapi-meta-5cf98b660.tar.gz +f88064e2c1cfe01d293165cf88122ed4d1974c4a SOURCES/aliyun-python-sdk-core-2.14.0.tar.gz +bafe71cb92237eb5fc1302907ee7163dca859e63 SOURCES/aliyun-python-sdk-ecs-4.24.71.tar.gz 1f493a02d15374027ae2bcb2ea4daf5b907c528b SOURCES/azure-common-1.1.28.zip -acfa532a6e6acc7311d697b3835a6190796ab5b4 SOURCES/azure-core-1.24.2.zip -46d2d17d958ae305ced32fdd6aa847b0cdf31989 SOURCES/azure-identity-1.10.0.zip -2a2e61ec1805165b19c4652b316225ced9b1ca28 SOURCES/azure-mgmt-compute-27.2.0.zip -f73acf29dd33e65a37b13dc8048832cbdd9e8306 SOURCES/azure-mgmt-core-1.3.2.zip -d4672e130177a9b330cf40c5bded8ed3aa4b1143 SOURCES/azure-mgmt-network-20.0.0.zip -2512ff4ef016cad0b916006f6acf2a309f908c4d SOURCES/botocore-1.23.46.tar.gz -0d12f48faa727f0979e9ad5c4c80dfa32b73caff SOURCES/cachetools-4.2.4.tar.gz -ec7e8dd8ef95edfdb83a1ea040b8b88507b47615 SOURCES/certifi-2023.7.22.tar.gz -c42a46cd11f6153f299cf10e9c236e8b2a143c21 SOURCES/cffi-1.15.1.tar.gz -2384f6cfba4685d901262e073a4455d4cf76d102 SOURCES/chardet-4.0.0.tar.gz -865df92e66e5dc7b940144cbad8115c07dc8784f SOURCES/charset-normalizer-2.0.7.tar.gz -eb8be696115458f9368432525e9cae11d0f6bebf SOURCES/cryptography-3.3.2.tar.gz -e2561df8e7ff9113dab118a651371dd88dab0142 SOURCES/fence-agents-4.2.1.tar.gz -81c165cd2a388d5a6cd415308edaf11ee5bf42cd SOURCES/flit_core-3.10.1.tar.gz -f4e578dc0ed68d6667d7b36cdfc2647d55e9858f SOURCES/google-auth-2.3.0.tar.gz -74ec77d2e2ef6b2ef8503e6e398faa6f3ba298ae SOURCES/httplib2-0.19.1-py3-none-any.whl -08c0449533fc94462f78652dea209099754d9ee4 SOURCES/idna-3.3.tar.gz +8f9ddd1b38ad9c712b17b4eb47f79faf92ab8fb6 SOURCES/azure_core-1.32.0.tar.gz +5f357dc1a8a3794a9aa2c7ffbedbce73e0c84f26 SOURCES/azure_identity-1.19.0.tar.gz +838eaf93a9cd4dfd3c87a342ee7691cf799b2df2 SOURCES/azure_mgmt_compute-34.0.0.tar.gz +adc0e3e2d5b126174273efcc40a5e6fc8fe8a8ff SOURCES/azure_mgmt_core-1.5.0.tar.gz +f70832bb6367a31808c22849ae2932dae9b17df0 SOURCES/azure_mgmt_network-28.1.0.tar.gz +fb71ae78924e9ff0b6c4554cdcd296566425c5a5 SOURCES/boto3-1.34.47.tar.gz +5b83772c69ffc1c824dd3a103895280bebc8533e SOURCES/botocore-1.34.47.tar.gz +7564e02ec291f37c2725b37fc509ce5e5bf06f7d SOURCES/cachetools-5.3.2.tar.gz +466e20febcc380322425d17f37b22a132531245b SOURCES/certifi-2025.1.31.tar.gz +4766fb07e700945a7085d073257f1f320d037ce8 SOURCES/chardet-3.0.4.tar.gz +f1d9cc4eb80880b9e3d9098186295c8381ff1b17 SOURCES/fence-agents-4.16.0.tar.gz +eaddaabf592cdd355bda42e09961838c9ec083e4 SOURCES/google-api-core-1.34.1.tar.gz +8316786f719ec4186aa2c0de43705b29a5e3debf SOURCES/google-api-python-client-1.12.8.tar.gz +20c2db04cef099de817501334b7349ba0acfdb89 SOURCES/google-auth-2.28.1.tar.gz +24d437d68886fa778adf5594373ab1685cb4a2b8 SOURCES/google-auth-httplib2-0.2.0.tar.gz +e3885fb3eaa9ea01fd19934c85975877c8281b8d SOURCES/googleapis-common-protos-1.62.0.tar.gz +6a5cda64d2486d008d528001328b8a0d38f0ef76 SOURCES/httplib2-0.22.0.tar.gz ea36ce1c780dd44f01225dca7f9995a6685a60cc SOURCES/isodate-0.6.1.tar.gz 356c48dfea2214dd9e7e2b222a99dddfe9c0d05c SOURCES/jmespath-0.10.0.tar.gz -d06a9547b1a87e9c51b0a7c708189d993f2e3d89 SOURCES/kubernetes-12.0.1.tar.gz -373683b6adda29af3b1334a69bf149b85deb7899 SOURCES/msal-1.27.0.tar.gz -04e016bd1fa4ed6ddb852095a45d4f8c81a5b54a SOURCES/msal-extensions-1.0.0.tar.gz +543884a4fc2756dad73f4e5af277bd60fb6b6e10 SOURCES/kubernetes-29.0.0.tar.gz +346d0213ff6527435a2a04c07c21a80accd7fdf7 SOURCES/msal-1.31.1.tar.gz +e7db7d42807fb756777b01b1569075343c6122e9 SOURCES/msal_extensions-1.2.0.tar.gz 00c5509205e59ebae09e5d3fe068ab61588e9b4a SOURCES/msrest-0.7.1.zip -bcedc87fc73e9738cbc8b0435513c01b6eb0b5c2 SOURCES/msrestazure-0.6.4.tar.gz -f6efa66f6106b069b5c0e0cf8cc677e4e96c91ca SOURCES/oauthlib-3.1.1.tar.gz -7e2f8f4cebf309ef6aaf740ee9073276d6937802 SOURCES/oauthlib-3.2.2.tar.gz -570d69d8c108ebb8aee562389d13b07dfb61ce25 SOURCES/openshift-0.12.1.tar.gz -bccbc1bf76a9db46998eb8e1ffa2f2a2baf9237a SOURCES/packaging-21.2-py3-none-any.whl -a243525070cf70f22a185447ebd3e1435dabb218 SOURCES/pip-21.3.1.tar.gz -67c8e65065f751c87cadf973a0a2d7b2cfad3bfa SOURCES/poetry-core-1.0.8.tar.gz -4f099f76d500f4ca500a17a3a647f84b7a796e54 SOURCES/portalocker-2.7.0.tar.gz -e0fa19f8fda46a1fa2253477499b116b33f67175 SOURCES/pyasn1-0.4.8.tar.gz -43b89feb6864fe359aae89120627165219de313b SOURCES/pyasn1-modules-0.2.8.tar.gz -0ae93d89b69fab48af3a407a2f8663bcea270c3d SOURCES/pycparser-2.20.tar.gz -c55d177e9484d974c95078d4ae945f89ba2c7251 SOURCES/pycryptodome-3.20.0.tar.gz -c8307f47e3b75a2d02af72982a2dfefa3f56e407 SOURCES/pyparsing-2.4.7-py2.py3-none-any.whl -c2ba10c775b7a52a4b57cac4d4110a0c0f812a82 SOURCES/python-dateutil-2.8.2.tar.gz +b21ec03f79d2a7ef4396d909f78130a92455c3c9 SOURCES/msrestazure-0.6.4.post1.tar.gz +ec6c2c1def6ac71dbc7b46018678095d3fa35ca3 SOURCES/openshift-0.13.2.tar.gz +254269119cce9f243697078a6e8aa47c44f64ac5 SOURCES/poetry_core-1.9.0.tar.gz +0d658147b59dc66274d11ae534da617789963e06 SOURCES/portalocker-2.10.1.tar.gz +da3138d011ddc6e9917810e22b7d71bc2b587857 SOURCES/pyasn1-0.5.1.tar.gz +f9638f8587c5867d902b6e1f0dd4a333c64b5550 SOURCES/pyasn1_modules-0.3.0.tar.gz +d36e54b3d6d36460dae0c7a2b9971d72d16d8225 SOURCES/pycurl-7.45.3.tar.gz +8e66ffa66da909996f5d3796be66f4e5fd26b88e SOURCES/pyjwt-2.10.1.tar.gz +770968018322c2b3fde684aebe964663c6f5d8c5 SOURCES/pyroute2-0.7.12.tar.gz +086fd01f5d989a69eeda46b8a41a53ced5bb402b SOURCES/pyroute2.core-0.6.13.tar.gz +9575a9b38119670705b0a6c2648455d97b22ddc6 SOURCES/pyroute2.ethtool-0.6.13.tar.gz +751cb7dc70e3c1780a670c26ca5721de7caef5e7 SOURCES/pyroute2.ipdb-0.6.13.tar.gz +c204fa61b905fe7b65e250e9204a642bbf3bb84c SOURCES/pyroute2.ipset-0.6.13.tar.gz +d5cba2a4501ffcaf7dcf3df9e9072c4fe343fc02 SOURCES/pyroute2.ndb-0.6.13.tar.gz +4939a1807c414682446d836307543928146bda25 SOURCES/pyroute2.nftables-0.6.13.tar.gz +9ea5167f48860ac18a969b8830925852830297cc SOURCES/pyroute2.nslink-0.6.13.tar.gz 1dc2fa004aa6517f1620e55d8a7b8e68a9cf2a47 SOURCES/python-string-utils-1.0.0.tar.gz -8c7a89d183d3e9b70bf91ba5b75eccf7111b9d8d SOURCES/requests-2.26.0.tar.gz -96c46fc47e75d06fa7ead4d7fb1ae7d58d68989f SOURCES/requests-2.27.1.tar.gz -f139aed770519b6a095b8fdc888d03955cbe9d8e SOURCES/requests-oauthlib-1.3.0.tar.gz -024bb67bc625557fd15b70e1c8e7d6abf5aa75dd SOURCES/requests-oauthlib-2.0.0.tar.gz -e8a53067e03fe1b6682fd99a40a7359396a06daa SOURCES/rsa-4.7.2.tar.gz -d1011ff44cd5a045de0460c1b79ec65592e86860 SOURCES/ruamel.yaml-0.17.16.tar.gz -27de97227bbbde5a9f571f9fad223578d7bdf7cc SOURCES/ruamel.yaml.clib-0.2.6.tar.gz -d5354718cb8c9330d3abc27445467ce8a5ed9d70 SOURCES/setuptools-58.3.0.tar.gz -0f34eba670121f9c41939ca8d805687de359f71c SOURCES/setuptools_scm-6.4.2.tar.gz -06fa0bb50f2a4e2917fd14c21e9d2d5508ce0163 SOURCES/six-1.16.0.tar.gz -2a2b9fb5137976719423b1bb8241b83eb32bb7b0 SOURCES/tomli-1.1.0.tar.gz -0fab53e2ff16ae6370cfcf72e3e251535a5ebe74 SOURCES/typing_extensions-4.1.1.tar.gz -84e2852d8da1655373f7ce5e7d5d3e256b62b4e4 SOURCES/urllib3-1.26.18.tar.gz -540f083782c584989c1a0f69ffd69ba7aae07db6 SOURCES/websocket-client-1.2.1.tar.gz -f9f3d980579b88baaacdb6c4a3cc4466b9353030 SOURCES/wheel-0.37.1.tar.gz +71e3485aa2bbe020426a8604151b5175e157091b SOURCES/rsa-4.9.tar.gz +3c6357efc96438337cb0ee3db78b35e8d7fca47e SOURCES/s3transfer-0.10.0.tar.gz +5ab966b652a8fe6ae5f61ee52ada4608a0d71f3a SOURCES/suds-community-1.1.2.tar.gz +402d198c4b7c95c06267910886d93ea56f5ef546 SOURCES/uritemplate-3.0.1.tar.gz +51025275351e8cf24c133b524650ddf8faac5744 SOURCES/websocket-client-1.7.0.tar.gz diff --git a/.gitignore b/.gitignore index 8ab9745..4d69346 100644 --- a/.gitignore +++ b/.gitignore @@ -1,62 +1,52 @@ -SOURCES/Jinja2-3.0.2.tar.gz -SOURCES/MarkupSafe-2.0.1.tar.gz -SOURCES/PyJWT-2.4.0.tar.gz -SOURCES/PyYAML-6.0.tar.gz SOURCES/adal-1.2.7.tar.gz -SOURCES/aliyun-python-sdk-core-2.13.1.tar.gz -SOURCES/aliyun-python-sdk-ecs-4.9.3.tar.gz -SOURCES/aliyun-python-sdk-vpc-3.0.2.tar.gz +SOURCES/aliyun-cli-3.0.198.tar.gz +SOURCES/aliyun-cli-go-vendor.tar.gz +SOURCES/aliyun-openapi-meta-5cf98b660.tar.gz +SOURCES/aliyun-python-sdk-core-2.14.0.tar.gz +SOURCES/aliyun-python-sdk-ecs-4.24.71.tar.gz SOURCES/azure-common-1.1.28.zip -SOURCES/azure-core-1.24.2.zip -SOURCES/azure-identity-1.10.0.zip -SOURCES/azure-mgmt-compute-27.2.0.zip -SOURCES/azure-mgmt-core-1.3.2.zip -SOURCES/azure-mgmt-network-20.0.0.zip -SOURCES/botocore-1.23.46.tar.gz -SOURCES/cachetools-4.2.4.tar.gz -SOURCES/certifi-2023.7.22.tar.gz -SOURCES/cffi-1.15.1.tar.gz -SOURCES/chardet-4.0.0.tar.gz -SOURCES/charset-normalizer-2.0.7.tar.gz -SOURCES/cryptography-3.3.2.tar.gz -SOURCES/fence-agents-4.2.1.tar.gz -SOURCES/flit_core-3.10.1.tar.gz -SOURCES/google-auth-2.3.0.tar.gz -SOURCES/httplib2-0.19.1-py3-none-any.whl -SOURCES/idna-3.3.tar.gz +SOURCES/azure_core-1.32.0.tar.gz +SOURCES/azure_identity-1.19.0.tar.gz +SOURCES/azure_mgmt_compute-34.0.0.tar.gz +SOURCES/azure_mgmt_core-1.5.0.tar.gz +SOURCES/azure_mgmt_network-28.1.0.tar.gz +SOURCES/boto3-1.34.47.tar.gz +SOURCES/botocore-1.34.47.tar.gz +SOURCES/cachetools-5.3.2.tar.gz +SOURCES/certifi-2025.1.31.tar.gz +SOURCES/chardet-3.0.4.tar.gz +SOURCES/fence-agents-4.16.0.tar.gz +SOURCES/google-api-core-1.34.1.tar.gz +SOURCES/google-api-python-client-1.12.8.tar.gz +SOURCES/google-auth-2.28.1.tar.gz +SOURCES/google-auth-httplib2-0.2.0.tar.gz +SOURCES/googleapis-common-protos-1.62.0.tar.gz +SOURCES/httplib2-0.22.0.tar.gz SOURCES/isodate-0.6.1.tar.gz SOURCES/jmespath-0.10.0.tar.gz -SOURCES/kubernetes-12.0.1.tar.gz -SOURCES/msal-1.27.0.tar.gz -SOURCES/msal-extensions-1.0.0.tar.gz +SOURCES/kubernetes-29.0.0.tar.gz +SOURCES/msal-1.31.1.tar.gz +SOURCES/msal_extensions-1.2.0.tar.gz SOURCES/msrest-0.7.1.zip -SOURCES/msrestazure-0.6.4.tar.gz -SOURCES/oauthlib-3.1.1.tar.gz -SOURCES/oauthlib-3.2.2.tar.gz -SOURCES/openshift-0.12.1.tar.gz -SOURCES/packaging-21.2-py3-none-any.whl -SOURCES/pip-21.3.1.tar.gz -SOURCES/poetry-core-1.0.8.tar.gz -SOURCES/portalocker-2.7.0.tar.gz -SOURCES/pyasn1-0.4.8.tar.gz -SOURCES/pyasn1-modules-0.2.8.tar.gz -SOURCES/pycparser-2.20.tar.gz -SOURCES/pycryptodome-3.20.0.tar.gz -SOURCES/pyparsing-2.4.7-py2.py3-none-any.whl -SOURCES/python-dateutil-2.8.2.tar.gz +SOURCES/msrestazure-0.6.4.post1.tar.gz +SOURCES/openshift-0.13.2.tar.gz +SOURCES/poetry_core-1.9.0.tar.gz +SOURCES/portalocker-2.10.1.tar.gz +SOURCES/pyasn1-0.5.1.tar.gz +SOURCES/pyasn1_modules-0.3.0.tar.gz +SOURCES/pycurl-7.45.3.tar.gz +SOURCES/pyjwt-2.10.1.tar.gz +SOURCES/pyroute2-0.7.12.tar.gz +SOURCES/pyroute2.core-0.6.13.tar.gz +SOURCES/pyroute2.ethtool-0.6.13.tar.gz +SOURCES/pyroute2.ipdb-0.6.13.tar.gz +SOURCES/pyroute2.ipset-0.6.13.tar.gz +SOURCES/pyroute2.ndb-0.6.13.tar.gz +SOURCES/pyroute2.nftables-0.6.13.tar.gz +SOURCES/pyroute2.nslink-0.6.13.tar.gz SOURCES/python-string-utils-1.0.0.tar.gz -SOURCES/requests-2.26.0.tar.gz -SOURCES/requests-2.27.1.tar.gz -SOURCES/requests-oauthlib-1.3.0.tar.gz -SOURCES/requests-oauthlib-2.0.0.tar.gz -SOURCES/rsa-4.7.2.tar.gz -SOURCES/ruamel.yaml-0.17.16.tar.gz -SOURCES/ruamel.yaml.clib-0.2.6.tar.gz -SOURCES/setuptools-58.3.0.tar.gz -SOURCES/setuptools_scm-6.4.2.tar.gz -SOURCES/six-1.16.0.tar.gz -SOURCES/tomli-1.1.0.tar.gz -SOURCES/typing_extensions-4.1.1.tar.gz -SOURCES/urllib3-1.26.18.tar.gz -SOURCES/websocket-client-1.2.1.tar.gz -SOURCES/wheel-0.37.1.tar.gz +SOURCES/rsa-4.9.tar.gz +SOURCES/s3transfer-0.10.0.tar.gz +SOURCES/suds-community-1.1.2.tar.gz +SOURCES/uritemplate-3.0.1.tar.gz +SOURCES/websocket-client-1.7.0.tar.gz diff --git a/SOURCES/RHEL-14031-1-all-agents-metadata-update-IO-Power-Network.patch b/SOURCES/RHEL-14031-1-all-agents-metadata-update-IO-Power-Network.patch deleted file mode 100644 index bd12a68..0000000 --- a/SOURCES/RHEL-14031-1-all-agents-metadata-update-IO-Power-Network.patch +++ /dev/null @@ -1,1701 +0,0 @@ -From aed06661b0b6fd4e69d44672f59bb8d3eecccc67 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 18 Oct 2023 10:53:14 +0200 -Subject: [PATCH] all agents: update metadata from I/O to e.g. Power, Network, - etc for non-I/O agents - ---- - agents/aliyun/fence_aliyun.py | 2 +- - agents/alom/fence_alom.py | 4 ++-- - agents/amt/fence_amt.py | 2 +- - agents/amt_ws/fence_amt_ws.py | 2 +- - agents/apc/fence_apc.py | 2 +- - agents/apc_snmp/fence_apc_snmp.py | 6 +++--- - agents/aws/fence_aws.py | 2 +- - agents/azure_arm/fence_azure_arm.py | 2 +- - agents/bladecenter/fence_bladecenter.py | 2 +- - agents/cdu/fence_cdu.py | 2 +- - agents/cisco_mds/fence_cisco_mds.py | 2 +- - agents/cisco_ucs/fence_cisco_ucs.py | 2 +- - agents/cyberpower_ssh/fence_cyberpower_ssh.py | 2 +- - agents/docker/fence_docker.py | 2 +- - agents/drac/fence_drac.py | 4 ++-- - agents/drac5/fence_drac5.py | 2 +- - agents/eaton_snmp/fence_eaton_snmp.py | 2 +- - agents/eaton_ssh/fence_eaton_ssh.py | 2 +- - agents/ecloud/fence_ecloud.py | 2 +- - agents/emerson/fence_emerson.py | 4 ++-- - agents/eps/fence_eps.py | 2 +- - agents/gce/fence_gce.py | 2 +- - agents/hds_cb/fence_hds_cb.py | 2 +- - agents/hpblade/fence_hpblade.py | 2 +- - agents/ibm_powervs/fence_ibm_powervs.py | 2 +- - agents/ibm_vpc/fence_ibm_vpc.py | 2 +- - agents/ibmblade/fence_ibmblade.py | 2 +- - agents/ibmz/fence_ibmz.py | 2 +- - agents/ilo/fence_ilo.py | 6 +++--- - agents/ilo_moonshot/fence_ilo_moonshot.py | 2 ++ - agents/ilo_mp/fence_ilo_mp.py | 3 ++- - agents/ilo_ssh/fence_ilo_ssh.py | 6 +++--- - agents/intelmodular/fence_intelmodular.py | 2 +- - agents/ipdu/fence_ipdu.py | 2 +- - agents/ipmilan/fence_ipmilan.py | 4 ++-- - agents/ironic/fence_ironic.py | 2 +- - agents/kubevirt/fence_kubevirt.py | 2 +- - agents/ldom/fence_ldom.py | 2 +- - agents/lindy_pdu/fence_lindypdu.py | 2 +- - agents/lpar/fence_lpar.py | 2 +- - agents/mpath/fence_mpath.py | 2 +- - agents/netio/fence_netio.py | 4 ++-- - agents/openstack/fence_openstack.py | 2 +- - agents/ovh/fence_ovh.py | 2 +- - agents/powerman/fence_powerman.py | 2 +- - agents/pve/fence_pve.py | 4 ++-- - agents/raritan/fence_raritan.py | 4 ++-- - agents/raritan_px3/fence_raritan_px3.py | 4 ++-- - agents/rcd_serial/fence_rcd_serial.py | 11 ++++++----- - agents/redfish/fence_redfish.py | 4 ++-- - agents/rhevm/fence_rhevm.py | 2 +- - agents/rsa/fence_rsa.py | 2 +- - agents/rsb/fence_rsb.py | 4 ++-- - agents/sbd/fence_sbd.py | 2 +- - agents/scsi/fence_scsi.py | 2 +- - agents/skalar/fence_skalar.py | 2 +- - agents/vbox/fence_vbox.py | 2 +- - agents/virsh/fence_virsh.py | 2 +- - agents/virt/client/options.c | 2 +- - agents/vmware/fence_vmware.py | 2 +- - agents/vmware_rest/fence_vmware_rest.py | 2 +- - agents/vmware_soap/fence_vmware_soap.py | 2 +- - agents/vmware_vcloud/fence_vmware_vcloud.py | 3 ++- - agents/wti/fence_wti.py | 2 +- - agents/xenapi/fence_xenapi.py | 2 +- - agents/zvm/fence_zvmip.py | 4 ++-- - tests/data/metadata/fence_aliyun.xml | 2 +- - tests/data/metadata/fence_alom.xml | 2 +- - tests/data/metadata/fence_amt.xml | 2 +- - tests/data/metadata/fence_amt_ws.xml | 2 +- - tests/data/metadata/fence_apc.xml | 2 +- - tests/data/metadata/fence_apc_snmp.xml | 2 +- - tests/data/metadata/fence_aws.xml | 2 +- - tests/data/metadata/fence_azure_arm.xml | 2 +- - tests/data/metadata/fence_bladecenter.xml | 2 +- - tests/data/metadata/fence_cdu.xml | 2 +- - tests/data/metadata/fence_cisco_mds.xml | 2 +- - tests/data/metadata/fence_cisco_ucs.xml | 2 +- - tests/data/metadata/fence_cyberpower_ssh.xml | 2 +- - tests/data/metadata/fence_docker.xml | 2 +- - tests/data/metadata/fence_drac.xml | 4 ++-- - tests/data/metadata/fence_drac5.xml | 2 +- - tests/data/metadata/fence_eaton_snmp.xml | 2 +- - tests/data/metadata/fence_eaton_ssh.xml | 2 +- - tests/data/metadata/fence_ecloud.xml | 2 +- - tests/data/metadata/fence_emerson.xml | 2 +- - tests/data/metadata/fence_eps.xml | 2 +- - tests/data/metadata/fence_gce.xml | 2 +- - tests/data/metadata/fence_hds_cb.xml | 2 +- - tests/data/metadata/fence_hpblade.xml | 2 +- - tests/data/metadata/fence_ibm_powervs.xml | 2 +- - tests/data/metadata/fence_ibm_vpc.xml | 2 +- - tests/data/metadata/fence_ibmblade.xml | 2 +- - tests/data/metadata/fence_ibmz.xml | 2 +- - tests/data/metadata/fence_idrac.xml | 2 +- - tests/data/metadata/fence_ilo.xml | 2 +- - tests/data/metadata/fence_ilo2.xml | 2 +- - tests/data/metadata/fence_ilo3.xml | 2 +- - tests/data/metadata/fence_ilo3_ssh.xml | 2 +- - tests/data/metadata/fence_ilo4.xml | 2 +- - tests/data/metadata/fence_ilo4_ssh.xml | 2 +- - tests/data/metadata/fence_ilo5.xml | 2 +- - tests/data/metadata/fence_ilo5_ssh.xml | 2 +- - tests/data/metadata/fence_ilo_mp.xml | 2 +- - tests/data/metadata/fence_ilo_ssh.xml | 2 +- - tests/data/metadata/fence_imm.xml | 2 +- - tests/data/metadata/fence_intelmodular.xml | 2 +- - tests/data/metadata/fence_ipdu.xml | 2 +- - tests/data/metadata/fence_ipmilan.xml | 2 +- - tests/data/metadata/fence_ipmilanplus.xml | 2 +- - tests/data/metadata/fence_ironic.xml | 2 +- - tests/data/metadata/fence_kubevirt.xml | 2 +- - tests/data/metadata/fence_ldom.xml | 2 +- - tests/data/metadata/fence_lindypdu.xml | 2 +- - tests/data/metadata/fence_lpar.xml | 2 +- - tests/data/metadata/fence_mpath.xml | 2 +- - tests/data/metadata/fence_netio.xml | 4 ++-- - tests/data/metadata/fence_openstack.xml | 2 +- - tests/data/metadata/fence_ovh.xml | 2 +- - tests/data/metadata/fence_powerman.xml | 2 +- - tests/data/metadata/fence_pve.xml | 2 +- - tests/data/metadata/fence_raritan.xml | 4 ++-- - tests/data/metadata/fence_raritan_px3.xml | 4 ++-- - tests/data/metadata/fence_rcd_serial.xml | 2 +- - tests/data/metadata/fence_redfish.xml | 4 ++-- - tests/data/metadata/fence_rhevm.xml | 2 +- - tests/data/metadata/fence_rsa.xml | 2 +- - tests/data/metadata/fence_rsb.xml | 4 ++-- - tests/data/metadata/fence_sbd.xml | 2 +- - tests/data/metadata/fence_scsi.xml | 2 +- - tests/data/metadata/fence_skalar.xml | 2 +- - tests/data/metadata/fence_tripplite_snmp.xml | 2 +- - tests/data/metadata/fence_vbox.xml | 2 +- - tests/data/metadata/fence_virsh.xml | 2 +- - tests/data/metadata/fence_virt.xml | 2 +- - tests/data/metadata/fence_vmware.xml | 2 +- - tests/data/metadata/fence_vmware_rest.xml | 2 +- - tests/data/metadata/fence_vmware_soap.xml | 2 +- - tests/data/metadata/fence_vmware_vcloud.xml | 2 +- - tests/data/metadata/fence_wti.xml | 2 +- - tests/data/metadata/fence_xenapi.xml | 2 +- - tests/data/metadata/fence_zvmip.xml | 3 +-- - 142 files changed, 173 insertions(+), 169 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index c7785a2b2..134cc5ab6 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -175,7 +175,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Aliyun (Aliyun Web Services)" -- docs["longdesc"] = "fence_aliyun is an I/O Fencing agent for Aliyun" -+ docs["longdesc"] = "fence_aliyun is a Power Fencing agent for Aliyun." - docs["vendorurl"] = "http://www.aliyun.com" - show_docs(options, docs) - -diff --git a/agents/alom/fence_alom.py b/agents/alom/fence_alom.py -index 7b03dc2a6..a8e216f3f 100644 ---- a/agents/alom/fence_alom.py -+++ b/agents/alom/fence_alom.py -@@ -38,8 +38,8 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Sun ALOM" -- docs["longdesc"] = "fence_alom is an I/O Fencing \ --agent which can be used with ALOM connected machines." -+ docs["longdesc"] = "fence_alom is a Power Fencing agent \ -+which can be used with ALOM connected machines." - docs["vendorurl"] = "http://www.sun.com" - show_docs(options, docs) - -diff --git a/agents/amt/fence_amt.py b/agents/amt/fence_amt.py -index 80d3f74c1..183bbc713 100644 ---- a/agents/amt/fence_amt.py -+++ b/agents/amt/fence_amt.py -@@ -113,7 +113,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for AMT" -- docs["longdesc"] = "fence_amt is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_amt is a Power Fencing agent \ - which can be used with Intel AMT. This agent calls support software amttool\ - (http://www.kraxel.org/cgit/amtterm/)." - docs["vendorurl"] = "http://www.intel.com/" -diff --git a/agents/amt_ws/fence_amt_ws.py b/agents/amt_ws/fence_amt_ws.py -index 5e7452a97..89500d4bf 100755 ---- a/agents/amt_ws/fence_amt_ws.py -+++ b/agents/amt_ws/fence_amt_ws.py -@@ -222,7 +222,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for AMT (WS)" -- docs["longdesc"] = "fence_amt_ws is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_amt_ws is a Power Fencing agent \ - which can be used with Intel AMT (WS). This agent requires \ - the pywsman Python library which is included in OpenWSMAN. \ - (http://openwsman.github.io/)." -diff --git a/agents/apc/fence_apc.py b/agents/apc/fence_apc.py -index 3ea0f37d6..bc52aa244 100644 ---- a/agents/apc/fence_apc.py -+++ b/agents/apc/fence_apc.py -@@ -227,7 +227,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for APC over telnet/ssh" -- docs["longdesc"] = "fence_apc is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_apc is a Power Fencing agent \ - which can be used with the APC network power switch. It logs into device \ - via telnet/ssh and reboots a specified outlet. Lengthy telnet/ssh connections \ - should be avoided while a GFS cluster is running because the connection \ -diff --git a/agents/apc_snmp/fence_apc_snmp.py b/agents/apc_snmp/fence_apc_snmp.py -index cd601662c..1091f0da9 100644 ---- a/agents/apc_snmp/fence_apc_snmp.py -+++ b/agents/apc_snmp/fence_apc_snmp.py -@@ -13,7 +13,7 @@ - # - Tripplite PDUMH20HVNET 12.04.0055 - SNMP v1, v2c, v3 - # - Tripplite PDU15NETLX 15.5.4 - SNMP v1, v2c, v3 - --import sys -+import sys, os - import atexit - import logging - sys.path.append("@FENCEAGENTSLIBDIR@") -@@ -216,10 +216,10 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for APC, Tripplite PDU over SNMP" -- docs["longdesc"] = "fence_apc_snmp is an I/O Fencing agent \ -+ docs["longdesc"] = "{} is a Power Fencing agent \ - which can be used with the APC network power switch or Tripplite PDU devices.\ - It logs into a device via SNMP and reboots a specified outlet. It supports \ --SNMP v1, v2c, v3 with all combinations of authenticity/privacy settings." -+SNMP v1, v2c, v3 with all combinations of authenticity/privacy settings.".format(os.path.basename(__file__)) - docs["vendorurl"] = "http://www.apc.com" - docs["symlink"] = [("fence_tripplite_snmp", "Fence agent for Tripplife over SNMP")] - show_docs(options, docs) -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 0a375bbec..5b32106f0 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -185,7 +185,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for AWS (Amazon Web Services)" -- docs["longdesc"] = "fence_aws is an I/O Fencing agent for AWS (Amazon Web\ -+ docs["longdesc"] = "fence_aws is a Power Fencing agent for AWS (Amazon Web\ - Services). It uses the boto3 library to connect to AWS.\ - \n.P\n\ - boto3 can be configured with AWS CLI or by creating ~/.aws/credentials.\n\ -diff --git a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py -index 515aae294..0dca8f30d 100755 ---- a/agents/azure_arm/fence_azure_arm.py -+++ b/agents/azure_arm/fence_azure_arm.py -@@ -221,7 +221,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Azure Resource Manager" -- docs["longdesc"] = "fence_azure_arm is an I/O Fencing agent for Azure Resource Manager. It uses Azure SDK for Python to connect to Azure.\ -+ docs["longdesc"] = "fence_azure_arm is a Power Fencing agent for Azure Resource Manager. It uses Azure SDK for Python to connect to Azure.\ - \n.P\n\ - For instructions to setup credentials see: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal\ - \n.P\n\ -diff --git a/agents/bladecenter/fence_bladecenter.py b/agents/bladecenter/fence_bladecenter.py -index d670367f2..2f2c65fce 100644 ---- a/agents/bladecenter/fence_bladecenter.py -+++ b/agents/bladecenter/fence_bladecenter.py -@@ -86,7 +86,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IBM BladeCenter" -- docs["longdesc"] = "fence_bladecenter is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_bladecenter is a Power Fencing agent \ - which can be used with IBM Bladecenters with recent enough firmware that \ - includes telnet support. It logs into a Brocade chasis via telnet or ssh \ - and uses the command line interface to power on and off blades." -diff --git a/agents/cisco_mds/fence_cisco_mds.py b/agents/cisco_mds/fence_cisco_mds.py -index fbb876a94..04cd1f842 100644 ---- a/agents/cisco_mds/fence_cisco_mds.py -+++ b/agents/cisco_mds/fence_cisco_mds.py -@@ -77,7 +77,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Cisco MDS" -- docs["longdesc"] = "fence_cisco_mds is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_cisco_mds is a Power Fencing agent \ - which can be used with any Cisco MDS 9000 series with SNMP enabled device." - docs["vendorurl"] = "http://www.cisco.com" - show_docs(options, docs) -diff --git a/agents/cisco_ucs/fence_cisco_ucs.py b/agents/cisco_ucs/fence_cisco_ucs.py -index b85379a73..cada20d5e 100644 ---- a/agents/cisco_ucs/fence_cisco_ucs.py -+++ b/agents/cisco_ucs/fence_cisco_ucs.py -@@ -161,7 +161,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Cisco UCS" -- docs["longdesc"] = "fence_cisco_ucs is an I/O Fencing agent which can be \ -+ docs["longdesc"] = "fence_cisco_ucs is a Power Fencing agent which can be \ - used with Cisco UCS to fence machines." - docs["vendorurl"] = "http://www.cisco.com" - show_docs(options_global, docs) -diff --git a/agents/docker/fence_docker.py b/agents/docker/fence_docker.py -index 004402518..8042515a3 100644 ---- a/agents/docker/fence_docker.py -+++ b/agents/docker/fence_docker.py -@@ -143,7 +143,7 @@ def main(): - - docs = { } - docs["shortdesc"] = "Fence agent for Docker" -- docs["longdesc"] = "fence_docker is I/O fencing agent which \ -+ docs["longdesc"] = "fence_docker is a Power Fencing agent which \ - can be used with the Docker Engine containers. You can use this \ - fence-agent without any authentication, or you can use TLS authentication \ - (use --ssl option, more info about TLS authentication in docker: \ -diff --git a/agents/drac/fence_drac.py b/agents/drac/fence_drac.py -index be3e9a584..b7d335640 100644 ---- a/agents/drac/fence_drac.py -+++ b/agents/drac/fence_drac.py -@@ -34,8 +34,8 @@ def main(): - options = check_input(device_opt, opt) - - docs = {} -- docs["shortdesc"] = "I/O Fencing agent for Dell DRAC IV" -- docs["longdesc"] = "fence_drac is an I/O Fencing agent which can be used with \ -+ docs["shortdesc"] = "Power Fencing agent for Dell DRAC IV" -+ docs["longdesc"] = "fence_drac is a Power Fencing agent which can be used with \ - the Dell Remote Access Card (DRAC). This card provides remote access to controlling \ - power to a server. It logs into the DRAC through the telnet interface of the card. By \ - default, the telnet interface is not enabled. To enable the interface, you will need \ -diff --git a/agents/drac5/fence_drac5.py b/agents/drac5/fence_drac5.py -index 648ecd917..7b279217e 100644 ---- a/agents/drac5/fence_drac5.py -+++ b/agents/drac5/fence_drac5.py -@@ -110,7 +110,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Dell DRAC CMC/5" -- docs["longdesc"] = "fence_drac5 is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_drac5 is a Power Fencing agent \ - which can be used with the Dell Remote Access Card v5 or CMC (DRAC). \ - This device provides remote access to controlling power to a server. \ - It logs into the DRAC through the telnet/ssh interface of the card. \ -diff --git a/agents/eaton_snmp/fence_eaton_snmp.py b/agents/eaton_snmp/fence_eaton_snmp.py -index 9fbc05634..83ec92a27 100644 ---- a/agents/eaton_snmp/fence_eaton_snmp.py -+++ b/agents/eaton_snmp/fence_eaton_snmp.py -@@ -214,7 +214,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Eaton over SNMP" -- docs["longdesc"] = "fence_eaton_snmp is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_eaton_snmp is a Power Fencing agent \ - which can be used with the Eaton network power switch. It logs \ - into a device via SNMP and reboots a specified outlet. It supports \ - SNMP v1 and v3 with all combinations of authenticity/privacy settings." -diff --git a/agents/emerson/fence_emerson.py b/agents/emerson/fence_emerson.py -index 2e65cda0e..67b3a4106 100644 ---- a/agents/emerson/fence_emerson.py -+++ b/agents/emerson/fence_emerson.py -@@ -49,8 +49,8 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Emerson over SNMP" -- docs["longdesc"] = "fence_emerson is an I/O Fencing agent \ -- which can be used with MPX and MPH2 managed rack PDU." -+ docs["longdesc"] = "fence_emerson is a Power Fencing agent \ -+which can be used with MPX and MPH2 managed rack PDU." - docs["vendorurl"] = "http://www.emersonnetworkpower.com" - show_docs(options, docs) - -diff --git a/agents/eps/fence_eps.py b/agents/eps/fence_eps.py -index f0df86231..81e439533 100644 ---- a/agents/eps/fence_eps.py -+++ b/agents/eps/fence_eps.py -@@ -108,7 +108,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for ePowerSwitch" -- docs["longdesc"] = "fence_eps is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_eps is a Power Fencing agent \ - which can be used with the ePowerSwitch 8M+ power switch to fence \ - connected machines. Fence agent works ONLY on 8M+ device, because \ - this is only one, which has support for hidden page feature. \ -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 2c815b849..b8871038e 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -515,7 +515,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for GCE (Google Cloud Engine)" -- docs["longdesc"] = "fence_gce is an I/O Fencing agent for GCE (Google Cloud " \ -+ docs["longdesc"] = "fence_gce is a Power Fencing agent for GCE (Google Cloud " \ - "Engine). It uses the googleapiclient library to connect to GCE.\n" \ - "googleapiclient can be configured with Google SDK CLI or by " \ - "executing 'gcloud auth application-default login'.\n" \ -diff --git a/agents/hds_cb/fence_hds_cb.py b/agents/hds_cb/fence_hds_cb.py -index 375054cf2..1a064644b 100755 ---- a/agents/hds_cb/fence_hds_cb.py -+++ b/agents/hds_cb/fence_hds_cb.py -@@ -113,7 +113,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Hitachi Compute Blade systems" -- docs["longdesc"] = "fence_hds_cb is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_hds_cb is a Power Fencing agent \ - which can be used with Hitachi Compute Blades with recent enough firmware that \ - includes telnet support." - docs["vendorurl"] = "http://www.hds.com" -diff --git a/agents/hpblade/fence_hpblade.py b/agents/hpblade/fence_hpblade.py -index fbc89f614..eb8f459b2 100644 ---- a/agents/hpblade/fence_hpblade.py -+++ b/agents/hpblade/fence_hpblade.py -@@ -110,7 +110,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for HP BladeSystem" -- docs["longdesc"] = "fence_hpblade is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_hpblade is a Power Fencing agent \ - which can be used with HP BladeSystem and HP Integrity Superdome X. \ - It logs into the onboard administrator of an enclosure via telnet or \ - ssh and uses the command line interface to power blades or partitions \ -diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py -index e65462cb9..73dfe0ab1 100755 ---- a/agents/ibm_powervs/fence_ibm_powervs.py -+++ b/agents/ibm_powervs/fence_ibm_powervs.py -@@ -275,7 +275,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IBM PowerVS" -- docs["longdesc"] = """fence_ibm_powervs is an I/O Fencing agent which can be \ -+ docs["longdesc"] = """fence_ibm_powervs is a Power Fencing agent which can be \ - used with IBM PowerVS to fence virtual machines.""" - docs["vendorurl"] = "https://www.ibm.com" - show_docs(options, docs) -diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py -index 847010584..035a3235a 100755 ---- a/agents/ibm_vpc/fence_ibm_vpc.py -+++ b/agents/ibm_vpc/fence_ibm_vpc.py -@@ -295,7 +295,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IBM Cloud VPC" -- docs["longdesc"] = """fence_ibm_vpc is an I/O Fencing agent which can be \ -+ docs["longdesc"] = """fence_ibm_vpc is a Power Fencing agent which can be \ - used with IBM Cloud VPC to fence virtual machines.""" - docs["vendorurl"] = "https://www.ibm.com" - show_docs(options, docs) -diff --git a/agents/ibmblade/fence_ibmblade.py b/agents/ibmblade/fence_ibmblade.py -index d623fff3d..ca6e21793 100644 ---- a/agents/ibmblade/fence_ibmblade.py -+++ b/agents/ibmblade/fence_ibmblade.py -@@ -57,7 +57,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IBM BladeCenter over SNMP" -- docs["longdesc"] = "fence_ibmblade is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_ibmblade is a Power Fencing agent \ - which can be used with IBM BladeCenter chassis. It issues SNMP Set \ - request to BladeCenter chassis, rebooting, powering up or down \ - the specified Blade Server." -diff --git a/agents/ilo/fence_ilo.py b/agents/ilo/fence_ilo.py -index 612450568..f30a1da28 100644 ---- a/agents/ilo/fence_ilo.py -+++ b/agents/ilo/fence_ilo.py -@@ -11,7 +11,7 @@ - ## iLO2 / firmware 1.50 / RIBCL 2.22 - ##### - --import sys, re, pexpect -+import sys, os, re, pexpect - import atexit - from xml.sax.saxutils import quoteattr - sys.path.append("@FENCEAGENTSLIBDIR@") -@@ -73,11 +73,11 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for HP iLO" -- docs["longdesc"] = "fence_ilo is an I/O Fencing agent \ -+ docs["longdesc"] = "{} is a Power Fencing agent \ - used for HP servers with the Integrated Light Out (iLO) PCI card.\ - The agent opens an SSL connection to the iLO card. Once the SSL \ - connection is established, the agent is able to communicate with \ --the iLO card through an XML stream." -+the iLO card through an XML stream.".format(os.path.basename(__file__)) - docs["vendorurl"] = "http://www.hp.com" - docs["symlink"] = [("fence_ilo2", "Fence agent for HP iLO2")] - show_docs(options, docs) -diff --git a/agents/ilo_moonshot/fence_ilo_moonshot.py b/agents/ilo_moonshot/fence_ilo_moonshot.py -index 1923eeb1c..92bc74525 100644 ---- a/agents/ilo_moonshot/fence_ilo_moonshot.py -+++ b/agents/ilo_moonshot/fence_ilo_moonshot.py -@@ -48,6 +48,8 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for HP Moonshot iLO" -+ docs["longdesc"] = "fence_ilo_moonshot is a Power Fencing agent \ -+for HP Moonshot iLO." - docs["longdesc"] = "" - docs["vendorurl"] = "http://www.hp.com" - show_docs(options, docs) -diff --git a/agents/ilo_mp/fence_ilo_mp.py b/agents/ilo_mp/fence_ilo_mp.py -index 1ae4d3ed5..cc1c2decd 100644 ---- a/agents/ilo_mp/fence_ilo_mp.py -+++ b/agents/ilo_mp/fence_ilo_mp.py -@@ -40,7 +40,8 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for HP iLO MP" -- docs["longdesc"] = "" -+ docs["longdesc"] = "fence_ilo_mp is a Power Fencing agent \ -+for HP iLO MP." - docs["vendorurl"] = "http://www.hp.com" - show_docs(options, docs) - -diff --git a/agents/ilo_ssh/fence_ilo_ssh.py b/agents/ilo_ssh/fence_ilo_ssh.py -index a27e34189..1d5be21ef 100644 ---- a/agents/ilo_ssh/fence_ilo_ssh.py -+++ b/agents/ilo_ssh/fence_ilo_ssh.py -@@ -1,6 +1,6 @@ - #!@PYTHON@ -tt - --import sys, re -+import sys, os, re - import atexit - import logging - sys.path.append("@FENCEAGENTSLIBDIR@") -@@ -50,11 +50,11 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for HP iLO over SSH" -- docs["longdesc"] = "fence_ilo_ssh is a fence agent that connects to iLO device. It logs into \ -+ docs["longdesc"] = "{} is a Power Fencing agent that connects to iLO device. It logs into \ - device via ssh and reboot a specified outlet.\ - \n.P\n\ - WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent \ --to avoid this issue." -+to avoid this issue.".format(os.path.basename(__file__)) - docs["vendorurl"] = "http://www.hp.com" - docs["symlink"] = [("fence_ilo3_ssh", "Fence agent for HP iLO3 over SSH"), - ("fence_ilo4_ssh", "Fence agent for HP iLO4 over SSH"), -diff --git a/agents/intelmodular/fence_intelmodular.py b/agents/intelmodular/fence_intelmodular.py -index 294ea4ddb..e9c417a95 100644 ---- a/agents/intelmodular/fence_intelmodular.py -+++ b/agents/intelmodular/fence_intelmodular.py -@@ -66,7 +66,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Intel Modular" -- docs["longdesc"] = "fence_intelmodular is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_intelmodular is a Power Fencing agent \ - which can be used with Intel Modular device (tested on Intel MFSYS25, should \ - work with MFSYS35 as well). \ - \n.P\n\ -diff --git a/agents/ipdu/fence_ipdu.py b/agents/ipdu/fence_ipdu.py -index da34d2b64..f7093b8bc 100644 ---- a/agents/ipdu/fence_ipdu.py -+++ b/agents/ipdu/fence_ipdu.py -@@ -138,7 +138,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for iPDU over SNMP" -- docs["longdesc"] = "fence_ipdu is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_ipdu is a Power Fencing agent \ - which can be used with the IBM iPDU network power switch. It logs \ - into a device via SNMP and reboots a specified outlet. It supports \ - SNMP v3 with all combinations of authenticity/privacy settings." -diff --git a/agents/ipmilan/fence_ipmilan.py b/agents/ipmilan/fence_ipmilan.py -index 91e09ac7d..a47fbdd82 100644 ---- a/agents/ipmilan/fence_ipmilan.py -+++ b/agents/ipmilan/fence_ipmilan.py -@@ -203,11 +203,11 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IPMI" -- docs["longdesc"] = "fence_ipmilan is an I/O Fencing agent\ -+ docs["longdesc"] = "{} is a Power Fencing agent \ - which can be used with machines controlled by IPMI.\ - This agent calls support software ipmitool (http://ipmitool.sf.net/). \ - WARNING! This fence agent might report success before the node is powered off. \ --You should use -m/method onoff if your fence device works correctly with that option." -+You should use -m/method onoff if your fence device works correctly with that option.".format(os.path.basename(__file__)) - docs["vendorurl"] = "" - docs["symlink"] = [("fence_ilo3", "Fence agent for HP iLO3"), - ("fence_ilo4", "Fence agent for HP iLO4"), -diff --git a/agents/ironic/fence_ironic.py b/agents/ironic/fence_ironic.py -index d0c9d9c19..76a9250f1 100644 ---- a/agents/ironic/fence_ironic.py -+++ b/agents/ironic/fence_ironic.py -@@ -115,7 +115,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for OpenStack's Ironic (Bare Metal as a service) service" -- docs["longdesc"] = "fence_ironic is a Fencing agent \ -+ docs["longdesc"] = "fence_ironic is a Power Fencing agent \ - which can be used with machines controlled by the Ironic service. \ - This agent calls the openstack CLI. \ - WARNING! This fence agent is not intended for production use. Relying on a functional ironic service for fencing is not a good design choice." -diff --git a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_kubevirt.py -index 8c27a0334..e3817b0fb 100755 ---- a/agents/kubevirt/fence_kubevirt.py -+++ b/agents/kubevirt/fence_kubevirt.py -@@ -125,7 +125,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for KubeVirt" -- docs["longdesc"] = "fence_kubevirt is an I/O Fencing agent for KubeVirt." -+ docs["longdesc"] = "fence_kubevirt is a Power Fencing agent for KubeVirt." - docs["vendorurl"] = "https://kubevirt.io/" - show_docs(options, docs) - -diff --git a/agents/ldom/fence_ldom.py b/agents/ldom/fence_ldom.py -index 0cb3320b3..78edd2950 100644 ---- a/agents/ldom/fence_ldom.py -+++ b/agents/ldom/fence_ldom.py -@@ -75,7 +75,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Sun LDOM" -- docs["longdesc"] = "fence_ldom is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_ldom is a Power Fencing agent \ - which can be used with LDoms virtual machines. This agent works \ - so, that run ldm command on host machine. So ldm must be directly \ - runnable.\ -diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py -index 975971a57..a18e1c9ae 100644 ---- a/agents/lpar/fence_lpar.py -+++ b/agents/lpar/fence_lpar.py -@@ -175,7 +175,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IBM LPAR" -- docs["longdesc"] = "" -+ docs["longdesc"] = "fence_lpar is a Power Fencing agent for IBM LPAR." - docs["vendorurl"] = "http://www.ibm.com" - show_docs(options, docs) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index 6976fee90..0e5d9ed30 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -304,7 +304,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for multipath persistent reservation" -- docs["longdesc"] = "fence_mpath is an I/O fencing agent that uses SCSI-3 \ -+ docs["longdesc"] = "fence_mpath is an I/O Fencing agent that uses SCSI-3 \ - persistent reservations to control access multipath devices. Underlying \ - devices must support SCSI-3 persistent reservations (SPC-3 or greater) as \ - well as the \"preempt-and-abort\" subcommand.\nThe fence_mpath agent works by \ -diff --git a/agents/netio/fence_netio.py b/agents/netio/fence_netio.py -index 4fb59cffc..fc3bf9d83 100755 ---- a/agents/netio/fence_netio.py -+++ b/agents/netio/fence_netio.py -@@ -58,8 +58,8 @@ def main(): - options = check_input(device_opt, opt) - - docs = {} -- docs["shortdesc"] = "I/O Fencing agent for Koukaam NETIO-230B" -- docs["longdesc"] = "fence_netio is an I/O Fencing agent which can be \ -+ docs["shortdesc"] = "Power Fencing agent for Koukaam NETIO-230B" -+ docs["longdesc"] = "fence_netio is a Power Fencing agent which can be \ - used with the Koukaam NETIO-230B Power Distribution Unit. It logs into \ - device via telnet and reboots a specified outlet. Lengthy telnet connections \ - should be avoided while a GFS cluster is running because the connection will \ -diff --git a/agents/openstack/fence_openstack.py b/agents/openstack/fence_openstack.py -index 666016d78..e7aea0865 100644 ---- a/agents/openstack/fence_openstack.py -+++ b/agents/openstack/fence_openstack.py -@@ -301,7 +301,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for OpenStack's Nova service" -- docs["longdesc"] = "fence_openstack is a Fencing agent \ -+ docs["longdesc"] = "fence_openstack is a Power Fencing agent \ - which can be used with machines controlled by the Openstack's Nova service. \ - This agent calls the python-novaclient and it is mandatory to be installed " - docs["vendorurl"] = "https://wiki.openstack.org/wiki/Nova" -diff --git a/agents/ovh/fence_ovh.py b/agents/ovh/fence_ovh.py -index 2b7eb864f..f0ea67c69 100644 ---- a/agents/ovh/fence_ovh.py -+++ b/agents/ovh/fence_ovh.py -@@ -86,7 +86,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for OVH" -- docs["longdesc"] = "fence_ovh is an Power Fencing agent \ -+ docs["longdesc"] = "fence_ovh is a Power Fencing agent \ - which can be used within OVH datecentre. \ - Poweroff is simulated with a reboot into rescue-pro mode." - -diff --git a/agents/powerman/fence_powerman.py b/agents/powerman/fence_powerman.py -index 7aeeaf125..cdca5d36d 100755 ---- a/agents/powerman/fence_powerman.py -+++ b/agents/powerman/fence_powerman.py -@@ -231,7 +231,7 @@ def main(): - options = check_input(device_opt, process_input(device_opt)) - docs = {} - docs["shortdesc"] = "Fence Agent for Powerman" -- docs["longdesc"] = "This is a Pacemaker Fence Agent for the \ -+ docs["longdesc"] = "fence_powerman is a Power Fence Agent for the \ - Powerman management utility that was designed for LLNL systems." - docs["vendorurl"] = "https://github.com/chaos/powerman" - show_docs(options, docs) -diff --git a/agents/pve/fence_pve.py b/agents/pve/fence_pve.py -index 0d820355f..f97007dc5 100755 ---- a/agents/pve/fence_pve.py -+++ b/agents/pve/fence_pve.py -@@ -195,8 +195,8 @@ def main(): - options = check_input(device_opt, process_input(device_opt)) - docs = {} - docs["shortdesc"] = "Fencing agent for the Proxmox Virtual Environment" -- docs["longdesc"] = "The fence_pve agent can be used to fence virtual \ --machines acting as nodes in a virtualized cluster." -+ docs["longdesc"] = "fence_pve is a Power Fencing agent for virtual machines \ -+acting as nodes in a virtualized cluster." - docs["vendorurl"] = "http://www.proxmox.com/" - - show_docs(options, docs) -diff --git a/agents/raritan/fence_raritan.py b/agents/raritan/fence_raritan.py -index 169fa8197..d3510e4a1 100644 ---- a/agents/raritan/fence_raritan.py -+++ b/agents/raritan/fence_raritan.py -@@ -39,8 +39,8 @@ def main(): - options = check_input(device_opt, opt) - - docs = {} -- docs["shortdesc"] = "I/O Fencing agent for Raritan Dominion PX" -- docs["longdesc"] = "fence_raritan is an I/O Fencing agent which can be \ -+ docs["shortdesc"] = "Power Fencing agent for Raritan Dominion PX" -+ docs["longdesc"] = "fence_raritan is a Power Fencing agent which can be \ - used with the Raritan DPXS12-20 Power Distribution Unit. It logs into \ - device via telnet and reboots a specified outlet. Lengthy telnet connections \ - should be avoided while a GFS cluster is running because the connection will \ -diff --git a/agents/rcd_serial/fence_rcd_serial.py b/agents/rcd_serial/fence_rcd_serial.py -index 2614772ff..d14b4c661 100644 ---- a/agents/rcd_serial/fence_rcd_serial.py -+++ b/agents/rcd_serial/fence_rcd_serial.py -@@ -77,11 +77,12 @@ def main(): - - docs = {} - docs["shortdesc"] = "rcd_serial fence agent" -- docs["longdesc"] = "fence_rcd_serial operates a serial cable that toggles a \ --reset of an opposing server using the reset switch on its motherboard. The \ --cable itself is simple with no power, network or moving parts. An example of \ --the cable is available here: https://smcleod.net/rcd-stonith/ and the circuit \ --design is available in the fence-agents src as SVG" -+ docs["longdesc"] = "fence_rcd_serial is a Power Fencing agent that \ -+operates a serial cable that toggles a reset of an opposing server using the \ -+reset switch on its motherboard. The cable itself is simple with no power, \ -+network or moving parts. An example of the cable is available here: \ -+https://smcleod.net/rcd-stonith/ and the circuit design is available in the \ -+fence-agents src as SVG" - docs["vendorurl"] = "http://www.scl.co.uk/rcd_serial/" - show_docs(options, docs) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 0f5af523c..a935122ec 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -132,8 +132,8 @@ def main(): - options = check_input(device_opt, opt) - - docs = {} -- docs["shortdesc"] = "I/O Fencing agent for Redfish" -- docs["longdesc"] = "fence_redfish is an I/O Fencing agent which can be used with \ -+ docs["shortdesc"] = "Power Fencing agent for Redfish" -+ docs["longdesc"] = "fence_redfish is a Power Fencing agent which can be used with \ - Out-of-Band controllers that support Redfish APIs. These controllers provide remote \ - access to control power on a server." - docs["vendorurl"] = "http://www.dmtf.org" -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index 5f74d06f6..1eb53bed0 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -232,7 +232,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for RHEV-M REST API" -- docs["longdesc"] = "fence_rhevm is an I/O Fencing agent which can be \ -+ docs["longdesc"] = "fence_rhevm is a Power Fencing agent which can be \ - used with RHEV-M REST API to fence virtual machines." - docs["vendorurl"] = "http://www.redhat.com" - show_docs(options, docs) -diff --git a/agents/rsa/fence_rsa.py b/agents/rsa/fence_rsa.py -index 44fdd9d05..79ed109eb 100644 ---- a/agents/rsa/fence_rsa.py -+++ b/agents/rsa/fence_rsa.py -@@ -42,7 +42,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IBM RSA" -- docs["longdesc"] = "fence_rsa is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_rsa is a Power Fencing agent \ - which can be used with the IBM RSA II management interface. It \ - logs into an RSA II device via telnet and reboots the associated \ - machine. Lengthy telnet connections to the RSA II device should \ -diff --git a/agents/rsb/fence_rsb.py b/agents/rsb/fence_rsb.py -index 45355f51e..e4622ae9f 100755 ---- a/agents/rsb/fence_rsb.py -+++ b/agents/rsb/fence_rsb.py -@@ -49,8 +49,8 @@ def main(): - options = check_input(device_opt, opt) - - docs = {} -- docs["shortdesc"] = "I/O Fencing agent for Fujitsu-Siemens RSB" -- docs["longdesc"] = "fence_rsb is an I/O Fencing agent \ -+ docs["shortdesc"] = "Power Fencing agent for Fujitsu-Siemens RSB" -+ docs["longdesc"] = "fence_rsb is a Power Fencing agent \ - which can be used with the Fujitsu-Siemens RSB management interface. It logs \ - into device via telnet/ssh and reboots a specified outlet. Lengthy telnet/ssh \ - connections should be avoided while a GFS cluster is running because the connection \ -diff --git a/agents/sbd/fence_sbd.py b/agents/sbd/fence_sbd.py -index 2b0127d55..5c498263e 100644 ---- a/agents/sbd/fence_sbd.py -+++ b/agents/sbd/fence_sbd.py -@@ -377,7 +377,7 @@ def main(): - # fill the needed variables to generate metadata and help text output - docs = {} - docs["shortdesc"] = "Fence agent for sbd" -- docs["longdesc"] = "fence_sbd is I/O Fencing agent \ -+ docs["longdesc"] = "fence_sbd is an I/O Fencing agent \ - which can be used in environments where sbd can be used (shared storage)." - docs["vendorurl"] = "" - show_docs(options, docs) -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 519319bf5..5cb5dbee9 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -546,7 +546,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for SCSI persistent reservation" -- docs["longdesc"] = "fence_scsi is an I/O fencing agent that uses SCSI-3 \ -+ docs["longdesc"] = "fence_scsi is an I/O Fencing agent that uses SCSI-3 \ - persistent reservations to control access to shared storage devices. These \ - devices must support SCSI-3 persistent reservations (SPC-3 or greater) as \ - well as the \"preempt-and-abort\" subcommand.\nThe fence_scsi agent works by \ -diff --git a/agents/vbox/fence_vbox.py b/agents/vbox/fence_vbox.py -index c2df28811..52f0a2a8a 100644 ---- a/agents/vbox/fence_vbox.py -+++ b/agents/vbox/fence_vbox.py -@@ -115,7 +115,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for VirtualBox" -- docs["longdesc"] = "fence_vbox is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_vbox is a Power Fencing agent \ - which can be used with the virtual machines managed by VirtualBox. \ - It logs via ssh to a dom0 where it runs VBoxManage to do all of \ - the work. \ -diff --git a/agents/virsh/fence_virsh.py b/agents/virsh/fence_virsh.py -index 88cee48de..bde189c2b 100644 ---- a/agents/virsh/fence_virsh.py -+++ b/agents/virsh/fence_virsh.py -@@ -76,7 +76,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for virsh" -- docs["longdesc"] = "fence_virsh is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_virsh is a Power Fencing agent \ - which can be used with the virtual machines managed by libvirt. \ - It logs via ssh to a dom0 and there run virsh command, which does \ - all work. \ -diff --git a/agents/vmware/fence_vmware.py b/agents/vmware/fence_vmware.py -index bc1785f4c..ccef92bb2 100644 ---- a/agents/vmware/fence_vmware.py -+++ b/agents/vmware/fence_vmware.py -@@ -292,7 +292,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for VMWare" -- docs["longdesc"] = "fence_vmware is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_vmware is a Power Fencing agent \ - which can be used with the VMware ESX, VMware ESXi or VMware Server \ - to fence virtual machines.\ - \n.P\n\ -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index 4b884fc62..378771863 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -204,7 +204,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for VMware REST API" -- docs["longdesc"] = """fence_vmware_rest is an I/O Fencing agent which can be \ -+ docs["longdesc"] = """fence_vmware_rest is a Power Fencing agent which can be \ - used with VMware API to fence virtual machines. - - NOTE: If there's more than 1000 VMs there is a filter parameter to work around \ -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index 4a4ec1780..4b3c404ce 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -235,7 +235,7 @@ def main(): - ##### - docs = {} - docs["shortdesc"] = "Fence agent for VMWare over SOAP API" -- docs["longdesc"] = "fence_vmware_soap is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_vmware_soap is a Power Fencing agent \ - which can be used with the virtual machines managed by VMWare products \ - that have SOAP API v4.1+. \ - \n.P\n\ -diff --git a/agents/vmware_vcloud/fence_vmware_vcloud.py b/agents/vmware_vcloud/fence_vmware_vcloud.py -index 7626b82bb..e0a714b84 100644 ---- a/agents/vmware_vcloud/fence_vmware_vcloud.py -+++ b/agents/vmware_vcloud/fence_vmware_vcloud.py -@@ -194,7 +194,8 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for VMware vCloud Director API" -- docs["longdesc"] = "fence_vmware_vcloud is an I/O Fencing agent which can be used with VMware vCloud Director API to fence virtual machines." -+ docs["longdesc"] = "fence_vmware_vcloud is a Power Fencing agent which \ -+can be used with VMware vCloud Director API to fence virtual machines." - docs["vendorurl"] = "https://www.vmware.com" - show_docs(options, docs) - -diff --git a/agents/wti/fence_wti.py b/agents/wti/fence_wti.py -index 97cc66de2..ffa3d019c 100644 ---- a/agents/wti/fence_wti.py -+++ b/agents/wti/fence_wti.py -@@ -184,7 +184,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for WTI" -- docs["longdesc"] = "fence_wti is an I/O Fencing agent \ -+ docs["longdesc"] = "fence_wti is a Power Fencing agent \ - which can be used with the WTI Network Power Switch (NPS). It logs \ - into an NPS via telnet or ssh and boots a specified plug. \ - Lengthy telnet connections to the NPS should be avoided while a GFS cluster \ -diff --git a/agents/xenapi/fence_xenapi.py b/agents/xenapi/fence_xenapi.py -index 10c8ee03e..884fbc79f 100644 ---- a/agents/xenapi/fence_xenapi.py -+++ b/agents/xenapi/fence_xenapi.py -@@ -202,7 +202,7 @@ def main(): - docs = {} - docs["shortdesc"] = "Fence agent for Citrix XenServer over XenAPI" - docs["longdesc"] = "\ --fence_cxs is an I/O Fencing agent used on Citrix XenServer hosts. \ -+fence_xenapi is a Power Fencing agent used on Citrix XenServer hosts. \ - It uses the XenAPI, supplied by Citrix, to establish an XML-RPC session \ - to a XenServer host. Once the session is established, further XML-RPC \ - commands are issued in order to switch on, switch off, restart and query \ -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index c37950a20..f1cea2652 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -199,8 +199,8 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for use with z/VM Virtual Machines" -- docs["longdesc"] = """The fence_zvmip agent is intended to be used with the --z/VM SMAPI service via TCP/IP. -+ docs["longdesc"] = """fence_zvmip is a Power Fencing agent for z/VM \ -+SMAPI service via TCP/IP. - - The z/VM SMAPI service must be configured so that the virtual machine running - the agent can connect to the service, access the system's directory manager, -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -index b06718891..a52de014c 100644 ---- a/tests/data/metadata/fence_aliyun.xml -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -1,6 +1,6 @@ - - --fence_aliyun is an I/O Fencing agent for Aliyun -+fence_aliyun is a Power Fencing agent for Aliyun. - http://www.aliyun.com - - -diff --git a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml -index 6532ad6dd..de0a4b60d 100644 ---- a/tests/data/metadata/fence_alom.xml -+++ b/tests/data/metadata/fence_alom.xml -@@ -1,6 +1,6 @@ - - --fence_alom is an I/O Fencing agent which can be used with ALOM connected machines. -+fence_alom is a Power Fencing agent which can be used with ALOM connected machines. - http://www.sun.com - - -diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml -index 809c2dfea..58eb86761 100644 ---- a/tests/data/metadata/fence_amt.xml -+++ b/tests/data/metadata/fence_amt.xml -@@ -1,6 +1,6 @@ - - --fence_amt is an I/O Fencing agent which can be used with Intel AMT. This agent calls support software amttool(http://www.kraxel.org/cgit/amtterm/). -+fence_amt is a Power Fencing agent which can be used with Intel AMT. This agent calls support software amttool(http://www.kraxel.org/cgit/amtterm/). - http://www.intel.com/ - - -diff --git a/tests/data/metadata/fence_amt_ws.xml b/tests/data/metadata/fence_amt_ws.xml -index 97a222526..08ed75148 100644 ---- a/tests/data/metadata/fence_amt_ws.xml -+++ b/tests/data/metadata/fence_amt_ws.xml -@@ -1,6 +1,6 @@ - - --fence_amt_ws is an I/O Fencing agent which can be used with Intel AMT (WS). This agent requires the pywsman Python library which is included in OpenWSMAN. (http://openwsman.github.io/). -+fence_amt_ws is a Power Fencing agent which can be used with Intel AMT (WS). This agent requires the pywsman Python library which is included in OpenWSMAN. (http://openwsman.github.io/). - http://www.intel.com/ - - -diff --git a/tests/data/metadata/fence_apc.xml b/tests/data/metadata/fence_apc.xml -index 6081b1ff5..e40c7879d 100644 ---- a/tests/data/metadata/fence_apc.xml -+++ b/tests/data/metadata/fence_apc.xml -@@ -1,6 +1,6 @@ - - --fence_apc is an I/O Fencing agent which can be used with the APC network power switch. It logs into device via telnet/ssh and reboots a specified outlet. Lengthy telnet/ssh connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. -+fence_apc is a Power Fencing agent which can be used with the APC network power switch. It logs into device via telnet/ssh and reboots a specified outlet. Lengthy telnet/ssh connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. - http://www.apc.com - - -diff --git a/tests/data/metadata/fence_apc_snmp.xml b/tests/data/metadata/fence_apc_snmp.xml -index 02efbb0b0..8df05345c 100644 ---- a/tests/data/metadata/fence_apc_snmp.xml -+++ b/tests/data/metadata/fence_apc_snmp.xml -@@ -1,7 +1,7 @@ - - - --fence_apc_snmp is an I/O Fencing agent which can be used with the APC network power switch or Tripplite PDU devices.It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v1, v2c, v3 with all combinations of authenticity/privacy settings. -+fence_apc_snmp is a Power Fencing agent which can be used with the APC network power switch or Tripplite PDU devices.It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v1, v2c, v3 with all combinations of authenticity/privacy settings. - http://www.apc.com - - -diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml -index 32de4418a..ad471c797 100644 ---- a/tests/data/metadata/fence_aws.xml -+++ b/tests/data/metadata/fence_aws.xml -@@ -1,6 +1,6 @@ - - --fence_aws is an I/O Fencing agent for AWS (Amazon WebServices). It uses the boto3 library to connect to AWS. -+fence_aws is a Power Fencing agent for AWS (Amazon WebServices). It uses the boto3 library to connect to AWS. - - boto3 can be configured with AWS CLI or by creating ~/.aws/credentials. - For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration -diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml -index 8b7450762..59c3b7433 100644 ---- a/tests/data/metadata/fence_azure_arm.xml -+++ b/tests/data/metadata/fence_azure_arm.xml -@@ -1,6 +1,6 @@ - - --fence_azure_arm is an I/O Fencing agent for Azure Resource Manager. It uses Azure SDK for Python to connect to Azure. -+fence_azure_arm is a Power Fencing agent for Azure Resource Manager. It uses Azure SDK for Python to connect to Azure. - - For instructions to setup credentials see: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal - -diff --git a/tests/data/metadata/fence_bladecenter.xml b/tests/data/metadata/fence_bladecenter.xml -index 3cc415355..e8468e336 100644 ---- a/tests/data/metadata/fence_bladecenter.xml -+++ b/tests/data/metadata/fence_bladecenter.xml -@@ -1,6 +1,6 @@ - - --fence_bladecenter is an I/O Fencing agent which can be used with IBM Bladecenters with recent enough firmware that includes telnet support. It logs into a Brocade chasis via telnet or ssh and uses the command line interface to power on and off blades. -+fence_bladecenter is a Power Fencing agent which can be used with IBM Bladecenters with recent enough firmware that includes telnet support. It logs into a Brocade chasis via telnet or ssh and uses the command line interface to power on and off blades. - http://www.ibm.com - - -diff --git a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml -index 829c9dcbe..2105ecccc 100644 ---- a/tests/data/metadata/fence_cisco_mds.xml -+++ b/tests/data/metadata/fence_cisco_mds.xml -@@ -1,6 +1,6 @@ - - --fence_cisco_mds is an I/O Fencing agent which can be used with any Cisco MDS 9000 series with SNMP enabled device. -+fence_cisco_mds is a Power Fencing agent which can be used with any Cisco MDS 9000 series with SNMP enabled device. - http://www.cisco.com - - -diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml -index 76d15e9f4..a9368e8be 100644 ---- a/tests/data/metadata/fence_cisco_ucs.xml -+++ b/tests/data/metadata/fence_cisco_ucs.xml -@@ -1,6 +1,6 @@ - - --fence_cisco_ucs is an I/O Fencing agent which can be used with Cisco UCS to fence machines. -+fence_cisco_ucs is a Power Fencing agent which can be used with Cisco UCS to fence machines. - http://www.cisco.com - - -diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml -index f685b1162..f0cacd4d9 100644 ---- a/tests/data/metadata/fence_docker.xml -+++ b/tests/data/metadata/fence_docker.xml -@@ -1,6 +1,6 @@ - - --fence_docker is I/O fencing agent which can be used with the Docker Engine containers. You can use this fence-agent without any authentication, or you can use TLS authentication (use --ssl option, more info about TLS authentication in docker: http://docs.docker.com/examples/https/). -+fence_docker is a Power Fencing agent which can be used with the Docker Engine containers. You can use this fence-agent without any authentication, or you can use TLS authentication (use --ssl option, more info about TLS authentication in docker: http://docs.docker.com/examples/https/). - www.docker.io - - -diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml -index a99126132..b2ce0825f 100644 ---- a/tests/data/metadata/fence_drac.xml -+++ b/tests/data/metadata/fence_drac.xml -@@ -1,6 +1,6 @@ - -- --fence_drac is an I/O Fencing agent which can be used with the Dell Remote Access Card (DRAC). This card provides remote access to controlling power to a server. It logs into the DRAC through the telnet interface of the card. By default, the telnet interface is not enabled. To enable the interface, you will need to use the racadm command in the racser-devel rpm available from Dell. To enable telnet on the DRAC: [root]# racadm config -g cfgSerial -o cfgSerialTelnetEnable 1 [root]# racadm racreset -+ -+fence_drac is a Power Fencing agent which can be used with the Dell Remote Access Card (DRAC). This card provides remote access to controlling power to a server. It logs into the DRAC through the telnet interface of the card. By default, the telnet interface is not enabled. To enable the interface, you will need to use the racadm command in the racser-devel rpm available from Dell. To enable telnet on the DRAC: [root]# racadm config -g cfgSerial -o cfgSerialTelnetEnable 1 [root]# racadm racreset - http://www.dell.com - - -diff --git a/tests/data/metadata/fence_drac5.xml b/tests/data/metadata/fence_drac5.xml -index a0c73ebf8..a633d43b5 100644 ---- a/tests/data/metadata/fence_drac5.xml -+++ b/tests/data/metadata/fence_drac5.xml -@@ -1,6 +1,6 @@ - - --fence_drac5 is an I/O Fencing agent which can be used with the Dell Remote Access Card v5 or CMC (DRAC). This device provides remote access to controlling power to a server. It logs into the DRAC through the telnet/ssh interface of the card. By default, the telnet interface is not enabled. -+fence_drac5 is a Power Fencing agent which can be used with the Dell Remote Access Card v5 or CMC (DRAC). This device provides remote access to controlling power to a server. It logs into the DRAC through the telnet/ssh interface of the card. By default, the telnet interface is not enabled. - http://www.dell.com - - -diff --git a/tests/data/metadata/fence_eaton_snmp.xml b/tests/data/metadata/fence_eaton_snmp.xml -index 1d89b5272..cb852fb0d 100644 ---- a/tests/data/metadata/fence_eaton_snmp.xml -+++ b/tests/data/metadata/fence_eaton_snmp.xml -@@ -1,6 +1,6 @@ - - --fence_eaton_snmp is an I/O Fencing agent which can be used with the Eaton network power switch. It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v1 and v3 with all combinations of authenticity/privacy settings. -+fence_eaton_snmp is a Power Fencing agent which can be used with the Eaton network power switch. It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v1 and v3 with all combinations of authenticity/privacy settings. - http://powerquality.eaton.com - - -diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml -index 1ed792e2b..fde75bd54 100644 ---- a/tests/data/metadata/fence_emerson.xml -+++ b/tests/data/metadata/fence_emerson.xml -@@ -1,6 +1,6 @@ - - --fence_emerson is an I/O Fencing agent which can be used with MPX and MPH2 managed rack PDU. -+fence_emerson is a Power Fencing agent which can be used with MPX and MPH2 managed rack PDU. - http://www.emersonnetworkpower.com - - -diff --git a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml -index a8cf8ad41..3f9ebdc22 100644 ---- a/tests/data/metadata/fence_eps.xml -+++ b/tests/data/metadata/fence_eps.xml -@@ -1,6 +1,6 @@ - - --fence_eps is an I/O Fencing agent which can be used with the ePowerSwitch 8M+ power switch to fence connected machines. Fence agent works ONLY on 8M+ device, because this is only one, which has support for hidden page feature. -+fence_eps is a Power Fencing agent which can be used with the ePowerSwitch 8M+ power switch to fence connected machines. Fence agent works ONLY on 8M+ device, because this is only one, which has support for hidden page feature. - - Agent basically works by connecting to hidden page and pass appropriate arguments to GET request. This means, that hidden page feature must be enabled and properly configured. - http://www.epowerswitch.com -diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml -index 2a89b16c2..8226e1aa0 100644 ---- a/tests/data/metadata/fence_gce.xml -+++ b/tests/data/metadata/fence_gce.xml -@@ -1,6 +1,6 @@ - - --fence_gce is an I/O Fencing agent for GCE (Google Cloud Engine). It uses the googleapiclient library to connect to GCE. -+fence_gce is a Power Fencing agent for GCE (Google Cloud Engine). It uses the googleapiclient library to connect to GCE. - googleapiclient can be configured with Google SDK CLI or by executing 'gcloud auth application-default login'. - For instructions see: https://cloud.google.com/compute/docs/tutorials/python-guide - http://cloud.google.com -diff --git a/tests/data/metadata/fence_hds_cb.xml b/tests/data/metadata/fence_hds_cb.xml -index e25d889e3..1e3a4889e 100644 ---- a/tests/data/metadata/fence_hds_cb.xml -+++ b/tests/data/metadata/fence_hds_cb.xml -@@ -1,6 +1,6 @@ - - --fence_hds_cb is an I/O Fencing agent which can be used with Hitachi Compute Blades with recent enough firmware that includes telnet support. -+fence_hds_cb is a Power Fencing agent which can be used with Hitachi Compute Blades with recent enough firmware that includes telnet support. - http://www.hds.com - - -diff --git a/tests/data/metadata/fence_hpblade.xml b/tests/data/metadata/fence_hpblade.xml -index 0957fcdd4..3f05be222 100644 ---- a/tests/data/metadata/fence_hpblade.xml -+++ b/tests/data/metadata/fence_hpblade.xml -@@ -1,6 +1,6 @@ - - --fence_hpblade is an I/O Fencing agent which can be used with HP BladeSystem and HP Integrity Superdome X. It logs into the onboard administrator of an enclosure via telnet or ssh and uses the command line interface to power blades or partitions on or off. -+fence_hpblade is a Power Fencing agent which can be used with HP BladeSystem and HP Integrity Superdome X. It logs into the onboard administrator of an enclosure via telnet or ssh and uses the command line interface to power blades or partitions on or off. - http://www.hp.com - - -diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml -index 7bdee4e29..c1dc034dc 100644 ---- a/tests/data/metadata/fence_ibm_powervs.xml -+++ b/tests/data/metadata/fence_ibm_powervs.xml -@@ -1,6 +1,6 @@ - - --fence_ibm_powervs is an I/O Fencing agent which can be used with IBM PowerVS to fence virtual machines. -+fence_ibm_powervs is a Power Fencing agent which can be used with IBM PowerVS to fence virtual machines. - https://www.ibm.com - - -diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml -index fe29ffb89..fafcad214 100644 ---- a/tests/data/metadata/fence_ibm_vpc.xml -+++ b/tests/data/metadata/fence_ibm_vpc.xml -@@ -1,6 +1,6 @@ - - --fence_ibm_vpc is an I/O Fencing agent which can be used with IBM Cloud VPC to fence virtual machines. -+fence_ibm_vpc is a Power Fencing agent which can be used with IBM Cloud VPC to fence virtual machines. - https://www.ibm.com - - -diff --git a/tests/data/metadata/fence_ibmblade.xml b/tests/data/metadata/fence_ibmblade.xml -index 3286ca6de..61366ca3c 100644 ---- a/tests/data/metadata/fence_ibmblade.xml -+++ b/tests/data/metadata/fence_ibmblade.xml -@@ -1,6 +1,6 @@ - - --fence_ibmblade is an I/O Fencing agent which can be used with IBM BladeCenter chassis. It issues SNMP Set request to BladeCenter chassis, rebooting, powering up or down the specified Blade Server. -+fence_ibmblade is a Power Fencing agent which can be used with IBM BladeCenter chassis. It issues SNMP Set request to BladeCenter chassis, rebooting, powering up or down the specified Blade Server. - http://www.ibm.com - - -diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml -index d1f283e4a..aa291345a 100644 ---- a/tests/data/metadata/fence_idrac.xml -+++ b/tests/data/metadata/fence_idrac.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_idrac is a Power Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml -index 0bac03c83..f8fe61cbb 100644 ---- a/tests/data/metadata/fence_ilo.xml -+++ b/tests/data/metadata/fence_ilo.xml -@@ -1,7 +1,7 @@ - - - --fence_ilo is an I/O Fencing agent used for HP servers with the Integrated Light Out (iLO) PCI card.The agent opens an SSL connection to the iLO card. Once the SSL connection is established, the agent is able to communicate with the iLO card through an XML stream. -+fence_ilo is a Power Fencing agent used for HP servers with the Integrated Light Out (iLO) PCI card.The agent opens an SSL connection to the iLO card. Once the SSL connection is established, the agent is able to communicate with the iLO card through an XML stream. - http://www.hp.com - - -diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml -index 3d954a345..d7e72084e 100644 ---- a/tests/data/metadata/fence_ilo2.xml -+++ b/tests/data/metadata/fence_ilo2.xml -@@ -1,7 +1,7 @@ - - - --fence_ilo is an I/O Fencing agent used for HP servers with the Integrated Light Out (iLO) PCI card.The agent opens an SSL connection to the iLO card. Once the SSL connection is established, the agent is able to communicate with the iLO card through an XML stream. -+fence_ilo2 is a Power Fencing agent used for HP servers with the Integrated Light Out (iLO) PCI card.The agent opens an SSL connection to the iLO card. Once the SSL connection is established, the agent is able to communicate with the iLO card through an XML stream. - http://www.hp.com - - -diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml -index 5aca0211b..90dc2f657 100644 ---- a/tests/data/metadata/fence_ilo3.xml -+++ b/tests/data/metadata/fence_ilo3.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ilo3 is a Power Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml -index 3aa001ad2..494ff0b3b 100644 ---- a/tests/data/metadata/fence_ilo4.xml -+++ b/tests/data/metadata/fence_ilo4.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ilo4 is a Power Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml -index 7d4fd22d5..4ac9484d6 100644 ---- a/tests/data/metadata/fence_ilo_mp.xml -+++ b/tests/data/metadata/fence_ilo_mp.xml -@@ -1,6 +1,6 @@ - - -- -+fence_ilo_mp is a Power Fencing agent for HP iLO MP. - http://www.hp.com - - -diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml -index 26f9a76d3..943e9c3f2 100644 ---- a/tests/data/metadata/fence_imm.xml -+++ b/tests/data/metadata/fence_imm.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_imm is a Power Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_intelmodular.xml b/tests/data/metadata/fence_intelmodular.xml -index 5dad0d0bd..66ddb47ae 100644 ---- a/tests/data/metadata/fence_intelmodular.xml -+++ b/tests/data/metadata/fence_intelmodular.xml -@@ -1,6 +1,6 @@ - - --fence_intelmodular is an I/O Fencing agent which can be used with Intel Modular device (tested on Intel MFSYS25, should work with MFSYS35 as well). -+fence_intelmodular is a Power Fencing agent which can be used with Intel Modular device (tested on Intel MFSYS25, should work with MFSYS35 as well). - - Note: Since firmware update version 2.7, SNMP v2 write support is removed, and replaced by SNMP v3 support. So agent now has default SNMP version 3. If you are using older firmware, please supply -d for command line and snmp_version option for your cluster.conf. - http://www.intel.com -diff --git a/tests/data/metadata/fence_ipdu.xml b/tests/data/metadata/fence_ipdu.xml -index 22024a7a1..941dcbedf 100644 ---- a/tests/data/metadata/fence_ipdu.xml -+++ b/tests/data/metadata/fence_ipdu.xml -@@ -1,6 +1,6 @@ - - --fence_ipdu is an I/O Fencing agent which can be used with the IBM iPDU network power switch. It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v3 with all combinations of authenticity/privacy settings. -+fence_ipdu is a Power Fencing agent which can be used with the IBM iPDU network power switch. It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v3 with all combinations of authenticity/privacy settings. - http://www.ibm.com - - -diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml -index daad65a70..3107cad33 100644 ---- a/tests/data/metadata/fence_ipmilan.xml -+++ b/tests/data/metadata/fence_ipmilan.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is a Power Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ironic.xml b/tests/data/metadata/fence_ironic.xml -index 813b03732..f9bec38da 100644 ---- a/tests/data/metadata/fence_ironic.xml -+++ b/tests/data/metadata/fence_ironic.xml -@@ -1,6 +1,6 @@ - - --fence_ironic is a Fencing agent which can be used with machines controlled by the Ironic service. This agent calls the openstack CLI. WARNING! This fence agent is not intended for production use. Relying on a functional ironic service for fencing is not a good design choice. -+fence_ironic is a Power Fencing agent which can be used with machines controlled by the Ironic service. This agent calls the openstack CLI. WARNING! This fence agent is not intended for production use. Relying on a functional ironic service for fencing is not a good design choice. - https://wiki.openstack.org/wiki/Ironic - - -diff --git a/tests/data/metadata/fence_ldom.xml b/tests/data/metadata/fence_ldom.xml -index 59facad6f..aaa737015 100644 ---- a/tests/data/metadata/fence_ldom.xml -+++ b/tests/data/metadata/fence_ldom.xml -@@ -1,6 +1,6 @@ - - --fence_ldom is an I/O Fencing agent which can be used with LDoms virtual machines. This agent works so, that run ldm command on host machine. So ldm must be directly runnable. -+fence_ldom is a Power Fencing agent which can be used with LDoms virtual machines. This agent works so, that run ldm command on host machine. So ldm must be directly runnable. - - Very useful parameter is -c (or cmd_prompt in stdin mode). This must be set to something, what is displayed after successful login to host machine. Default string is space on end of string (default for root in bash). But (for example) csh use ], so in that case you must use parameter -c with argument ]. Very similar situation is, if you use bash and login to host machine with other user than root. Than prompt is $, so again, you must use parameter -c. - http://www.sun.com -diff --git a/tests/data/metadata/fence_lpar.xml b/tests/data/metadata/fence_lpar.xml -index 22f12dc23..018409e26 100644 ---- a/tests/data/metadata/fence_lpar.xml -+++ b/tests/data/metadata/fence_lpar.xml -@@ -1,6 +1,6 @@ - - -- -+fence_lpar is a Power Fencing agent for IBM LPAR. - http://www.ibm.com - - -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index 262956dca..b36fab96e 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -1,6 +1,6 @@ - - --fence_mpath is an I/O fencing agent that uses SCSI-3 persistent reservations to control access multipath devices. Underlying devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. -+fence_mpath is an I/O Fencing agent that uses SCSI-3 persistent reservations to control access multipath devices. Underlying devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. - The fence_mpath agent works by having a unique key for each node that has to be set in /etc/multipath.conf. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_mpath agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. - - When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it failing. -diff --git a/tests/data/metadata/fence_netio.xml b/tests/data/metadata/fence_netio.xml -index 95f3cf34a..c1486c955 100644 ---- a/tests/data/metadata/fence_netio.xml -+++ b/tests/data/metadata/fence_netio.xml -@@ -1,6 +1,6 @@ - -- --fence_netio is an I/O Fencing agent which can be used with the Koukaam NETIO-230B Power Distribution Unit. It logs into device via telnet and reboots a specified outlet. Lengthy telnet connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. -+ -+fence_netio is a Power Fencing agent which can be used with the Koukaam NETIO-230B Power Distribution Unit. It logs into device via telnet and reboots a specified outlet. Lengthy telnet connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. - http://www.koukaam.se/ - - -diff --git a/tests/data/metadata/fence_openstack.xml b/tests/data/metadata/fence_openstack.xml -index 0bf1a78e2..5eeaee018 100644 ---- a/tests/data/metadata/fence_openstack.xml -+++ b/tests/data/metadata/fence_openstack.xml -@@ -1,6 +1,6 @@ - - --fence_openstack is a Fencing agent which can be used with machines controlled by the Openstack's Nova service. This agent calls the python-novaclient and it is mandatory to be installed -+fence_openstack is a Power Fencing agent which can be used with machines controlled by the Openstack's Nova service. This agent calls the python-novaclient and it is mandatory to be installed - https://wiki.openstack.org/wiki/Nova - - -diff --git a/tests/data/metadata/fence_ovh.xml b/tests/data/metadata/fence_ovh.xml -index 79d5eda94..f369f46ca 100644 ---- a/tests/data/metadata/fence_ovh.xml -+++ b/tests/data/metadata/fence_ovh.xml -@@ -1,6 +1,6 @@ - - --fence_ovh is an Power Fencing agent which can be used within OVH datecentre. Poweroff is simulated with a reboot into rescue-pro mode. -+fence_ovh is a Power Fencing agent which can be used within OVH datecentre. Poweroff is simulated with a reboot into rescue-pro mode. - http://www.ovh.net - - -diff --git a/tests/data/metadata/fence_powerman.xml b/tests/data/metadata/fence_powerman.xml -index 10514fd3c..09d0b2bae 100644 ---- a/tests/data/metadata/fence_powerman.xml -+++ b/tests/data/metadata/fence_powerman.xml -@@ -1,6 +1,6 @@ - - --This is a Pacemaker Fence Agent for the Powerman management utility that was designed for LLNL systems. -+fence_powerman is a Power Fence Agent for the Powerman management utility that was designed for LLNL systems. - https://github.com/chaos/powerman - - -diff --git a/tests/data/metadata/fence_pve.xml b/tests/data/metadata/fence_pve.xml -index 1ed3cda4f..1aeebfe3f 100644 ---- a/tests/data/metadata/fence_pve.xml -+++ b/tests/data/metadata/fence_pve.xml -@@ -1,6 +1,6 @@ - - --The fence_pve agent can be used to fence virtual machines acting as nodes in a virtualized cluster. -+fence_pve is a Power Fencing agent for virtual machines acting as nodes in a virtualized cluster. - http://www.proxmox.com/ - - -diff --git a/tests/data/metadata/fence_raritan.xml b/tests/data/metadata/fence_raritan.xml -index 5e387c784..00bfadb7a 100644 ---- a/tests/data/metadata/fence_raritan.xml -+++ b/tests/data/metadata/fence_raritan.xml -@@ -1,6 +1,6 @@ - -- --fence_raritan is an I/O Fencing agent which can be used with the Raritan DPXS12-20 Power Distribution Unit. It logs into device via telnet and reboots a specified outlet. Lengthy telnet connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. -+ -+fence_raritan is a Power Fencing agent which can be used with the Raritan DPXS12-20 Power Distribution Unit. It logs into device via telnet and reboots a specified outlet. Lengthy telnet connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. - http://www.raritan.com/ - - -diff --git a/tests/data/metadata/fence_rcd_serial.xml b/tests/data/metadata/fence_rcd_serial.xml -index c14d342f7..030696efe 100644 ---- a/tests/data/metadata/fence_rcd_serial.xml -+++ b/tests/data/metadata/fence_rcd_serial.xml -@@ -1,6 +1,6 @@ - - --fence_rcd_serial operates a serial cable that toggles a reset of an opposing server using the reset switch on its motherboard. The cable itself is simple with no power, network or moving parts. An example of the cable is available here: https://smcleod.net/rcd-stonith/ and the circuit design is available in the fence-agents src as SVG -+fence_rcd_serial is a Power Fencing agent that operates a serial cable that toggles a reset of an opposing server using the reset switch on its motherboard. The cable itself is simple with no power, network or moving parts. An example of the cable is available here: https://smcleod.net/rcd-stonith/ and the circuit design is available in the fence-agents src as SVG - http://www.scl.co.uk/rcd_serial/ - - -diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml -index 76a23af30..3285f77c4 100644 ---- a/tests/data/metadata/fence_redfish.xml -+++ b/tests/data/metadata/fence_redfish.xml -@@ -1,6 +1,6 @@ - -- --fence_redfish is an I/O Fencing agent which can be used with Out-of-Band controllers that support Redfish APIs. These controllers provide remote access to control power on a server. -+ -+fence_redfish is a Power Fencing agent which can be used with Out-of-Band controllers that support Redfish APIs. These controllers provide remote access to control power on a server. - http://www.dmtf.org - - -diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml -index 0b2239931..a51be18eb 100644 ---- a/tests/data/metadata/fence_rhevm.xml -+++ b/tests/data/metadata/fence_rhevm.xml -@@ -1,6 +1,6 @@ - - --fence_rhevm is an I/O Fencing agent which can be used with RHEV-M REST API to fence virtual machines. -+fence_rhevm is a Power Fencing agent which can be used with RHEV-M REST API to fence virtual machines. - http://www.redhat.com - - -diff --git a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml -index 284f9184d..8563d5005 100644 ---- a/tests/data/metadata/fence_rsa.xml -+++ b/tests/data/metadata/fence_rsa.xml -@@ -1,6 +1,6 @@ - - --fence_rsa is an I/O Fencing agent which can be used with the IBM RSA II management interface. It logs into an RSA II device via telnet and reboots the associated machine. Lengthy telnet connections to the RSA II device should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. -+fence_rsa is a Power Fencing agent which can be used with the IBM RSA II management interface. It logs into an RSA II device via telnet and reboots the associated machine. Lengthy telnet connections to the RSA II device should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. - http://www.ibm.com - - -diff --git a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml -index e3d6e1096..ca42ff435 100644 ---- a/tests/data/metadata/fence_rsb.xml -+++ b/tests/data/metadata/fence_rsb.xml -@@ -1,6 +1,6 @@ - -- --fence_rsb is an I/O Fencing agent which can be used with the Fujitsu-Siemens RSB management interface. It logs into device via telnet/ssh and reboots a specified outlet. Lengthy telnet/ssh connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. -+ -+fence_rsb is a Power Fencing agent which can be used with the Fujitsu-Siemens RSB management interface. It logs into device via telnet/ssh and reboots a specified outlet. Lengthy telnet/ssh connections should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. - http://www.fujitsu.com - - -diff --git a/tests/data/metadata/fence_sbd.xml b/tests/data/metadata/fence_sbd.xml -index d5600b7ce..82ded25b9 100644 ---- a/tests/data/metadata/fence_sbd.xml -+++ b/tests/data/metadata/fence_sbd.xml -@@ -1,6 +1,6 @@ - - --fence_sbd is I/O Fencing agent which can be used in environments where sbd can be used (shared storage). -+fence_sbd is an I/O Fencing agent which can be used in environments where sbd can be used (shared storage). - - - -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index facb2f52e..b963fd772 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -1,6 +1,6 @@ - - --fence_scsi is an I/O fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. These devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. -+fence_scsi is an I/O Fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. These devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. - The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Reservation key is generated from "node id" (default) or from "node name hash" (RECOMMENDED) by adjusting "key_value" option. Using hash is recommended to prevent issues when removing nodes from cluster without full cluster restart. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. - - When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it failing. -diff --git a/tests/data/metadata/fence_tripplite_snmp.xml b/tests/data/metadata/fence_tripplite_snmp.xml -index c5f66d56f..418832f9c 100644 ---- a/tests/data/metadata/fence_tripplite_snmp.xml -+++ b/tests/data/metadata/fence_tripplite_snmp.xml -@@ -1,7 +1,7 @@ - - - --fence_apc_snmp is an I/O Fencing agent which can be used with the APC network power switch or Tripplite PDU devices.It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v1, v2c, v3 with all combinations of authenticity/privacy settings. -+fence_tripplite_snmp is a Power Fencing agent which can be used with the APC network power switch or Tripplite PDU devices.It logs into a device via SNMP and reboots a specified outlet. It supports SNMP v1, v2c, v3 with all combinations of authenticity/privacy settings. - http://www.apc.com - - -diff --git a/tests/data/metadata/fence_vbox.xml b/tests/data/metadata/fence_vbox.xml -index 35577a6b6..347f04c7e 100644 ---- a/tests/data/metadata/fence_vbox.xml -+++ b/tests/data/metadata/fence_vbox.xml -@@ -1,6 +1,6 @@ - - --fence_vbox is an I/O Fencing agent which can be used with the virtual machines managed by VirtualBox. It logs via ssh to a dom0 where it runs VBoxManage to do all of the work. -+fence_vbox is a Power Fencing agent which can be used with the virtual machines managed by VirtualBox. It logs via ssh to a dom0 where it runs VBoxManage to do all of the work. - - By default, vbox needs to log in as a user that is a member of the vboxusers group. Also, you must allow ssh login in your sshd_config. - https://www.virtualbox.org/ -diff --git a/tests/data/metadata/fence_virsh.xml b/tests/data/metadata/fence_virsh.xml -index 82fe9b6d1..dc36693fc 100644 ---- a/tests/data/metadata/fence_virsh.xml -+++ b/tests/data/metadata/fence_virsh.xml -@@ -1,6 +1,6 @@ - - --fence_virsh is an I/O Fencing agent which can be used with the virtual machines managed by libvirt. It logs via ssh to a dom0 and there run virsh command, which does all work. -+fence_virsh is a Power Fencing agent which can be used with the virtual machines managed by libvirt. It logs via ssh to a dom0 and there run virsh command, which does all work. - - By default, virsh needs root account to do properly work. So you must allow ssh login in your sshd_config. - http://libvirt.org -diff --git a/tests/data/metadata/fence_vmware.xml b/tests/data/metadata/fence_vmware.xml -index a46ffdb0f..a5fad2fd5 100644 ---- a/tests/data/metadata/fence_vmware.xml -+++ b/tests/data/metadata/fence_vmware.xml -@@ -1,6 +1,6 @@ - - --fence_vmware is an I/O Fencing agent which can be used with the VMware ESX, VMware ESXi or VMware Server to fence virtual machines. -+fence_vmware is a Power Fencing agent which can be used with the VMware ESX, VMware ESXi or VMware Server to fence virtual machines. - - Before you can use this agent, it must be installed VI Perl Toolkit or vmrun command on every node you want to make fencing. - -diff --git a/tests/data/metadata/fence_vmware_rest.xml b/tests/data/metadata/fence_vmware_rest.xml -index 5c69c2f21..672769d99 100644 ---- a/tests/data/metadata/fence_vmware_rest.xml -+++ b/tests/data/metadata/fence_vmware_rest.xml -@@ -1,6 +1,6 @@ - - --fence_vmware_rest is an I/O Fencing agent which can be used with VMware API to fence virtual machines. -+fence_vmware_rest is a Power Fencing agent which can be used with VMware API to fence virtual machines. - - NOTE: If there's more than 1000 VMs there is a filter parameter to work around the API limit. See https://code.vmware.com/apis/62/vcenter-management#/VM%20/get_vcenter_vm for full list of filters. - https://www.vmware.com -diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml -index 72b27e351..5d5ff36e4 100644 ---- a/tests/data/metadata/fence_vmware_soap.xml -+++ b/tests/data/metadata/fence_vmware_soap.xml -@@ -1,6 +1,6 @@ - - --fence_vmware_soap is an I/O Fencing agent which can be used with the virtual machines managed by VMWare products that have SOAP API v4.1+. -+fence_vmware_soap is a Power Fencing agent which can be used with the virtual machines managed by VMWare products that have SOAP API v4.1+. - - Name of virtual machine (-n / port) has to be used in inventory path format (e.g. /datacenter/vm/Discovered virtual machine/myMachine). In the cases when name of yours VM is unique you can use it instead. Alternatively you can always use UUID to access virtual machine. - http://www.vmware.com -diff --git a/tests/data/metadata/fence_vmware_vcloud.xml b/tests/data/metadata/fence_vmware_vcloud.xml -index 3c8bb74a3..c017daf5a 100644 ---- a/tests/data/metadata/fence_vmware_vcloud.xml -+++ b/tests/data/metadata/fence_vmware_vcloud.xml -@@ -1,6 +1,6 @@ - - --fence_vmware_vcloud is an I/O Fencing agent which can be used with VMware vCloud Director API to fence virtual machines. -+fence_vmware_vcloud is a Power Fencing agent which can be used with VMware vCloud Director API to fence virtual machines. - https://www.vmware.com - - -diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml -index b9eb9c6bc..72e6d17f7 100644 ---- a/tests/data/metadata/fence_wti.xml -+++ b/tests/data/metadata/fence_wti.xml -@@ -1,6 +1,6 @@ - - --fence_wti is an I/O Fencing agent which can be used with the WTI Network Power Switch (NPS). It logs into an NPS via telnet or ssh and boots a specified plug. Lengthy telnet connections to the NPS should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. -+fence_wti is a Power Fencing agent which can be used with the WTI Network Power Switch (NPS). It logs into an NPS via telnet or ssh and boots a specified plug. Lengthy telnet connections to the NPS should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. - http://www.wti.com - - -diff --git a/tests/data/metadata/fence_xenapi.xml b/tests/data/metadata/fence_xenapi.xml -index 380ac28da..c61d465f1 100644 ---- a/tests/data/metadata/fence_xenapi.xml -+++ b/tests/data/metadata/fence_xenapi.xml -@@ -1,6 +1,6 @@ - - --fence_cxs is an I/O Fencing agent used on Citrix XenServer hosts. It uses the XenAPI, supplied by Citrix, to establish an XML-RPC session to a XenServer host. Once the session is established, further XML-RPC commands are issued in order to switch on, switch off, restart and query the status of virtual machines running on the host. -+fence_xenapi is a Power Fencing agent used on Citrix XenServer hosts. It uses the XenAPI, supplied by Citrix, to establish an XML-RPC session to a XenServer host. Once the session is established, further XML-RPC commands are issued in order to switch on, switch off, restart and query the status of virtual machines running on the host. - http://www.xenproject.org - - -diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml -index 96393bdfa..67104386e 100644 ---- a/tests/data/metadata/fence_zvmip.xml -+++ b/tests/data/metadata/fence_zvmip.xml -@@ -1,7 +1,6 @@ - - --The fence_zvmip agent is intended to be used with the --z/VM SMAPI service via TCP/IP. -+fence_zvmip is a Power Fencing agent for z/VM SMAPI service via TCP/IP. - - The z/VM SMAPI service must be configured so that the virtual machine running - the agent can connect to the service, access the system's directory manager, diff --git a/SOURCES/RHEL-14031-2-fence_cisco_mds-undo-metadata-change.patch b/SOURCES/RHEL-14031-2-fence_cisco_mds-undo-metadata-change.patch deleted file mode 100644 index a80b818..0000000 --- a/SOURCES/RHEL-14031-2-fence_cisco_mds-undo-metadata-change.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 639732ddca765b2f147ef0c0a896968e3304ca49 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 23 Oct 2023 09:28:55 +0200 -Subject: [PATCH] fence_cisco_mds: undo metadata change, as it is an I/O agent - ---- - agents/cisco_mds/fence_cisco_mds.py | 2 +- - tests/data/metadata/fence_cisco_mds.xml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/cisco_mds/fence_cisco_mds.py b/agents/cisco_mds/fence_cisco_mds.py -index 04cd1f842..fbb876a94 100644 ---- a/agents/cisco_mds/fence_cisco_mds.py -+++ b/agents/cisco_mds/fence_cisco_mds.py -@@ -77,7 +77,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Cisco MDS" -- docs["longdesc"] = "fence_cisco_mds is a Power Fencing agent \ -+ docs["longdesc"] = "fence_cisco_mds is an I/O Fencing agent \ - which can be used with any Cisco MDS 9000 series with SNMP enabled device." - docs["vendorurl"] = "http://www.cisco.com" - show_docs(options, docs) -diff --git a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml -index 2105ecccc..829c9dcbe 100644 ---- a/tests/data/metadata/fence_cisco_mds.xml -+++ b/tests/data/metadata/fence_cisco_mds.xml -@@ -1,6 +1,6 @@ - - --fence_cisco_mds is a Power Fencing agent which can be used with any Cisco MDS 9000 series with SNMP enabled device. -+fence_cisco_mds is an I/O Fencing agent which can be used with any Cisco MDS 9000 series with SNMP enabled device. - http://www.cisco.com - - diff --git a/SOURCES/RHEL-14343-fence_zvmip-1-document-user-permissions.patch b/SOURCES/RHEL-14343-fence_zvmip-1-document-user-permissions.patch deleted file mode 100644 index 95c6b53..0000000 --- a/SOURCES/RHEL-14343-fence_zvmip-1-document-user-permissions.patch +++ /dev/null @@ -1,159 +0,0 @@ -From dcb8ddd13c3dfad02e00c07f283251e0c2a60c46 Mon Sep 17 00:00:00 2001 -From: Reid Wahl -Date: Mon, 16 Aug 2021 17:44:13 -0700 -Subject: [PATCH] fence_zvmip: Update longdesc to document all required - functions - -In RHBZ#1935641, IBM explained that the requesting user needs -authorization for more functions than what is currently documented. - -They said: -""" -What we found is that you need rights from three different NICKS: -SERVER_MANAGEMENT, IMAGE_CHARACTERISTICS and IMAGE_OPERATIONS. -You won't be able to give a user all three NICKS. -Therefore, you have to create a new NICK with all capabilities from all -three NICKS together and then assign the new NICK to the USER -"ZCLUSTER". -Even better is to just use the needed Subset with a new NICK. -We found five commands which are used in the fencing code and on the -z/VM Log which should be enough for fencing to work. - -We suggest creating following files: - -File VSMWORK1 NAMELIST: -``` -:nick.ZVM_FENCE -:list. -IMAGE_ACTIVATE -IMAGE_DEACTIVATE -IMAGE_STATUS_QUERY -CHECK_AUTHENTICATION -IMAGE_NAME_QUERY_DM -``` - -File VSMWORK1 AUTHLIST: -``` -ZCLUSTER ALL ZVM_FENCE -``` - -For details, we suggest adding a link to the current z/VM docu: - - NAMELIST: https://www.ibm.com/support/knowledgecenter/de/SSB27U_7.2.0/com.ibm.zvm.v720.dmse6/namelst.htm - - AUTHLIST: https://www.ibm.com/support/knowledgecenter/de/SSB27U_7.2.0/com.ibm.zvm.v720.dmse6/auf.htm -""" - -Resolves: RHBZ1935641 - -Signed-off-by: Reid Wahl ---- - agents/zvm/fence_zvmip.py | 37 ++++++++++++++++++++++------- - tests/data/metadata/fence_zvmip.xml | 37 ++++++++++++++++++++++------- - 2 files changed, 56 insertions(+), 18 deletions(-) - -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index 4f538e10d..c37950a20 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -199,21 +199,40 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for use with z/VM Virtual Machines" -- docs["longdesc"] = """The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP -+ docs["longdesc"] = """The fence_zvmip agent is intended to be used with the -+z/VM SMAPI service via TCP/IP. - --To use this agent the z/VM SMAPI service needs to be configured to allow the virtual machine running this agent to connect to it and issue --the image_recycle operation. This involves updating the VSMWORK1 AUTHLIST VMSYS:VSMWORK1. file. The entry should look something similar to --this: -+The z/VM SMAPI service must be configured so that the virtual machine running -+the agent can connect to the service, access the system's directory manager, -+and shortly thereafter run image_deactivate and image_activate. This involves -+updating the VSMWORK1 NAMELIST and VSMWORK1 AUTHLIST VMSYS:VSMWORK1 files. -+ -+The NAMELIST entry assigns all the required functions to one nick and should -+look similar to this: -+ -+:nick.ZVM_FENCE -+:list. -+IMAGE_ACTIVATE -+IMAGE_DEACTIVATE -+IMAGE_STATUS_QUERY -+CHECK_AUTHENTICATION -+IMAGE_NAME_QUERY_DM -+ -+ -+The AUTHLIST entry authorizes the user to perform all the functions associated -+with the nick, and should look similar to this: - - Column 1 Column 66 Column 131 - -- | | | -- V V V -+| | | -+V V V -+ -+XXXXXXXX ALL ZVM_FENCE - --XXXXXXXX ALL IMAGE_CHARACTERISTICS -+where XXXXXXXX is the name of the user in the authuser field of the request. - --Where XXXXXXX is the name of the virtual machine used in the authuser field of the request. This virtual machine also has to be authorized --to access the system's directory manager. -+Refer to the official z/VM documentation for complete instructions and -+reference materials. - """ - docs["vendorurl"] = "http://www.ibm.com" - show_docs(options, docs) -diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml -index 6996ab736..96393bdfa 100644 ---- a/tests/data/metadata/fence_zvmip.xml -+++ b/tests/data/metadata/fence_zvmip.xml -@@ -1,20 +1,39 @@ - - --The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP -+The fence_zvmip agent is intended to be used with the -+z/VM SMAPI service via TCP/IP. - --To use this agent the z/VM SMAPI service needs to be configured to allow the virtual machine running this agent to connect to it and issue --the image_recycle operation. This involves updating the VSMWORK1 AUTHLIST VMSYS:VSMWORK1. file. The entry should look something similar to --this: -+The z/VM SMAPI service must be configured so that the virtual machine running -+the agent can connect to the service, access the system's directory manager, -+and shortly thereafter run image_deactivate and image_activate. This involves -+updating the VSMWORK1 NAMELIST and VSMWORK1 AUTHLIST VMSYS:VSMWORK1 files. -+ -+The NAMELIST entry assigns all the required functions to one nick and should -+look similar to this: -+ -+:nick.ZVM_FENCE -+:list. -+IMAGE_ACTIVATE -+IMAGE_DEACTIVATE -+IMAGE_STATUS_QUERY -+CHECK_AUTHENTICATION -+IMAGE_NAME_QUERY_DM -+ -+ -+The AUTHLIST entry authorizes the user to perform all the functions associated -+with the nick, and should look similar to this: - - Column 1 Column 66 Column 131 - -- | | | -- V V V -+| | | -+V V V -+ -+XXXXXXXX ALL ZVM_FENCE - --XXXXXXXX ALL IMAGE_CHARACTERISTICS -+where XXXXXXXX is the name of the user in the authuser field of the request. - --Where XXXXXXX is the name of the virtual machine used in the authuser field of the request. This virtual machine also has to be authorized --to access the system's directory manager. -+Refer to the official z/VM documentation for complete instructions and -+reference materials. - - http://www.ibm.com - diff --git a/SOURCES/RHEL-14343-fence_zvmip-2-fix-manpage-formatting.patch b/SOURCES/RHEL-14343-fence_zvmip-2-fix-manpage-formatting.patch deleted file mode 100644 index e650b0f..0000000 --- a/SOURCES/RHEL-14343-fence_zvmip-2-fix-manpage-formatting.patch +++ /dev/null @@ -1,41 +0,0 @@ -From adac1d81c5758235b6df46d0a91f1e948655848a Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 3 Jan 2024 10:17:50 +0100 -Subject: [PATCH] fence_zvmip: fix manpage formatting - ---- - agents/zvm/fence_zvmip.py | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index f1cea2652..bd8273c49 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -210,12 +210,12 @@ def main(): - The NAMELIST entry assigns all the required functions to one nick and should - look similar to this: - --:nick.ZVM_FENCE --:list. --IMAGE_ACTIVATE --IMAGE_DEACTIVATE --IMAGE_STATUS_QUERY --CHECK_AUTHENTICATION -+:nick.ZVM_FENCE\n.br\n\ -+:list.\n.br\n\ -+IMAGE_ACTIVATE\n.br\n\ -+IMAGE_DEACTIVATE\n.br\n\ -+IMAGE_STATUS_QUERY\n.br\n\ -+CHECK_AUTHENTICATION\n.br\n\ - IMAGE_NAME_QUERY_DM - - -@@ -224,7 +224,7 @@ def main(): - - Column 1 Column 66 Column 131 - --| | | -+| | |\n.br\n\ - V V V - - XXXXXXXX ALL ZVM_FENCE diff --git a/SOURCES/RHEL-22174-kubevirt-fix-bundled-jinja2-CVE-2024-22195.patch b/SOURCES/RHEL-22174-kubevirt-fix-bundled-jinja2-CVE-2024-22195.patch deleted file mode 100644 index cdc3fb8..0000000 --- a/SOURCES/RHEL-22174-kubevirt-fix-bundled-jinja2-CVE-2024-22195.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 7dd3680e6eea0d77fde024763657aa4d884ddb23 Mon Sep 17 00:00:00 2001 -From: Calum Hutton -Date: Thu, 26 Oct 2023 12:08:53 +0100 -Subject: [PATCH] xmlattr filter disallows keys with spaces - ---- - CHANGES.rst | 1 + - src/jinja2/filters.py | 28 +++++++++++++++++++++------- - tests/test_filters.py | 6 ++++++ - 3 files changed, 28 insertions(+), 7 deletions(-) - -diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py -index ed07c4c0e..c7ecc9bb6 100644 ---- a/kubevirt/jinja2/filters.py -+++ b/kubevirt/jinja2/filters.py -@@ -248,13 +248,17 @@ def do_items(value: t.Union[t.Mapping[K, V], Undefined]) -> t.Iterator[t.Tuple[K - yield from value.items() - - -+_space_re = re.compile(r"\s", flags=re.ASCII) -+ -+ - @pass_eval_context - def do_xmlattr( - eval_ctx: "EvalContext", d: t.Mapping[str, t.Any], autospace: bool = True - ) -> str: - """Create an SGML/XML attribute string based on the items in a dict. -- All values that are neither `none` nor `undefined` are automatically -- escaped: -+ -+ If any key contains a space, this fails with a ``ValueError``. Values that -+ are neither ``none`` nor ``undefined`` are automatically escaped. - - .. sourcecode:: html+jinja - -@@ -273,12 +277,22 @@ def do_xmlattr( - - As you can see it automatically prepends a space in front of the item - if the filter returned something unless the second parameter is false. -+ -+ .. versionchanged:: 3.1.3 -+ Keys with spaces are not allowed. - """ -- rv = " ".join( -- f'{escape(key)}="{escape(value)}"' -- for key, value in d.items() -- if value is not None and not isinstance(value, Undefined) -- ) -+ items = [] -+ -+ for key, value in d.items(): -+ if value is None or isinstance(value, Undefined): -+ continue -+ -+ if _space_re.search(key) is not None: -+ raise ValueError(f"Spaces are not allowed in attributes: '{key}'") -+ -+ items.append(f'{escape(key)}="{escape(value)}"') -+ -+ rv = " ".join(items) - - if autospace and rv: - rv = " " + rv diff --git a/SOURCES/RHEL-35655-kubevirt-fix-bundled-jinja2-CVE-2024-34064.patch b/SOURCES/RHEL-35655-kubevirt-fix-bundled-jinja2-CVE-2024-34064.patch deleted file mode 100644 index 700ab80..0000000 --- a/SOURCES/RHEL-35655-kubevirt-fix-bundled-jinja2-CVE-2024-34064.patch +++ /dev/null @@ -1,65 +0,0 @@ -From d655030770081e2dfe46f90e27620472a502289d Mon Sep 17 00:00:00 2001 -From: David Lord -Date: Thu, 2 May 2024 09:14:00 -0700 -Subject: [PATCH] disallow invalid characters in keys to xmlattr filter - ---- - CHANGES.rst | 6 ++++++ - src/jinja2/filters.py | 22 +++++++++++++++++----- - tests/test_filters.py | 11 ++++++----- - 3 files changed, 29 insertions(+), 10 deletions(-) - -diff --git a/kubevirt/jinja2/filters.py b/kubevirt/jinja2/filters.py -index 4cf3c11fb..acd11976e 100644 ---- a/kubevirt/jinja2/filters.py -+++ b/kubevirt/jinja2/filters.py -@@ -250,7 +250,9 @@ def do_items(value: t.Union[t.Mapping[K, V], Undefined]) -> t.Iterator[t.Tuple[K - yield from value.items() - - --_space_re = re.compile(r"\s", flags=re.ASCII) -+# Check for characters that would move the parser state from key to value. -+# https://html.spec.whatwg.org/#attribute-name-state -+_attr_key_re = re.compile(r"[\s/>=]", flags=re.ASCII) - - - @pass_eval_context -@@ -259,8 +261,14 @@ def do_xmlattr( - ) -> str: - """Create an SGML/XML attribute string based on the items in a dict. - -- If any key contains a space, this fails with a ``ValueError``. Values that -- are neither ``none`` nor ``undefined`` are automatically escaped. -+ **Values** that are neither ``none`` nor ``undefined`` are automatically -+ escaped, safely allowing untrusted user input. -+ -+ User input should not be used as **keys** to this filter. If any key -+ contains a space, ``/`` solidus, ``>`` greater-than sign, or ``=`` equals -+ sign, this fails with a ``ValueError``. Regardless of this, user input -+ should never be used as keys to this filter, or must be separately validated -+ first. - - .. sourcecode:: html+jinja - -@@ -280,6 +288,10 @@ def do_xmlattr( - As you can see it automatically prepends a space in front of the item - if the filter returned something unless the second parameter is false. - -+ .. versionchanged:: 3.1.4 -+ Keys with ``/`` solidus, ``>`` greater-than sign, or ``=`` equals sign -+ are not allowed. -+ - .. versionchanged:: 3.1.3 - Keys with spaces are not allowed. - """ -@@ -289,8 +301,8 @@ def do_xmlattr( - if value is None or isinstance(value, Undefined): - continue - -- if _space_re.search(key) is not None: -- raise ValueError(f"Spaces are not allowed in attributes: '{key}'") -+ if _attr_key_re.search(key) is not None: -+ raise ValueError(f"Invalid character in attribute name: {key!r}") - - items.append(f'{escape(key)}="{escape(value)}"') - diff --git a/SOURCES/RHEL-43568-1-kubevirt-fix-bundled-urllib3-CVE-2024-37891.patch b/SOURCES/RHEL-43568-1-kubevirt-fix-bundled-urllib3-CVE-2024-37891.patch deleted file mode 100644 index f5abf83..0000000 --- a/SOURCES/RHEL-43568-1-kubevirt-fix-bundled-urllib3-CVE-2024-37891.patch +++ /dev/null @@ -1,32 +0,0 @@ -From accff72ecc2f6cf5a76d9570198a93ac7c90270e Mon Sep 17 00:00:00 2001 -From: Quentin Pradet -Date: Mon, 17 Jun 2024 11:09:06 +0400 -Subject: [PATCH] Merge pull request from GHSA-34jh-p97f-mpxf - -* Strip Proxy-Authorization header on redirects - -* Fix test_retry_default_remove_headers_on_redirect - -* Set release date ---- - CHANGES.rst | 5 +++++ - src/urllib3/util/retry.py | 4 +++- - test/test_retry.py | 6 ++++- - test/with_dummyserver/test_poolmanager.py | 27 ++++++++++++++++++++--- - 4 files changed, 37 insertions(+), 5 deletions(-) - -diff --git a/kubevirt/urllib3/util/retry.py b/kubevirt/urllib3/util/retry.py -index 7a76a4a6ad..0456cceba4 100644 ---- a/kubevirt/urllib3/util/retry.py -+++ b/kubevirt/urllib3/util/retry.py -@@ -189,7 +189,9 @@ class Retry: - RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503]) - - #: Default headers to be used for ``remove_headers_on_redirect`` -- DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Cookie", "Authorization"]) -+ DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset( -+ ["Cookie", "Authorization", "Proxy-Authorization"] -+ ) - - #: Default maximum backoff time. - DEFAULT_BACKOFF_MAX = 120 diff --git a/SOURCES/RHEL-43568-2-aws-fix-bundled-urllib3-CVE-2024-37891.patch b/SOURCES/RHEL-43568-2-aws-fix-bundled-urllib3-CVE-2024-37891.patch deleted file mode 100644 index d6583b2..0000000 --- a/SOURCES/RHEL-43568-2-aws-fix-bundled-urllib3-CVE-2024-37891.patch +++ /dev/null @@ -1,32 +0,0 @@ -From accff72ecc2f6cf5a76d9570198a93ac7c90270e Mon Sep 17 00:00:00 2001 -From: Quentin Pradet -Date: Mon, 17 Jun 2024 11:09:06 +0400 -Subject: [PATCH] Merge pull request from GHSA-34jh-p97f-mpxf - -* Strip Proxy-Authorization header on redirects - -* Fix test_retry_default_remove_headers_on_redirect - -* Set release date ---- - CHANGES.rst | 5 +++++ - src/urllib3/util/retry.py | 4 +++- - test/test_retry.py | 6 ++++- - test/with_dummyserver/test_poolmanager.py | 27 ++++++++++++++++++++--- - 4 files changed, 37 insertions(+), 5 deletions(-) - -diff --git a/aws/urllib3/util/retry.py b/aws/urllib3/util/retry.py -index 7a76a4a6ad..0456cceba4 100644 ---- a/aws/urllib3/util/retry.py -+++ b/aws/urllib3/util/retry.py -@@ -189,7 +189,9 @@ class Retry: - RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503]) - - #: Default headers to be used for ``remove_headers_on_redirect`` -- DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(["Cookie", "Authorization"]) -+ DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset( -+ ["Cookie", "Authorization", "Proxy-Authorization"] -+ ) - - #: Default maximum backoff time. - DEFAULT_BACKOFF_MAX = 120 diff --git a/SOURCES/RHEL-50223-setuptools-fix-CVE-2024-6345.patch b/SOURCES/RHEL-50223-setuptools-fix-CVE-2024-6345.patch deleted file mode 100644 index 9b86c17..0000000 --- a/SOURCES/RHEL-50223-setuptools-fix-CVE-2024-6345.patch +++ /dev/null @@ -1,203 +0,0 @@ -diff --color -uNr a/kubevirt/setuptools/package_index.py b/kubevirt/setuptools/package_index.py ---- a/kubevirt/setuptools/package_index.py 2021-10-22 22:55:51.000000000 +0200 -+++ b/kubevirt/setuptools/package_index.py 2024-07-24 14:06:14.833852463 +0200 -@@ -1,5 +1,6 @@ - """PyPI and direct package downloading""" - import sys -+import subprocess - import os - import re - import io -@@ -558,7 +559,7 @@ - scheme = URL_SCHEME(spec) - if scheme: - # It's a url, download it to tmpdir -- found = self._download_url(scheme.group(1), spec, tmpdir) -+ found = self._download_url(spec, tmpdir) - base, fragment = egg_info_for_url(spec) - if base.endswith('.py'): - found = self.gen_setup(found, fragment, tmpdir) -@@ -777,7 +778,7 @@ - raise DistutilsError("Download error for %s: %s" - % (url, v)) from v - -- def _download_url(self, scheme, url, tmpdir): -+ def _download_url(self, url, tmpdir): - # Determine download filename - # - name, fragment = egg_info_for_url(url) -@@ -792,19 +793,59 @@ - - filename = os.path.join(tmpdir, name) - -- # Download the file -- # -- if scheme == 'svn' or scheme.startswith('svn+'): -- return self._download_svn(url, filename) -- elif scheme == 'git' or scheme.startswith('git+'): -- return self._download_git(url, filename) -- elif scheme.startswith('hg+'): -- return self._download_hg(url, filename) -- elif scheme == 'file': -- return urllib.request.url2pathname(urllib.parse.urlparse(url)[2]) -- else: -- self.url_ok(url, True) # raises error if not allowed -- return self._attempt_download(url, filename) -+ return self._download_vcs(url, filename) or self._download_other(url, filename) -+ -+ @staticmethod -+ def _resolve_vcs(url): -+ """ -+ >>> rvcs = PackageIndex._resolve_vcs -+ >>> rvcs('git+http://foo/bar') -+ 'git' -+ >>> rvcs('hg+https://foo/bar') -+ 'hg' -+ >>> rvcs('git:myhost') -+ 'git' -+ >>> rvcs('hg:myhost') -+ >>> rvcs('http://foo/bar') -+ """ -+ scheme = urllib.parse.urlsplit(url).scheme -+ pre, sep, post = scheme.partition('+') -+ # svn and git have their own protocol; hg does not -+ allowed = set(['svn', 'git'] + ['hg'] * bool(sep)) -+ return next(iter({pre} & allowed), None) -+ -+ def _download_vcs(self, url, spec_filename): -+ vcs = self._resolve_vcs(url) -+ if not vcs: -+ return -+ if vcs == 'svn': -+ raise DistutilsError( -+ f"Invalid config, SVN download is not supported: {url}" -+ ) -+ -+ filename, _, _ = spec_filename.partition('#') -+ url, rev = self._vcs_split_rev_from_url(url) -+ -+ self.info(f"Doing {vcs} clone from {url} to {filename}") -+ subprocess.check_call([vcs, 'clone', '--quiet', url, filename]) -+ -+ co_commands = dict( -+ git=[vcs, '-C', filename, 'checkout', '--quiet', rev], -+ hg=[vcs, '--cwd', filename, 'up', '-C', '-r', rev, '-q'], -+ ) -+ if rev is not None: -+ self.info(f"Checking out {rev}") -+ subprocess.check_call(co_commands[vcs]) -+ -+ return filename -+ -+ def _download_other(self, url, filename): -+ scheme = urllib.parse.urlsplit(url).scheme -+ if scheme == 'file': # pragma: no cover -+ return urllib.request.url2pathname(urllib.parse.urlparse(url).path) -+ # raise error if not allowed -+ self.url_ok(url, True) -+ return self._attempt_download(url, filename) - - def scan_url(self, url): - self.process_url(url, True) -@@ -831,77 +872,37 @@ - os.unlink(filename) - raise DistutilsError("Unexpected HTML page found at " + url) - -- def _download_svn(self, url, filename): -- warnings.warn("SVN download support is deprecated", UserWarning) -- url = url.split('#', 1)[0] # remove any fragment for svn's sake -- creds = '' -- if url.lower().startswith('svn:') and '@' in url: -- scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) -- if not netloc and path.startswith('//') and '/' in path[2:]: -- netloc, path = path[2:].split('/', 1) -- auth, host = _splituser(netloc) -- if auth: -- if ':' in auth: -- user, pw = auth.split(':', 1) -- creds = " --username=%s --password=%s" % (user, pw) -- else: -- creds = " --username=" + auth -- netloc = host -- parts = scheme, netloc, url, p, q, f -- url = urllib.parse.urlunparse(parts) -- self.info("Doing subversion checkout from %s to %s", url, filename) -- os.system("svn checkout%s -q %s %s" % (creds, url, filename)) -- return filename -- - @staticmethod -- def _vcs_split_rev_from_url(url, pop_prefix=False): -- scheme, netloc, path, query, frag = urllib.parse.urlsplit(url) -- -- scheme = scheme.split('+', 1)[-1] -- -- # Some fragment identification fails -- path = path.split('#', 1)[0] -- -- rev = None -- if '@' in path: -- path, rev = path.rsplit('@', 1) -- -- # Also, discard fragment -- url = urllib.parse.urlunsplit((scheme, netloc, path, query, '')) -- -- return url, rev -- -- def _download_git(self, url, filename): -- filename = filename.split('#', 1)[0] -- url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True) -- -- self.info("Doing git clone from %s to %s", url, filename) -- os.system("git clone --quiet %s %s" % (url, filename)) -+ def _vcs_split_rev_from_url(url): -+ """ -+ Given a possible VCS URL, return a clean URL and resolved revision if any. - -- if rev is not None: -- self.info("Checking out %s", rev) -- os.system("git -C %s checkout --quiet %s" % ( -- filename, -- rev, -- )) -+ >>> vsrfu = PackageIndex._vcs_split_rev_from_url -+ >>> vsrfu('git+https://github.com/pypa/setuptools@v69.0.0#egg-info=setuptools') -+ ('https://github.com/pypa/setuptools', 'v69.0.0') -+ >>> vsrfu('git+https://github.com/pypa/setuptools#egg-info=setuptools') -+ ('https://github.com/pypa/setuptools', None) -+ >>> vsrfu('http://foo/bar') -+ ('http://foo/bar', None) -+ """ -+ parts = urllib.parse.urlsplit(url) - -- return filename -+ clean_scheme = parts.scheme.split('+', 1)[-1] - -- def _download_hg(self, url, filename): -- filename = filename.split('#', 1)[0] -- url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True) -+ # Some fragment identification fails -+ no_fragment_path, _, _ = parts.path.partition('#') - -- self.info("Doing hg clone from %s to %s", url, filename) -- os.system("hg clone --quiet %s %s" % (url, filename)) -+ pre, sep, post = no_fragment_path.rpartition('@') -+ clean_path, rev = (pre, post) if sep else (post, None) - -- if rev is not None: -- self.info("Updating to %s", rev) -- os.system("hg --cwd %s up -C -r %s -q" % ( -- filename, -- rev, -- )) -+ resolved = parts._replace( -+ scheme=clean_scheme, -+ path=clean_path, -+ # discard the fragment -+ fragment='', -+ ).geturl() - -- return filename -+ return resolved, rev - - def debug(self, msg, *args): - log.debug(msg, *args) diff --git a/SOURCES/RHEL-5397-4-fence_scsi-log-err.patch b/SOURCES/RHEL-5397-4-fence_scsi-log-err.patch deleted file mode 100644 index 47b7e32..0000000 --- a/SOURCES/RHEL-5397-4-fence_scsi-log-err.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/agents/scsi/fence_scsi.py 2024-01-03 14:15:20.755284113 +0100 -+++ b/agents/scsi/fence_scsi.py 2024-01-03 12:32:01.598598127 +0100 -@@ -190,7 +190,8 @@ - cmd = options["--sg_persist-path"] + " -n -i " + opts + "-r -d " + dev - out = run_cmd(options, cmd) - if out["rc"] and fail: -- fail_usage("Cannot get reservation key") -+ fail_usage('Cannot get reservation key on device "' + dev -+ + '": ' + out["err"]) - match = re.search(r"\s+key=0x(\S+)\s+", out["out"], re.IGNORECASE) - return match.group(1) if match else None - -@@ -204,7 +205,8 @@ - cmd = options["--sg_persist-path"] + " -n -i " + opts + "-k -d " + dev - out = run_cmd(options, cmd) - if out["rc"]: -- fail_usage("Cannot get registration keys", fail) -+ fail_usage('Cannot get registration keys on device "' + dev -+ + '": ' + out["err"], fail) - if not fail: - return [] - for line in out["out"].split("\n"): diff --git a/SOURCES/RHEL-5397-fence_scsi-1-fix-ISID-reg-handling.patch b/SOURCES/RHEL-5397-fence_scsi-1-fix-ISID-reg-handling.patch deleted file mode 100644 index 7110b9d..0000000 --- a/SOURCES/RHEL-5397-fence_scsi-1-fix-ISID-reg-handling.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9d0d0d013c7edae43a4ebc5f46bf2e7a4f127654 Mon Sep 17 00:00:00 2001 -From: "sreejit.mohanan" -Date: Fri, 17 Feb 2023 18:04:03 -0800 -Subject: [PATCH] fence_scsi: fix registration handling if ISID conflicts ISID - (Initiator Session ID) belonging to I_T Nexus changes for RHEL based on the - session ID. This means that the connection to the device can be set up with - different ISID on reconnects. - -fence_scsi treats same key as a tip to ignore issuing registration -to the device but if the device was registered using a different -ISID, the key would be the same but the I_T Nexus (new ISID) would -not have access to the device. - -Fixing this by preempting the old key and replacing with the current -one. ---- - agents/scsi/fence_scsi.py | 35 ++++++++++++++++++++++++++++++++--- - 1 file changed, 32 insertions(+), 3 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index f9e6823b2..85e4f29e6 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -137,12 +137,41 @@ 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 -+ -+ # Check if any registration exists for the key already. We track this in -+ # order to decide whether the existing registration needs to be cleared. -+ # This is needed since the previous registration could be for a -+ # different I_T nexus (different ISID). -+ registration_key_exists = False -+ if options["--key"] in get_registration_keys(options, dev): -+ registration_key_exists = True -+ if not register_helper(options, options["--key"], dev): -+ return False -+ -+ if registration_key_exists: -+ # If key matches, make sure it matches with the connection that -+ # exists right now. To do this, we can issue a preempt with same key -+ # which should replace the old invalid entries from the target. -+ if not preempt(options, options["--key"], dev): -+ return False -+ -+ # If there was no reservation, we need to issue another registration -+ # since the previous preempt would clear registration made above. -+ if get_reservation_key(options, dev, False) != options["--key"]: -+ return register_helper(options, options["--key"], dev) -+ return True -+ -+# cancel registration without aborting tasks -+def preempt(options, host, dev): -+ reset_dev(options,dev) -+ cmd = options["--sg_persist-path"] + " -n -o -P -T 5 -K " + host + " -S " + options["--key"] + " -d " + dev -+ return not bool(run_cmd(options, cmd)["rc"]) -+ -+# helper function to send the register command -+def register_helper(options, host, dev): - reset_dev(options, dev) - cmd = options["--sg_persist-path"] + " -n -o -I -S " + options["--key"] + " -d " + dev - cmd += " -Z" if "--aptpl" in options else "" -- #cmd return code != 0 but registration can be successful - return not bool(run_cmd(options, cmd)["err"]) - - diff --git a/SOURCES/RHEL-5397-fence_scsi-2-fix-ISID-reg-handling-off.patch b/SOURCES/RHEL-5397-fence_scsi-2-fix-ISID-reg-handling-off.patch deleted file mode 100644 index cfafaa7..0000000 --- a/SOURCES/RHEL-5397-fence_scsi-2-fix-ISID-reg-handling-off.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 34baef58db442148b8e067509d2cdd37b7a91ef4 Mon Sep 17 00:00:00 2001 -From: "sreejit.mohanan" -Date: Thu, 7 Sep 2023 15:57:51 -0700 -Subject: [PATCH] fence_scsi: fix registration handling in device 'off' - workflows - -ISID (Initiator Session ID) belonging to I_T Nexus changes for -RHEL based on the session ID. This means that the connection to -the device can be set up with different ISID on reconnects. - -When a device is powered off, fence_scsi assumes that the client -has a registration to the device and sends a preempt-and-abort -request which ends up failing due to reservation conflict. - -Fixing this by registering the host key with the device and preempting -the old registration (if it exists). This should make sure that the -host is able to preempt the other key successfully. ---- - agents/scsi/fence_scsi.py | 29 +++++++++++++++-------------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 42530ceb5..519319bf5 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -41,7 +41,7 @@ def set_status(conn, options): - for dev in options["devices"]: - is_block_device(dev) - -- register_dev(options, dev) -+ register_dev(options, dev, options["--key"]) - if options["--key"] not in get_registration_keys(options, dev): - count += 1 - logging.debug("Failed to register key "\ -@@ -62,7 +62,7 @@ def set_status(conn, options): - fail_usage("Failed: keys cannot be same. You can not fence yourself.") - for dev in options["devices"]: - is_block_device(dev) -- -+ register_dev(options, dev, host_key) - if options["--key"] in get_registration_keys(options, dev): - preempt_abort(options, host_key, dev) - -@@ -131,11 +131,11 @@ def reset_dev(options, dev): - return run_cmd(options, options["--sg_turs-path"] + " " + dev)["rc"] - - --def register_dev(options, dev): -+def register_dev(options, dev, key): - dev = os.path.realpath(dev) - if re.search(r"^dm", dev[5:]): - for slave in get_mpath_slaves(dev): -- register_dev(options, slave) -+ register_dev(options, slave, key) - return True - - # Check if any registration exists for the key already. We track this in -@@ -143,34 +143,35 @@ def register_dev(options, dev): - # This is needed since the previous registration could be for a - # different I_T nexus (different ISID). - registration_key_exists = False -- if options["--key"] in get_registration_keys(options, dev): -+ if key in get_registration_keys(options, dev): -+ logging.debug("Registration key exists for device " + dev) - registration_key_exists = True -- if not register_helper(options, options["--key"], dev): -+ if not register_helper(options, dev, key): - return False - - if registration_key_exists: - # If key matches, make sure it matches with the connection that - # exists right now. To do this, we can issue a preempt with same key - # which should replace the old invalid entries from the target. -- if not preempt(options, options["--key"], dev): -+ if not preempt(options, key, dev, key): - return False - - # If there was no reservation, we need to issue another registration - # since the previous preempt would clear registration made above. -- if get_reservation_key(options, dev, False) != options["--key"]: -- return register_helper(options, options["--key"], dev) -+ if get_reservation_key(options, dev, False) != key: -+ return register_helper(options, dev, key) - return True - --# cancel registration without aborting tasks --def preempt(options, host, dev): -+# helper function to preempt host with 'key' using 'host_key' without aborting tasks -+def preempt(options, host_key, dev, key): - reset_dev(options,dev) -- cmd = options["--sg_persist-path"] + " -n -o -P -T 5 -K " + host + " -S " + options["--key"] + " -d " + dev -+ cmd = options["--sg_persist-path"] + " -n -o -P -T 5 -K " + host_key + " -S " + key + " -d " + dev - return not bool(run_cmd(options, cmd)["rc"]) - - # helper function to send the register command --def register_helper(options, host, dev): -+def register_helper(options, dev, key): - reset_dev(options, dev) -- cmd = options["--sg_persist-path"] + " -n -o -I -S " + options["--key"] + " -d " + dev -+ cmd = options["--sg_persist-path"] + " -n -o -I -S " + key + " -d " + dev - cmd += " -Z" if "--aptpl" in options else "" - return not bool(run_cmd(options, cmd)["rc"]) - diff --git a/SOURCES/RHEL-5397-fence_scsi-3-fix-run_cmd.patch b/SOURCES/RHEL-5397-fence_scsi-3-fix-run_cmd.patch deleted file mode 100644 index 0bf0833..0000000 --- a/SOURCES/RHEL-5397-fence_scsi-3-fix-run_cmd.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- fence-agents-4.2.1/agents/scsi/fence_scsi.py.old 2024-01-02 12:22:30.198853290 +0100 -+++ fence-agents-4.2.1/agents/scsi/fence_scsi.py 2024-01-02 12:24:35.509549785 +0100 -@@ -84,14 +84,14 @@ - # check if host is ready to execute actions - def do_action_monitor(options): - # Check if required binaries are installed -- if bool(run_cmd(options, options["--sg_persist-path"] + " -V")["err"]): -+ if bool(run_cmd(options, options["--sg_persist-path"] + " -V")["rc"]): - logging.error("Unable to run " + options["--sg_persist-path"]) - return 1 -- elif bool(run_cmd(options, options["--sg_turs-path"] + " -V")["err"]): -+ elif bool(run_cmd(options, options["--sg_turs-path"] + " -V")["rc"]): - logging.error("Unable to run " + options["--sg_turs-path"]) - return 1 - elif ("--devices" not in options and -- bool(run_cmd(options, options["--vgs-path"] + " --version")["err"])): -+ bool(run_cmd(options, options["--vgs-path"] + " --version")["rc"])): - logging.error("Unable to run " + options["--vgs-path"]) - return 1 - -@@ -102,11 +102,13 @@ - return 0 - - --#run command, returns dict, ret["err"] = exit code; ret["out"] = output -+# run command, returns dict, ret["rc"] = exit code; ret["out"] = output; -+# ret["err"] = error - def run_cmd(options, cmd): - ret = {} -- (ret["err"], ret["out"], _) = run_command(options, cmd) -+ (ret["rc"], ret["out"], ret["err"]) = run_command(options, cmd) - ret["out"] = "".join([i for i in ret["out"] if i is not None]) -+ ret["err"] = "".join([i for i in ret["err"] if i is not None]) - return ret - - -@@ -122,11 +124,11 @@ - def preempt_abort(options, host, dev): - reset_dev(options,dev) - cmd = options["--sg_persist-path"] + " -n -o -A -T 5 -K " + host + " -S " + options["--key"] + " -d " + dev -- return not bool(run_cmd(options, cmd)["err"]) -+ return not bool(run_cmd(options, cmd)["rc"]) - - - def reset_dev(options, dev): -- return run_cmd(options, options["--sg_turs-path"] + " " + dev)["err"] -+ return run_cmd(options, options["--sg_turs-path"] + " " + dev)["rc"] - - - def register_dev(options, dev, key): -@@ -171,13 +173,13 @@ - reset_dev(options, dev) - cmd = options["--sg_persist-path"] + " -n -o -I -S " + key + " -d " + dev - cmd += " -Z" if "--aptpl" in options else "" -- return not bool(run_cmd(options, cmd)["err"]) -+ return not bool(run_cmd(options, cmd)["rc"]) - - - def reserve_dev(options, dev): - reset_dev(options,dev) - cmd = options["--sg_persist-path"] + " -n -o -R -T 5 -K " + options["--key"] + " -d " + dev -- return not bool(run_cmd(options, cmd)["err"]) -+ return not bool(run_cmd(options, cmd)["rc"]) - - - def get_reservation_key(options, dev, fail=True): -@@ -187,7 +189,7 @@ - opts = "-y " - cmd = options["--sg_persist-path"] + " -n -i " + opts + "-r -d " + dev - out = run_cmd(options, cmd) -- if out["err"] and fail: -+ if out["rc"] 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 -@@ -201,7 +203,7 @@ - opts = "-y " - cmd = options["--sg_persist-path"] + " -n -i " + opts + "-k -d " + dev - out = run_cmd(options, cmd) -- if out["err"]: -+ if out["rc"]: - fail_usage("Cannot get registration keys", fail) - if not fail: - return [] -@@ -319,7 +321,7 @@ - "--options vg_attr,pv_name "+\ - "--config 'global { locking_type = 0 } devices { preferred_names = [ \"^/dev/dm\" ] }'" - out = run_cmd(options, cmd) -- if out["err"]: -+ if out["rc"]: - fail_usage("Failed: Cannot get shared devices") - for line in out["out"].splitlines(): - vg_attr, pv_name = line.strip().split(":") diff --git a/SOURCES/RHEL-56840-fence_scsi-only-preempt-once-for-mpath-devices.patch b/SOURCES/RHEL-56840-fence_scsi-only-preempt-once-for-mpath-devices.patch deleted file mode 100644 index 78b7854..0000000 --- a/SOURCES/RHEL-56840-fence_scsi-only-preempt-once-for-mpath-devices.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cb57f1c2ee734a40d01249305965ea4ecdf02039 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 5 Sep 2024 09:06:34 +0200 -Subject: [PATCH] fence_scsi: preempt clears all devices on the mpath device, - so only run it for the first device - ---- - agents/scsi/fence_scsi.py | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index a1598411c..12f7fb49b 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -131,11 +131,13 @@ def reset_dev(options, dev): - return run_cmd(options, options["--sg_turs-path"] + " " + dev)["rc"] - - --def register_dev(options, dev, key): -+def register_dev(options, dev, key, do_preempt=True): - dev = os.path.realpath(dev) - if re.search(r"^dm", dev[5:]): -- for slave in get_mpath_slaves(dev): -- register_dev(options, slave, key) -+ devices = get_mpath_slaves(dev) -+ register_dev(options, devices[0], key) -+ for device in devices[1:]: -+ register_dev(options, device, key, False) - return True - - # Check if any registration exists for the key already. We track this in -@@ -153,7 +155,7 @@ def register_dev(options, dev, key): - # If key matches, make sure it matches with the connection that - # exists right now. To do this, we can issue a preempt with same key - # which should replace the old invalid entries from the target. -- if not preempt(options, key, dev, key): -+ if do_preempt and not preempt(options, key, dev, key): - return False - - # If there was no reservation, we need to issue another registration diff --git a/SOURCES/RHEL-65025-fence_ibm_powervs-add-private-endpoint-and-token-file-support.patch b/SOURCES/RHEL-65025-fence_ibm_powervs-add-private-endpoint-and-token-file-support.patch deleted file mode 100644 index af3ea5f..0000000 --- a/SOURCES/RHEL-65025-fence_ibm_powervs-add-private-endpoint-and-token-file-support.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- a/agents/ibm_powervs/fence_ibm_powervs.py 2024-10-18 10:30:40.651200620 +0200 -+++ b/agents/ibm_powervs/fence_ibm_powervs.py 2024-10-18 10:30:35.157070713 +0200 -@@ -1,13 +1,14 @@ - #!@PYTHON@ -tt - - import sys --import pycurl, io, json -+import pycurl -+import io -+import json - import logging - import atexit --import time -+ - sys.path.append("@FENCEAGENTSLIBDIR@") --from fencing import * --from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS -+from fencing import all_opt, atexit_handler, check_input, process_input, show_docs, fence_action, fail, run_delay, EC_STATUS - - state = { - "ACTIVE": "on", -@@ -18,15 +19,35 @@ - } - - def get_token(conn, options): -- try: -- command = "identity/token" -- action = "grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey={}".format(options["--token"]) -- res = send_command(conn, command, "POST", action, printResult=False) -- except Exception as e: -- logging.debug("Failed: {}".format(e)) -- return "TOKEN_IS_MISSING_OR_WRONG" -- -- return res["access_token"] -+ try: -+ if options["--token"][0] == '@': -+ key_file = options["--token"][1:] -+ try: -+ # read the API key from a file -+ with open(key_file, "r") as f: -+ try: -+ keys = json.loads(f.read()) -+ # data seems to be in json format -+ # return the value of the item with the key 'Apikey' -+ api_key = keys.get("Apikey", "") -+ if not api_key: -+ # backward compatibility: former key name was 'apikey' -+ api_key = keys.get("apikey", "") -+ # data is text, return as is -+ except ValueError: -+ api_key = f.read().strip() -+ except FileNotFoundError: -+ logging.debug("Failed: Cannot open file {}".format(key_file)) -+ return "TOKEN_IS_MISSING_OR_WRONG" -+ else: -+ api_key = options["--token"] -+ command = "identity/token" -+ action = "grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey={}".format(api_key) -+ res = send_command(conn, command, "POST", action, printResult=False) -+ except Exception as e: -+ logging.debug("Failed: {}".format(e)) -+ return "TOKEN_IS_MISSING_OR_WRONG" -+ return res["access_token"] - - def get_list(conn, options): - outlets = {} -@@ -41,7 +62,7 @@ - for r in res["pvmInstances"]: - if options["--verbose-level"] > 1: - logging.debug(json.dumps(r, indent=2)) -- outlets[r["pvmInstanceID"]] = (r["serverName"], state[r["status"]]) -+ outlets[r["pvmInstanceID"]] = (r["serverName"], state.get(r["status"], "unknown")) - - return outlets - -@@ -97,7 +118,7 @@ - else: - logging.debug("Failed: Unable to cycle with {} for {}".format(options["--action"], e)) - fail(EC_STATUS) -- return True -+ return True - - def connect(opt, token): - conn = pycurl.Curl() -@@ -130,7 +151,10 @@ - conn = pycurl.Curl() - - # setup correct URL -- conn.base_url = "https://iam.cloud.ibm.com/" -+ if opt["--api-type"] == "private": -+ conn.base_url = "https://private.iam.cloud.ibm.com/" -+ else: -+ conn.base_url = "https://iam.cloud.ibm.com/" - - if opt["--verbose-level"] > 1: - conn.setopt(pycurl.VERBOSE, 1) -@@ -265,9 +289,9 @@ - define_new_opts() - - all_opt["shell_timeout"]["default"] = "500" -- all_opt["power_timeout"]["default"] = "30" -- all_opt["power_wait"]["default"] = "1" -- all_opt["stonith_status_sleep"]["default"] = "2" -+ all_opt["power_timeout"]["default"] = "120" -+ all_opt["power_wait"]["default"] = "15" -+ all_opt["stonith_status_sleep"]["default"] = "10" - all_opt["api-type"]["default"] = "private" - all_opt["proxy"]["default"] = "" - -@@ -275,8 +299,8 @@ - - docs = {} - docs["shortdesc"] = "Fence agent for IBM PowerVS" -- docs["longdesc"] = """fence_ibm_powervs is a Power Fencing agent which can be \ --used with IBM PowerVS to fence virtual machines.""" -+ docs["longdesc"] = """fence_ibm_powervs is a power fencing agent for \ -+IBM Power Virtual Server (IBM PowerVS) to fence virtual server instances.""" - docs["vendorurl"] = "https://www.ibm.com" - show_docs(options, docs) - diff --git a/SOURCES/RHEL-76492-fence_azure_arm-use-azure-identity.patch b/SOURCES/RHEL-76495-fence_azure_arm-use-azure-identity.patch similarity index 62% rename from SOURCES/RHEL-76492-fence_azure_arm-use-azure-identity.patch rename to SOURCES/RHEL-76495-fence_azure_arm-use-azure-identity.patch index ac6a680..b4926b5 100644 --- a/SOURCES/RHEL-76492-fence_azure_arm-use-azure-identity.patch +++ b/SOURCES/RHEL-76495-fence_azure_arm-use-azure-identity.patch @@ -1,25 +1,17 @@ ---- a/lib/azure_fence.py.py 2025-01-30 14:47:16.047999700 +0100 -+++ b/lib/azure_fence.py.py 2025-01-30 12:06:10.847889534 +0100 -@@ -14,6 +14,9 @@ +--- a/lib/azure_fence.py.py 2024-11-20 11:39:38.000000000 +0100 ++++ b/lib/azure_fence.py.py 2025-01-31 13:17:28.131375401 +0100 +@@ -14,8 +14,9 @@ IP_TYPE_DYNAMIC = "Dynamic" MAX_RETRY = 10 RETRY_WAIT = 5 -+NETWORK_MGMT_CLIENT_API_VERSION = "2021-05-01" +-COMPUTE_CLIENT_API_VERSION = "2021-11-01" + NETWORK_MGMT_CLIENT_API_VERSION = "2021-05-01" +AZURE_RHEL8_COMPUTE_VERSION = "27.2.0" +AZURE_COMPUTE_VERSION_5 = "5.0.0" class AzureSubResource: Type = None -@@ -49,7 +52,7 @@ - return None - - def get_azure_resource(id): -- match = re.match('(/subscriptions/([^/]*)/resourceGroups/([^/]*))(/providers/([^/]*/[^/]*)/([^/]*))?((/([^/]*)/([^/]*))*)', id) -+ match = re.match(r'(/subscriptions/([^/]*)/resourceGroups/([^/]*))(/providers/([^/]*/[^/]*)/([^/]*))?((/([^/]*)/([^/]*))*)', id) - if not match: - fail_usage("{get_azure_resource} cannot parse resource id %s" % id) - -@@ -86,6 +89,59 @@ +@@ -88,6 +89,59 @@ return resource @@ -79,7 +71,7 @@ def get_fence_subnet_for_config(ipConfig, network_client): subnetResource = get_azure_resource(ipConfig.subnet.id) logging.debug("{get_fence_subnet_for_config} testing virtual network %s in resource group %s for a fence subnet" %(subnetResource.ResourceName, subnetResource.ResourceGroupName)) -@@ -152,7 +208,7 @@ +@@ -154,7 +208,7 @@ result = FENCE_STATE_ON try: @@ -88,7 +80,7 @@ allNICOK = True for nicRef in vm.network_profile.network_interfaces: -@@ -179,7 +235,7 @@ +@@ -181,7 +235,7 @@ import msrestazure.azure_exceptions logging.info("{set_network_state} Setting state %s for %s in resource group %s" % (operation, vmName, rgName)) @@ -97,7 +89,7 @@ operations = [] for nicRef in vm.network_profile.network_interfaces: -@@ -268,10 +324,72 @@ +@@ -270,10 +324,72 @@ return config @@ -172,7 +164,7 @@ from msrestazure.azure_cloud import AZURE_CHINA_CLOUD cloud_environment = AZURE_CHINA_CLOUD elif (config.Cloud.lower() == "germany"): -@@ -284,31 +402,43 @@ +@@ -286,61 +402,44 @@ from msrestazure.azure_cloud import get_cloud_from_metadata_endpoint cloud_environment = get_cloud_from_metadata_endpoint(config.MetadataEndpoint) @@ -189,20 +181,57 @@ credentials = None cloud_environment = get_azure_cloud_environment(config) - if config.UseMSI and cloud_environment: -- from msrestazure.azure_active_directory import MSIAuthentication -- credentials = MSIAuthentication(cloud_environment=cloud_environment) -- elif config.UseMSI: -- from msrestazure.azure_active_directory import MSIAuthentication -- credentials = MSIAuthentication() -- elif cloud_environment: -- from azure.common.credentials import ServicePrincipalCredentials -- credentials = ServicePrincipalCredentials( + if config.UseMSI: -+ try: -+ from azure.identity import ManagedIdentityCredential + try: + from azure.identity import ManagedIdentityCredential +- credentials = ManagedIdentityCredential(cloud_environment=cloud_environment) + credentials = ManagedIdentityCredential(authority=cloud_environment["authority_hosts"]) -+ except ImportError: -+ from msrestazure.azure_active_directory import MSIAuthentication + except ImportError: + from msrestazure.azure_active_directory import MSIAuthentication +- credentials = MSIAuthentication(cloud_environment=cloud_environment) +- elif config.UseMSI: +- try: +- from azure.identity import ManagedIdentityCredential +- credentials = ManagedIdentityCredential() +- except ImportError: +- from msrestazure.azure_active_directory import MSIAuthentication +- credentials = MSIAuthentication() +- elif cloud_environment: +- try: +- # try to use new libraries ClientSecretCredential (azure.identity, based on azure.core) +- from azure.identity import ClientSecretCredential +- credentials = ClientSecretCredential( +- client_id = config.ApplicationId, +- client_secret = config.ApplicationKey, +- tenant_id = config.Tenantid, +- cloud_environment=cloud_environment +- ) +- except ImportError: +- # use old libraries ServicePrincipalCredentials (azure.common) if new one is not available +- from azure.common.credentials import ServicePrincipalCredentials +- credentials = ServicePrincipalCredentials( +- client_id = config.ApplicationId, +- secret = config.ApplicationKey, +- tenant = config.Tenantid, +- cloud_environment=cloud_environment +- ) +- else: +- try: +- # try to use new libraries ClientSecretCredential (azure.identity, based on azure.core) +- from azure.identity import ClientSecretCredential +- credentials = ClientSecretCredential( +- client_id = config.ApplicationId, +- client_secret = config.ApplicationKey, +- tenant_id = config.Tenantid +- ) +- except ImportError: +- # use old libraries ServicePrincipalCredentials (azure.common) if new one is not available +- from azure.common.credentials import ServicePrincipalCredentials +- credentials = ServicePrincipalCredentials( +- client_id = config.ApplicationId, +- secret = config.ApplicationKey, +- tenant = config.Tenantid +- ) + credentials = MSIAuthentication(cloud_environment=cloud_environment["cloud_environment"]) + return credentials + @@ -210,43 +239,61 @@ + # try to use new libraries ClientSecretCredential (azure.identity, based on azure.core) + from azure.identity import ClientSecretCredential + credentials = ClientSecretCredential( - client_id = config.ApplicationId, -- secret = config.ApplicationKey, -- tenant = config.Tenantid, -- cloud_environment=cloud_environment ++ client_id = config.ApplicationId, + client_secret = config.ApplicationKey, + tenant_id = config.Tenantid, + authority=cloud_environment["authority_hosts"] - ) -- else: ++ ) + except ImportError: + # use old libraries ServicePrincipalCredentials (azure.common) if new one is not available - from azure.common.credentials import ServicePrincipalCredentials - credentials = ServicePrincipalCredentials( - client_id = config.ApplicationId, - secret = config.ApplicationKey, -- tenant = config.Tenantid ++ from azure.common.credentials import ServicePrincipalCredentials ++ credentials = ServicePrincipalCredentials( ++ client_id = config.ApplicationId, ++ secret = config.ApplicationKey, + tenant = config.Tenantid, + cloud_environment=cloud_environment["cloud_environment"] - ) ++ ) return credentials -@@ -317,40 +447,75 @@ - from azure.mgmt.compute import ComputeManagementClient +@@ -350,39 +449,40 @@ cloud_environment = get_azure_cloud_environment(config) -- if cloud_environment and config.Cloud.lower() == "stack" and not config.MetadataEndpoint: -- fail_usage("metadata-endpoint not specified") credentials = get_azure_credentials(config) - if cloud_environment: +- if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: +- fail_usage("metadata-endpoint not specified") + # Try to read the default used api version from the installed package. + try: + compute_api_version = ComputeManagementClient.LATEST_PROFILE.get_profile_dict()["azure.mgmt.compute.ComputeManagementClient"]["virtual_machines"] + except Exception as e: + compute_api_version = ComputeManagementClient.DEFAULT_API_VERSION + logging.debug("{get_azure_compute_client} Failed to get the latest profile: %s using the default api version %s" % (e, compute_api_version)) -+ + +- try: +- from azure.profiles import KnownProfiles +- if (config.Cloud.lower() == "stack"): +- client_profile = KnownProfiles.v2020_09_01_hybrid +- credential_scope = cloud_environment.endpoints.active_directory_resource_id + "/.default" +- else: +- client_profile = KnownProfiles.default +- credential_scope = cloud_environment.endpoints.resource_manager + "/.default" +- compute_client = ComputeManagementClient( +- credentials, +- config.SubscriptionId, +- base_url=cloud_environment.endpoints.resource_manager, +- profile=client_profile, +- credential_scopes=[credential_scope], +- api_version=COMPUTE_CLIENT_API_VERSION +- ) +- except TypeError: +- compute_client = ComputeManagementClient( +- credentials, +- config.SubscriptionId, +- base_url=cloud_environment.endpoints.resource_manager, +- api_version=COMPUTE_CLIENT_API_VERSION +- ) +- else: + logging.debug("{get_azure_compute_client} use virtual_machine api version: %s" %(compute_api_version)) + + if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: @@ -261,75 +308,84 @@ compute_client = ComputeManagementClient( credentials, config.SubscriptionId, -- base_url=cloud_environment.endpoints.resource_manager +- api_version=COMPUTE_CLIENT_API_VERSION + base_url=cloud_environment["resource_manager"], + profile=client_profile, + credential_scopes=cloud_environment["credential_scopes"], + api_version=compute_api_version ) -- else: + except TypeError: - compute_client = ComputeManagementClient( - credentials, -- config.SubscriptionId ++ compute_client = ComputeManagementClient( ++ credentials, + config.SubscriptionId, + base_url=cloud_environment["resource_manager"], + api_version=compute_api_version - ) ++ ) + return compute_client def get_azure_network_client(config): - from azure.mgmt.network import NetworkManagementClient - +@@ -391,37 +491,31 @@ cloud_environment = get_azure_cloud_environment(config) -- if cloud_environment and config.Cloud.lower() == "stack" and not config.MetadataEndpoint: -- fail_usage("metadata-endpoint not specified") credentials = get_azure_credentials(config) - if cloud_environment: +- if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: +- fail_usage("metadata-endpoint not specified") + if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: + fail_usage("metadata-endpoint not specified") -+ + +- try: +- from azure.profiles import KnownProfiles +- if (config.Cloud.lower() == "stack"): +- client_profile = KnownProfiles.v2020_09_01_hybrid +- credential_scope = cloud_environment.endpoints.active_directory_resource_id + "/.default" +- else: +- client_profile = KnownProfiles.default +- credential_scope = cloud_environment.endpoints.resource_manager + "/.default" +- network_client = NetworkManagementClient( +- credentials, +- config.SubscriptionId, +- base_url=cloud_environment.endpoints.resource_manager, +- profile=client_profile, +- credential_scopes=[credential_scope], +- api_version=NETWORK_MGMT_CLIENT_API_VERSION +- ) +- except TypeError: +- network_client = NetworkManagementClient( +- credentials, +- config.SubscriptionId, +- base_url=cloud_environment.endpoints.resource_manager, +- api_version=NETWORK_MGMT_CLIENT_API_VERSION +- ) + + from azure.profiles import KnownProfiles + + if (config.Cloud.lower() == "stack"): + client_profile = KnownProfiles.v2020_09_01_hybrid -+ else: + else: + client_profile = KnownProfiles.default + + try: - network_client = NetworkManagementClient( - credentials, - config.SubscriptionId, -- base_url=cloud_environment.endpoints.resource_manager ++ network_client = NetworkManagementClient( ++ credentials, ++ config.SubscriptionId, + base_url=cloud_environment["resource_manager"], + profile=client_profile, + credential_scopes=cloud_environment["credential_scopes"], + api_version=NETWORK_MGMT_CLIENT_API_VERSION - ) -- else: ++ ) + except TypeError: network_client = NetworkManagementClient( credentials, -- config.SubscriptionId -+ config.SubscriptionId, + config.SubscriptionId, + base_url=cloud_environment["resource_manager"], -+ api_version=NETWORK_MGMT_CLIENT_API_VERSION + api_version=NETWORK_MGMT_CLIENT_API_VERSION ) return network_client ---- a/agents/azure_arm/fence_azure_arm.py 2025-01-30 15:28:35.889163377 +0100 -+++ b/agents/azure_arm/fence_azure_arm.py 2025-01-30 15:28:52.190553135 +0100 -@@ -7,7 +7,6 @@ - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * - from fencing import fail_usage, run_command, run_delay -- - sys.path.insert(0, '/usr/lib/fence-agents/bundled/azure') - import azure_fence - -@@ -17,7 +16,7 @@ +--- a/agents/azure_arm/fence_azure_arm.py 2024-05-29 17:10:31.000000000 +0200 ++++ b/agents/azure_arm/fence_azure_arm.py 2025-01-30 16:20:54.833486146 +0100 +@@ -15,7 +15,7 @@ if clients: compute_client = clients[0] rgName = options["--resourceGroup"] @@ -338,7 +394,7 @@ try: for vm in vms: result[vm.name] = ("", None) -@@ -33,7 +32,7 @@ +@@ -31,7 +31,7 @@ rgName = options["--resourceGroup"] try: @@ -347,35 +403,38 @@ except Exception as e: fail_usage("Failed: %s" % e) -@@ -74,7 +73,7 @@ +@@ -72,7 +72,7 @@ powerState = "unknown" try: -- vmStatus = compute_client.virtual_machines.get(rgName, vmName, "instanceView") +- vmStatus = compute_client.virtual_machines.get(rgName, vmName, expand="instanceView") + vmStatus = azure_fence.get_vm_resource(compute_client, rgName, vmName) except Exception as e: fail_usage("Failed: %s" % e) -@@ -117,11 +116,10 @@ +@@ -115,23 +115,10 @@ if (options["--action"]=="off"): logging.info("Poweroff " + vmName + " in resource group " + rgName) -- compute_client.virtual_machines.power_off(rgName, vmName, skip_shutdown=True) +- try: +- # try new API version first +- compute_client.virtual_machines.begin_power_off(rgName, vmName, skip_shutdown=True) +- except AttributeError: +- # use older API verson if it fails +- logging.debug("Poweroff " + vmName + " did not work via 'virtual_machines.begin_power_off. Trying virtual_machines.power_off'.") +- compute_client.virtual_machines.power_off(rgName, vmName, skip_shutdown=True) + azure_fence.do_vm_power_off(compute_client, rgName, vmName, True) elif (options["--action"]=="on"): logging.info("Starting " + vmName + " in resource group " + rgName) -- compute_client.virtual_machines.start(rgName, vmName) +- try: +- # try new API version first +- compute_client.virtual_machines.begin_start(rgName, vmName) +- except AttributeError: +- # use older API verson if it fails +- logging.debug("Starting " + vmName + " did not work via 'virtual_machines.begin_start. Trying virtual_machines.start'.") +- compute_client.virtual_machines.start(rgName, vmName) - + azure_fence.do_vm_start(compute_client, rgName, vmName) def define_new_opts(): all_opt["resourceGroup"] = { -@@ -241,7 +239,7 @@ - except ImportError: - fail_usage("Azure Resource Manager Python SDK not found or not accessible") - except Exception as e: -- fail_usage("Failed: %s" % re.sub("^, ", "", str(e))) -+ fail_usage("Failed: %s" % re.sub(r"^, ", r"", str(e))) - - if "--network-fencing" in options: - # use off-action to quickly return off once network is fenced instead of diff --git a/SOURCES/RHEL-7734-fence_eps-add-fence_epsr2-for-ePowerSwitch-R2-and-newer.patch b/SOURCES/RHEL-7734-fence_eps-add-fence_epsr2-for-ePowerSwitch-R2-and-newer.patch deleted file mode 100644 index f59b730..0000000 --- a/SOURCES/RHEL-7734-fence_eps-add-fence_epsr2-for-ePowerSwitch-R2-and-newer.patch +++ /dev/null @@ -1,365 +0,0 @@ -From 55451b6fd007e6f9a6d6860e95304b7c5c27cc1b Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 2 May 2024 15:10:16 +0200 -Subject: [PATCH 1/2] fencing: add support for docs["agent_name"] to use the - main agent name when generating manpages - ---- - lib/fencing.py.py | 12 +++++++++--- - tests/data/metadata/fence_eps.xml | 9 ++++++--- - 2 files changed, 15 insertions(+), 6 deletions(-) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 511eb2689..66e2ff156 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -603,7 +603,7 @@ def usage(avail_opt): - if len(value["help"]) != 0: - print(" " + _join_wrap([value["help"]], first_indent=3)) - --def metadata(options, avail_opt, docs): -+def metadata(options, avail_opt, docs, agent_name=os.path.basename(sys.argv[0])): - # avail_opt has to be unique, if there are duplicities then they should be removed - sorted_list = [(key, all_opt[key]) for key in list(set(avail_opt)) if "longopt" in all_opt[key]] - # Find keys that are going to replace inconsistent names -@@ -617,7 +617,7 @@ def metadata(options, avail_opt, docs): - docs["longdesc"] = re.sub(r"\\f[BPIR]|\.P|\.TP|\.br\n", r"", docs["longdesc"]) - - print("") -- print("") - for (symlink, desc) in docs.get("symlink", []): - print("") -@@ -928,9 +928,15 @@ def show_docs(options, docs=None): - sys.exit(0) - - if options.get("--action", "") in ["metadata", "manpage"]: -+ if options["--action"] == "metadata" or "agent_name" not in docs: -+ agent_name=os.path.basename(sys.argv[0]) -+ else: -+ agent_name=docs["agent_name"] -+ -+ - if "port_as_ip" in device_opt: - device_opt.remove("separator") -- metadata(options, device_opt, docs) -+ metadata(options, device_opt, docs, agent_name) - sys.exit(0) - - if "--version" in options: -diff --git a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml -index 3f9ebdc22..a3aeb1aea 100644 ---- a/tests/data/metadata/fence_eps.xml -+++ b/tests/data/metadata/fence_eps.xml -@@ -1,9 +1,12 @@ - - --fence_eps is a Power Fencing agent which can be used with the ePowerSwitch 8M+ power switch to fence connected machines. Fence agent works ONLY on 8M+ device, because this is only one, which has support for hidden page feature. -+ -+fence_eps is a Power Fencing agent which can be used with the ePowerSwitch 8M+ power switch to fence connected machines. It ONLY works on 8M+ devices, as they support the hidden page feature. - --Agent basically works by connecting to hidden page and pass appropriate arguments to GET request. This means, that hidden page feature must be enabled and properly configured. --http://www.epowerswitch.com -+The agent works by connecting to the hidden page and pass the appropriate arguments to GET request. This means, that the hidden page feature must be enabled and properly configured. -+ -+NOTE: In most cases you want to use fence_epsr2, as fence_eps only works with older hardware. -+https://www.neol.com - - - - -From 639f5293e0b2c0153ea01bf37534b74f436dd630 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 13 Feb 2024 11:11:25 +0100 -Subject: [PATCH 2/2] fence_eps: add fence_epsr2 for ePowerSwitch R2 and newer - ---- - agents/eps/fence_eps.py | 46 ++++--- - fence-agents.spec.in | 4 +- - tests/data/metadata/fence_epsr2.xml | 178 ++++++++++++++++++++++++++++ - 3 files changed, 211 insertions(+), 17 deletions(-) - create mode 100644 tests/data/metadata/fence_epsr2.xml - -diff --git a/agents/eps/fence_eps.py b/agents/eps/fence_eps.py -index 81e439533..1e6bda099 100644 ---- a/agents/eps/fence_eps.py -+++ b/agents/eps/fence_eps.py -@@ -3,8 +3,8 @@ - # The Following Agent Has Been Tested On: - # ePowerSwitch 8M+ version 1.0.0.4 - --import sys, re --import base64, string, socket -+import sys, os, re -+import base64, socket - import logging - import atexit - sys.path.append("@FENCEAGENTSLIBDIR@") -@@ -37,7 +37,7 @@ def eps_run_command(options, params): - options["--password"] = "" # Default is empty password - - # String for Authorization header -- auth_str = 'Basic ' + string.strip(base64.encodestring(options["--username"]+':'+options["--password"])) -+ auth_str = 'Basic ' + str(base64.encodebytes(bytes(options["--username"]+':'+options["--password"], "utf-8")).decode("utf-8").strip()) - logging.debug("Authorization: %s\n", auth_str) - conn.putheader('Authorization', auth_str) - -@@ -60,16 +60,22 @@ def eps_run_command(options, params): - logging.error("Failed: {}".format(str(e))) - fail(EC_LOGIN_DENIED) - -- return result -+ return result.decode("utf-8", "ignore") - - def get_power_status(conn, options): - del conn - ret_val = eps_run_command(options, "") - - result = {} -- status = re.findall(r"p(\d{2})=(0|1)\s*\", ret_val.lower()) -+ if os.path.basename(sys.argv[0]) == "fence_eps": -+ status = re.findall(r"p(\d{2})=(0|1)\s*\", ret_val.lower()) -+ elif os.path.basename(sys.argv[0]) == "fence_epsr2": -+ status = re.findall(r"m0:o(\d)=(on|off)\s*", ret_val.lower()) - for out_num, out_stat in status: -- result[out_num] = ("", (out_stat == "1" and "on" or "off")) -+ if os.path.basename(sys.argv[0]) == "fence_eps": -+ result[out_num] = ("", (out_stat == "1" and "on" or "off")) -+ elif os.path.basename(sys.argv[0]) == "fence_epsr2": -+ result[out_num] = ("", out_stat) - - if not options["--action"] in ['monitor', 'list']: - if not options["--plug"] in result: -@@ -81,7 +87,12 @@ def get_power_status(conn, options): - - def set_power_status(conn, options): - del conn -- eps_run_command(options, "P%s=%s"%(options["--plug"], (options["--action"] == "on" and "1" or "0"))) -+ if os.path.basename(sys.argv[0]) == "fence_eps": -+ eps_run_command(options, "P%s=%s"%(options["--plug"], (options["--action"] == "on" and "1" or "0"))) -+ elif os.path.basename(sys.argv[0]) == "fence_epsr2": -+ if options["--action"] == "reboot": -+ options["--action"] = "off" -+ eps_run_command(options, "M0:O%s=%s"%(options["--plug"], options["--action"])) - - # Define new option - def eps_define_new_opts(): -@@ -107,20 +118,25 @@ def main(): - options = check_input(device_opt, process_input(device_opt)) - - docs = {} -+ docs["agent_name"] = "fence_eps" - docs["shortdesc"] = "Fence agent for ePowerSwitch" -- docs["longdesc"] = "fence_eps is a Power Fencing agent \ -+ docs["longdesc"] = os.path.basename(sys.argv[0]) + " is a Power Fencing agent \ - which can be used with the ePowerSwitch 8M+ power switch to fence \ --connected machines. Fence agent works ONLY on 8M+ device, because \ --this is only one, which has support for hidden page feature. \ -+connected machines. It ONLY works on 8M+ devices, as \ -+they support the hidden page feature. \ - \n.TP\n\ --Agent basically works by connecting to hidden page and pass \ --appropriate arguments to GET request. This means, that hidden \ --page feature must be enabled and properly configured." -- docs["vendorurl"] = "http://www.epowerswitch.com" -+The agent works by connecting to the hidden page and pass \ -+the appropriate arguments to GET request. This means, that the hidden \ -+page feature must be enabled and properly configured. \ -+\n.TP\n\ -+NOTE: In most cases you want to use fence_epsr2, as fence_eps \ -+only works with older hardware." -+ docs["vendorurl"] = "https://www.neol.com" -+ docs["symlink"] = [("fence_epsr2", "Fence agent for ePowerSwitch R2 and newer")] - show_docs(options, docs) - - run_delay(options) -- #Run fence action. Conn is None, beacause we always need open new http connection -+ #Run fence action. Conn is None, because we always need open new http connection - result = fence_action(None, options, set_power_status, get_power_status, get_power_status) - - sys.exit(result) -diff --git a/tests/data/metadata/fence_epsr2.xml b/tests/data/metadata/fence_epsr2.xml -new file mode 100644 -index 000000000..37074e052 ---- /dev/null -+++ b/tests/data/metadata/fence_epsr2.xml -@@ -0,0 +1,178 @@ -+ -+ -+ -+fence_epsr2 is a Power Fencing agent which can be used with the ePowerSwitch 8M+ power switch to fence connected machines. It ONLY works on 8M+ devices, as they support the hidden page feature. -+ -+The agent works by connecting to the hidden page and pass the appropriate arguments to GET request. This means, that the hidden page feature must be enabled and properly configured. -+ -+NOTE: In most cases you want to use fence_epsr2, as fence_eps only works with older hardware. -+https://www.neol.com -+ -+ -+ -+ -+ Fencing action -+ -+ -+ -+ -+ Name of hidden page -+ -+ -+ -+ -+ IP address or hostname of fencing device -+ -+ -+ -+ -+ IP address or hostname of fencing device -+ -+ -+ -+ -+ TCP/UDP port to use for connection with device -+ -+ -+ -+ -+ Login name -+ -+ -+ -+ -+ Name of hidden page -+ -+ -+ -+ -+ Login password or passphrase -+ -+ -+ -+ -+ Script to run to retrieve password -+ -+ -+ -+ -+ Login password or passphrase -+ -+ -+ -+ -+ Script to run to retrieve password -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Login name -+ -+ -+ -+ -+ Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog. -+ -+ -+ -+ -+ 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). -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Display version information and exit -+ -+ -+ -+ -+ Display help and exit -+ -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ -+ -+ -+ -+ Separator for CSV created by 'list' operation -+ -+ -+ -+ -+ Wait X seconds before fencing is started -+ -+ -+ -+ -+ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after login -+ -+ -+ -+ -+ Test X seconds for status change after ON/OFF -+ -+ -+ -+ -+ Wait X seconds after issuing ON/OFF -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after issuing command -+ -+ -+ -+ -+ Sleep X seconds between status calls during a STONITH action -+ -+ -+ -+ -+ Count of attempts to retry power on -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ diff --git a/SOURCES/RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch b/SOURCES/RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch new file mode 100644 index 0000000..eb8568f --- /dev/null +++ b/SOURCES/RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch @@ -0,0 +1,38 @@ +From 293b3961149f680ead9028e6719c405957abc6b7 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 13 Mar 2025 16:40:30 +0100 +Subject: [PATCH] fence_ibm_vpc: refresh bearer-token in connect() if token + data is corrupt, and avoid edge-case of writing empty token file + +--- + agents/ibm_vpc/fence_ibm_vpc.py | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py +index 035a3235a..efda5eed7 100755 +--- a/agents/ibm_vpc/fence_ibm_vpc.py ++++ b/agents/ibm_vpc/fence_ibm_vpc.py +@@ -105,6 +105,8 @@ def get_bearer_token(conn, options): + except Exception as e: + logging.error("Failed: Unable to authenticate: {}".format(e)) + fail(EC_LOGIN_DENIED) ++ if len(token) < 1: ++ fail(EC_LOGIN_DENIED) + file_obj.write(token) + finally: + os.umask(oldumask) +@@ -152,6 +154,14 @@ def connect(opt): + # set auth token for later requests + conn = set_bearer_token(conn, bearer_token) + ++ try: ++ command = "instances?version=2021-05-25&generation=2&limit=1" ++ res = send_command(conn, opt, command) ++ except Exception as e: ++ logging.warning("Failed to login/connect. Updating bearer-token.") ++ bearer_token = get_bearer_token(conn, opt) ++ conn = set_bearer_token(conn, bearer_token) ++ + return conn + + def disconnect(conn): diff --git a/SOURCES/build-pythonpath.patch b/SOURCES/build-pythonpath.patch new file mode 100644 index 0000000..72af625 --- /dev/null +++ b/SOURCES/build-pythonpath.patch @@ -0,0 +1,113 @@ +diff --color -uNr a/agents/Makefile.am b/agents/Makefile.am +--- a/agents/Makefile.am 2021-07-08 13:09:05.000000000 +0200 ++++ b/agents/Makefile.am 2024-03-14 12:26:11.186502759 +0100 +@@ -112,10 +112,10 @@ + cisco_mds/fence_cisco_mds.delay-check: cisco_mds/fence_cisco_mds + $(eval INPUT=$(subst .delay-check,,$@)) + FENCE_TEST_ARGS_CISCO_MDS=$$(printf '$(FENCE_TEST_ARGS)' | sed 's#port=1#port=fc1/1#'); \ +- test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ ++ test `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ + sh -c "printf 'delay=10\n $$FENCE_TEST_ARGS_CISCO_MDS' | $(PYTHON) ./$(INPUT)" 2>&1 |\ + awk -F"[. ]" -vOFS= '/real/ {print $$2,$$3}'` -ge 1000 || ( \ +- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ ++ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ + sh -c "printf "delay=0\n $$FENCE_TEST_ARGS_CISCO_MDS" | $(PYTHON) ./$(INPUT)"; false ) + + include $(top_srcdir)/make/fencebuild.mk +diff --color -uNr a/make/agentpycheck.mk b/make/agentpycheck.mk +--- a/make/agentpycheck.mk 2023-10-09 09:53:21.000000000 +0200 ++++ b/make/agentpycheck.mk 2024-03-14 11:52:48.045134164 +0100 +@@ -10,38 +10,38 @@ + + %.xml-check: %.8 + $(eval INPUT=$(subst .xml-check,,$(@F))) +- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ ++ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ + TEMPFILE=$$(mktemp); \ +- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $$TEMPFILE && \ ++ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $$TEMPFILE && \ + diff $$TEMPFILE $(DATADIR)/$$x.xml || exit 1 && \ + rm $$TEMPFILE; \ + done + + %.xml-upload: %.8 + $(eval INPUT=$(subst .xml-upload,,$(@F))) +- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ +- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $(DATADIR)/$$x.xml; \ ++ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ ++ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | $(AWK) $(AWK_VAL) > $(DATADIR)/$$x.xml; \ + done + + # If test will fail, rerun fence agents to show problems + %.delay-check: % + $(eval INPUT=$(subst .delay-check,,$(@F))) +- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ +- test `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ ++ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ ++ test `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ + sh -c "printf 'delay=10\n $(FENCE_TEST_ARGS)' | $(PYTHON) $(@D)/$$x" 2>&1 |\ + awk -F"[. ]" -vOFS= '/real/ {print $$2,$$3}'` -ge 1000 || ( \ +- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ ++ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib /usr/bin/time -p \ + sh -c "printf 'delay=0\n $(FENCE_TEST_ARGS)' | $(PYTHON) $(@D)/$$x"; false ); \ + done + + %.rng-check: % + $(eval INPUT=$(subst .rng-check,,$(@F))) +- for x in $(INPUT) `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ +- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | \ ++ for x in $(INPUT) `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$(INPUT) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ ++ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@D)/$$x -o metadata | \ + xsltproc ${abs_top_srcdir}/lib/fence2rng.xsl - | \ + sed -e 's/ rha:description=/ description=/g' -e 's/ rha:name=/ name=/g' | \ + xmllint --nsclean --noout -; \ + done + + test-fencing: +- PYTHONPATH=$(abs_top_builddir)/lib $(PYTHON) $(abs_top_srcdir)/lib/tests/test_fencing.py ++ PYTHONPATH=$(PYTHONPATH):$(abs_top_builddir)/lib $(PYTHON) $(abs_top_srcdir)/lib/tests/test_fencing.py +diff --color -uNr a/make/fencebuild.mk b/make/fencebuild.mk +--- a/make/fencebuild.mk 2022-10-24 11:02:10.000000000 +0200 ++++ b/make/fencebuild.mk 2024-03-14 11:33:24.688964424 +0100 +@@ -35,10 +35,10 @@ + > $@ + + if [ 0 -eq `echo "$(@)" | grep fence_ > /dev/null 2>&1; echo $$?` ]; then \ +- PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(top_srcdir)/lib/check_used_options.py $@; \ ++ PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(top_srcdir)/lib/check_used_options.py $@; \ + else true ; fi + +- for x in `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ ++ for x in `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(@) -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ + cp -f $(@) $(@D)/$$x; \ + $(MAKE) $(@D)/$$x.8; \ + done +@@ -65,7 +65,7 @@ + fi + for p in $(TARGET); do \ + dir=`dirname $$p`; \ +- for x in `PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ ++ for x in `PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \ + echo " $(INSTALL_SCRIPT) $$dir/$$x '$(DESTDIR)$(sbindir)'"; \ + $(INSTALL_SCRIPT) $$dir/$$x "$(DESTDIR)$(sbindir)" || exit $$?; \ + echo " $(INSTALL_DATA) '$$dir/$$x.8' '$(DESTDIR)$(man8dir)'"; \ +@@ -75,7 +75,7 @@ + + uninstall-hook: $(TARGET) + files=`for p in $(TARGET); do \ +- for x in \`PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"\`; do \ ++ for x in \`PYTHONPATH=$(PYTHONPATH):$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"\`; do \ + echo " rm -f '$(DESTDIR)$(sbindir)/$$x'"; \ + rm -f "$(DESTDIR)$(sbindir)/$$x"; \ + echo " rm -f '$(DESTDIR)$(man8dir)/$$x.8'"; \ +diff --color -uNr a/make/fenceman.mk b/make/fenceman.mk +--- a/make/fenceman.mk 2021-07-08 13:09:05.000000000 +0200 ++++ b/make/fenceman.mk 2024-03-14 11:32:55.075320897 +0100 +@@ -1,6 +1,6 @@ + %.8: % $(top_srcdir)/lib/fence2man.xsl + set -e && \ +- PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/../lib:$(abs_builddir)/lib \ ++ PYTHONPATH=$(PYTHONPATH):$(abs_srcdir)/lib:$(abs_builddir)/../lib:$(abs_builddir)/lib \ + $(PYTHON) $* -o manpage > $(@D)/.$(@F).tmp && \ + xmllint --noout --relaxng $(top_srcdir)/lib/metadata.rng $(@D)/.$(@F).tmp && \ + xsltproc $(top_srcdir)/lib/fence2man.xsl $(@D)/.$(@F).tmp > $@ diff --git a/SOURCES/bundled-kubevirt.patch b/SOURCES/bundled-kubevirt.patch new file mode 100644 index 0000000..339bda5 --- /dev/null +++ b/SOURCES/bundled-kubevirt.patch @@ -0,0 +1,12 @@ +diff --color -uNr a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_kubevirt.py +--- a/agents/kubevirt/fence_kubevirt.py 2022-01-17 12:18:10.000000000 +0100 ++++ b/agents/kubevirt/fence_kubevirt.py 2024-03-14 10:10:00.334272185 +0100 +@@ -8,6 +8,8 @@ + from fencing import fail, fail_usage, run_delay, EC_STATUS, EC_FETCH_VM_UUID + + try: ++ sys.path.insert(0, '/usr/lib/fence-agents/support/kubevirt/lib64/python#PYTHON3_VERSION#/site-packages') ++ sys.path.insert(1, '/usr/lib/fence-agents/support/kubevirt/lib/python#PYTHON3_VERSION#/site-packages') + from kubernetes.client.exceptions import ApiException + except ImportError: + logging.error("Couldn\'t import kubernetes.client.exceptions.ApiException - not found or not accessible") diff --git a/SOURCES/bundled-pycurl.patch b/SOURCES/bundled-pycurl.patch new file mode 100644 index 0000000..3ab7ba2 --- /dev/null +++ b/SOURCES/bundled-pycurl.patch @@ -0,0 +1,110 @@ +diff --color -uNr a/agents/cisco_ucs/fence_cisco_ucs.py b/agents/cisco_ucs/fence_cisco_ucs.py +--- a/agents/cisco_ucs/fence_cisco_ucs.py 2024-05-29 17:10:31.000000000 +0200 ++++ b/agents/cisco_ucs/fence_cisco_ucs.py 2024-11-25 12:24:29.897194522 +0100 +@@ -1,6 +1,8 @@ + #!@PYTHON@ -tt + + import sys, re ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl, io + import logging + import atexit +diff --color -uNr a/agents/docker/fence_docker.py b/agents/docker/fence_docker.py +--- a/agents/docker/fence_docker.py 2024-11-20 11:39:38.000000000 +0100 ++++ b/agents/docker/fence_docker.py 2024-11-25 12:24:42.345486546 +0100 +@@ -4,6 +4,8 @@ + import sys + import io + import logging ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl + import json + +diff --color -uNr a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py +--- a/agents/ibm_powervs/fence_ibm_powervs.py 2024-11-20 11:39:38.000000000 +0100 ++++ b/agents/ibm_powervs/fence_ibm_powervs.py 2024-11-25 12:24:43.929523706 +0100 +@@ -1,6 +1,8 @@ + #!@PYTHON@ -tt + + import sys ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl + import io + import json +diff --color -uNr a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py +--- a/agents/ibm_vpc/fence_ibm_vpc.py 2024-05-29 17:10:31.000000000 +0200 ++++ b/agents/ibm_vpc/fence_ibm_vpc.py 2024-11-25 12:24:48.318626670 +0100 +@@ -1,6 +1,8 @@ + #!@PYTHON@ -tt + + import sys ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl, io, json + import logging + import atexit +diff --color -uNr a/agents/pve/fence_pve.py b/agents/pve/fence_pve.py +--- a/agents/pve/fence_pve.py 2024-05-29 17:10:31.000000000 +0200 ++++ b/agents/pve/fence_pve.py 2024-11-25 12:24:52.395722312 +0100 +@@ -6,6 +6,8 @@ + + import sys + import json ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl + import io + import atexit +diff --color -uNr a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py +--- a/agents/rhevm/fence_rhevm.py 2024-05-29 17:10:31.000000000 +0200 ++++ b/agents/rhevm/fence_rhevm.py 2024-11-25 12:24:56.342814908 +0100 +@@ -1,6 +1,8 @@ + #!@PYTHON@ -tt + + import sys, re ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl, io + import logging + import atexit +diff --color -uNr a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py +--- a/agents/vmware_rest/fence_vmware_rest.py 2024-05-29 17:10:31.000000000 +0200 ++++ b/agents/vmware_rest/fence_vmware_rest.py 2024-11-25 12:25:02.753965308 +0100 +@@ -1,6 +1,8 @@ + #!@PYTHON@ -tt + + import sys ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl, io, json + import logging + import atexit +diff --color -uNr a/agents/vmware_vcloud/fence_vmware_vcloud.py b/agents/vmware_vcloud/fence_vmware_vcloud.py +--- a/agents/vmware_vcloud/fence_vmware_vcloud.py 2024-05-29 17:10:31.000000000 +0200 ++++ b/agents/vmware_vcloud/fence_vmware_vcloud.py 2024-11-25 12:25:06.316048871 +0100 +@@ -1,6 +1,8 @@ + #!@PYTHON@ -tt + + import sys ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import pycurl, io + import logging + import atexit +diff --color -uNr a/lib/fencing.py.py b/lib/fencing.py.py +--- a/lib/fencing.py.py 2024-11-20 11:39:38.000000000 +0100 ++++ b/lib/fencing.py.py 2024-11-25 12:24:23.323040301 +0100 +@@ -1,6 +1,9 @@ + #!@PYTHON@ -tt + +-import sys, getopt, time, os, uuid, pycurl, stat ++import sys, getopt, time, os, uuid, stat ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib64/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') ++import pycurl + import pexpect, re, syslog + import logging + import subprocess diff --git a/SOURCES/bundled-suds.patch b/SOURCES/bundled-suds.patch new file mode 100644 index 0000000..ff28d2e --- /dev/null +++ b/SOURCES/bundled-suds.patch @@ -0,0 +1,10 @@ +--- a/agents/vmware_soap/fence_vmware_soap.py 2021-08-24 15:38:05.145039598 +0200 ++++ b/agents/vmware_soap/fence_vmware_soap.py 2021-08-24 15:37:51.885003751 +0200 +@@ -1,6 +1,7 @@ + #!@PYTHON@ -tt + + import sys ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') + import shutil, tempfile, suds + import logging, requests + import atexit, signal diff --git a/SOURCES/bz1470813-fencing-1-disable-timeout.patch b/SOURCES/bz1470813-fencing-1-disable-timeout.patch deleted file mode 100644 index 28dc70f..0000000 --- a/SOURCES/bz1470813-fencing-1-disable-timeout.patch +++ /dev/null @@ -1,1233 +0,0 @@ -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 deleted file mode 100644 index bf736a0..0000000 --- a/SOURCES/bz1470813-fencing-2-fix-power-timeout.patch +++ /dev/null @@ -1,40 +0,0 @@ -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 deleted file mode 100644 index 9445561..0000000 --- a/SOURCES/bz1470813-fencing-3-make-timeout-0-mean-forever.patch +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index 1bd250f..0000000 --- a/SOURCES/bz1470813-fencing-4-make-timeout-0-mean-forever.patch +++ /dev/null @@ -1,22 +0,0 @@ -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/bz1470827-all-agents-log-exceptions-fail.patch b/SOURCES/bz1470827-all-agents-log-exceptions-fail.patch deleted file mode 100644 index 34818be..0000000 --- a/SOURCES/bz1470827-all-agents-log-exceptions-fail.patch +++ /dev/null @@ -1,198 +0,0 @@ -From bf32059e26f6a7d019df0f7949ce66adf997bc21 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 8 Feb 2019 14:16:31 +0100 -Subject: [PATCH] log exceptions to be more detailed when failing - ---- - agents/apc/fence_apc.py | 6 ++++-- - agents/cisco_ucs/fence_cisco_ucs.py | 3 ++- - agents/eps/fence_eps.py | 3 ++- - agents/ilo_moonshot/fence_ilo_moonshot.py | 3 ++- - agents/lpar/fence_lpar.py | 6 ++++-- - agents/ovh/fence_ovh.py | 3 ++- - agents/sanbox2/fence_sanbox2.py | 12 ++++++++---- - agents/vmware_soap/fence_vmware_soap.py | 9 ++++++--- - 8 files changed, 30 insertions(+), 15 deletions(-) - -diff --git a/agents/apc/fence_apc.py b/agents/apc/fence_apc.py -index 24a5a4232..dd0287f83 100644 ---- a/agents/apc/fence_apc.py -+++ b/agents/apc/fence_apc.py -@@ -90,7 +90,8 @@ def get_power_status(conn, options): - try: - (_, status) = outlets[options["--plug"]] - return status.lower().strip() -- except KeyError: -+ except KeyError as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_STATUS) - - def set_power_status(conn, options): -@@ -199,7 +200,8 @@ def get_power_status5(conn, options): - try: - (_, status) = outlets[options["--plug"]] - return status.lower().strip() -- except KeyError: -+ except KeyError as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_STATUS) - - def set_power_status5(conn, options): -diff --git a/agents/cisco_ucs/fence_cisco_ucs.py b/agents/cisco_ucs/fence_cisco_ucs.py -index ec3117548..2280dbbc7 100644 ---- a/agents/cisco_ucs/fence_cisco_ucs.py -+++ b/agents/cisco_ucs/fence_cisco_ucs.py -@@ -174,7 +174,8 @@ def main(): - if result == None: - ## Cookie is absenting in response - fail(EC_LOGIN_DENIED) -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_LOGIN_DENIED) - - options_global["cookie"] = result.group(1) -diff --git a/agents/eps/fence_eps.py b/agents/eps/fence_eps.py -index 74c89b95b..f0df86231 100644 ---- a/agents/eps/fence_eps.py -+++ b/agents/eps/fence_eps.py -@@ -56,7 +56,8 @@ def eps_run_command(options, params): - conn.close() - except socket.timeout: - fail(EC_TIMED_OUT) -- except socket.error: -+ except socket.error as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_LOGIN_DENIED) - - return result -diff --git a/agents/ilo_moonshot/fence_ilo_moonshot.py b/agents/ilo_moonshot/fence_ilo_moonshot.py -index a066a9c91..6f5cca320 100644 ---- a/agents/ilo_moonshot/fence_ilo_moonshot.py -+++ b/agents/ilo_moonshot/fence_ilo_moonshot.py -@@ -21,7 +21,8 @@ def get_power_status(conn, options): - try: - (_, status) = nodes[options["--plug"]] - return status.lower() -- except KeyError: -+ except KeyError as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_STATUS) - - def set_power_status(conn, options): -diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py -index a16103733..66cb65e41 100644 ---- a/agents/lpar/fence_lpar.py -+++ b/agents/lpar/fence_lpar.py -@@ -37,7 +37,8 @@ def get_power_status(conn, options): - try: - status = re.compile("^" + options["--plug"] + ",(.*?),.*$", - re.IGNORECASE | re.MULTILINE).search(conn.before).group(1) -- except AttributeError: -+ except AttributeError as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_STATUS_HMC) - elif options["--hmc-version"] in ["4", "IVM"]: - conn.send("lssyscfg -r lpar -m "+ options["--managed"] + -@@ -49,7 +50,8 @@ def get_power_status(conn, options): - - try: - status = re.compile(",state=(.*?),", re.IGNORECASE).search(conn.before).group(1) -- except AttributeError: -+ except AttributeError as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_STATUS_HMC) - - return _normalize_status(status) -diff --git a/agents/ovh/fence_ovh.py b/agents/ovh/fence_ovh.py -index f5403c54d..2b7eb864f 100644 ---- a/agents/ovh/fence_ovh.py -+++ b/agents/ovh/fence_ovh.py -@@ -66,7 +66,8 @@ def soap_login(options): - try: - soap = Client(url, doctor=d) - session = soap.service.login(options["--username"], options["--password"], 'en', 0) -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_LOGIN_DENIED) - - options["session"] = session -diff --git a/agents/sanbox2/fence_sanbox2.py b/agents/sanbox2/fence_sanbox2.py -index 679d1d983..179fe0e8b 100644 ---- a/agents/sanbox2/fence_sanbox2.py -+++ b/agents/sanbox2/fence_sanbox2.py -@@ -28,7 +28,8 @@ def get_power_status(conn, options): - conn.send_eol("admin end") - conn.send_eol("exit") - conn.close() -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - pass - fail(EC_TIMED_OUT) - -@@ -54,7 +55,8 @@ def set_power_status(conn, options): - conn.send_eol("admin end") - conn.send_eol("exit") - conn.close() -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - pass - fail(EC_TIMED_OUT) - -@@ -66,7 +68,8 @@ def set_power_status(conn, options): - conn.send_eol("admin end") - conn.send_eol("exit") - conn.close() -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - pass - fail(EC_TIMED_OUT) - -@@ -91,7 +94,8 @@ def get_list_devices(conn, options): - conn.send_eol("admin end") - conn.send_eol("exit") - conn.close() -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - pass - fail(EC_TIMED_OUT) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index f2ab68b02..a7f08b3d6 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -68,7 +68,8 @@ def soap_login(options): - conn.service.Login(mo_SessionManager, options["--username"], options["--password"]) - except requests.exceptions.SSLError as ex: - fail_usage("Server side certificate verification failed: %s" % ex) -- except Exception: -+ except Exception as e: -+ logging.error("Server side certificate verification failed: {}".format(str(e))) - fail(EC_LOGIN_DENIED) - - options["ServiceContent"] = ServiceContent -@@ -126,7 +127,8 @@ def get_power_status(conn, options): - - try: - raw_machines = conn.service.RetrievePropertiesEx(mo_PropertyCollector, propFilterSpec) -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_STATUS) - - (machines, uuid, mappingToUUID) = process_results(raw_machines, {}, {}, {}) -@@ -135,7 +137,8 @@ def get_power_status(conn, options): - while hasattr(raw_machines, 'token'): - try: - raw_machines = conn.service.ContinueRetrievePropertiesEx(mo_PropertyCollector, raw_machines.token) -- except Exception: -+ except Exception as e: -+ logging.error("Failed: {}".format(str(e))) - fail(EC_STATUS) - (more_machines, more_uuid, more_mappingToUUID) = process_results(raw_machines, {}, {}, {}) - machines.update(more_machines) diff --git a/SOURCES/bz1650214-fence_azure_arm-bundled.patch b/SOURCES/bz1650214-fence_azure_arm-bundled.patch deleted file mode 100644 index 747c151..0000000 --- a/SOURCES/bz1650214-fence_azure_arm-bundled.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py ---- a/agents/azure_arm/fence_azure_arm.py 2018-06-28 14:24:54.000000000 +0200 -+++ b/agents/azure_arm/fence_azure_arm.py 2019-01-15 10:24:16.030092206 +0100 -@@ -7,6 +7,8 @@ - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * - from fencing import fail_usage, run_command, run_delay -+ -+sys.path.insert(0, '/usr/lib/fence-agents/bundled/azure') - import azure_fence - - def get_nodes_list(clients, options): diff --git a/SOURCES/bz1654616-fence_hpblade-fix-log_expect_syntax.patch b/SOURCES/bz1654616-fence_hpblade-fix-log_expect_syntax.patch deleted file mode 100644 index bb239b1..0000000 --- a/SOURCES/bz1654616-fence_hpblade-fix-log_expect_syntax.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 342570c5a5af4c277be283507ef7898a078e2df9 Mon Sep 17 00:00:00 2001 -From: mmartinv <32071463+mmartinv@users.noreply.github.com> -Date: Fri, 16 Nov 2018 12:55:58 +0100 -Subject: [PATCH] Fix 'log_expect' in fence_hpblade.py - -Update the 'log_expect' call to the new method definition. ---- - agents/hpblade/fence_hpblade.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/agents/hpblade/fence_hpblade.py b/agents/hpblade/fence_hpblade.py -index b2cc94a3..fbc89f61 100644 ---- a/agents/hpblade/fence_hpblade.py -+++ b/agents/hpblade/fence_hpblade.py -@@ -16,7 +16,7 @@ - - def get_enclosure_type(conn, options): - conn.send_eol("show enclosure info") -- conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) -+ conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) - - type_re=re.compile(r"^\s*Enclosure Type: (\w+)(.*?)\s*$") - enclosure="unknown" -@@ -39,7 +39,7 @@ def get_power_status(conn, options): - powrestr = "^\\s*Power: (.*?)\\s*$" - - conn.send_eol(cmd_send) -- conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) -+ conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) - - power_re = re.compile(powrestr) - status = "unknown" -@@ -72,7 +72,7 @@ def set_power_status(conn, options): - conn.send_eol("poweron " + dev + options["--plug"]) - elif options["--action"] == "off": - conn.send_eol("poweroff " + dev + options["--plug"] + " force") -- conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) -+ conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) - - def get_instances_list(conn, options): - outlets = {} -@@ -84,7 +84,7 @@ def get_instances_list(conn, options): - listrestr = "^\\s*(\\d+)\\s+(.*?)\\s+(.*?)\\s+OK\\s+(.*?)\\s+(.*?)\\s*$" - - conn.send_eol(cmd_send) -- conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) -+ conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) - - list_re = re.compile(listrestr) - for line in conn.before.splitlines(): diff --git a/SOURCES/bz1654968-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch b/SOURCES/bz1654968-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch deleted file mode 100644 index 9560368..0000000 --- a/SOURCES/bz1654968-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch +++ /dev/null @@ -1,24 +0,0 @@ -From f77297b654586bf539e78957f26cae1d22c6f081 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 2 Nov 2018 09:24:56 +0100 -Subject: [PATCH] fence_scsi: fix incorrect SCSI key when node ID is 10 or - higher - - The last four digits of the SCSI key will be zero padded digit between 0000-0009. ---- - agents/scsi/fence_scsi.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 2180d0c9..79ada4fa 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -191,7 +191,7 @@ def get_cluster_id(options): - def get_node_id(options): - cmd = options["--corosync-cmap-path"] + " nodelist" - -- match = re.search(r".(\d).ring._addr \(str\) = " + options["--plug"] + "\n", run_cmd(options, cmd)["out"]) -+ match = re.search(r".(\d+).ring._addr \(str\) = " + options["--plug"] + "\n", run_cmd(options, cmd)["out"]) - return match.group(1) if match else fail_usage("Failed: unable to parse output of corosync-cmapctl or node does not exist") - - diff --git a/SOURCES/bz1654973-fence_vmware_soap-cleanup-sigterm.patch b/SOURCES/bz1654973-fence_vmware_soap-cleanup-sigterm.patch deleted file mode 100644 index 8d27ea4..0000000 --- a/SOURCES/bz1654973-fence_vmware_soap-cleanup-sigterm.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 116fb7d1253ac31a8f174187dfe9f4a0c6546ade Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 7 Sep 2018 15:56:56 +0200 -Subject: [PATCH] fence_vmware_soap: cleanup when receiving SIGTERM - ---- - agents/vmware_soap/fence_vmware_soap.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index b90edc9b..dd1a4ed6 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -3,7 +3,7 @@ - import sys - import shutil, tempfile, suds - import logging, requests --import atexit -+import atexit, signal - sys.path.append("@FENCEAGENTSLIBDIR@") - - from suds.client import Client -@@ -211,6 +211,9 @@ def logout(): - except Exception: - pass - -+def signal_handler(signum, frame): -+ raise Exception("Signal \"%d\" received which has triggered an exit of the process." % signum) -+ - def main(): - global options_global - global conn_global -@@ -219,6 +222,8 @@ def main(): - atexit.register(atexit_handler) - atexit.register(logout) - -+ signal.signal(signal.SIGTERM, signal_handler) -+ - options_global = check_input(device_opt, process_input(device_opt)) - - ## diff --git a/SOURCES/bz1654976-1-fence_scsi-watchdog-retry-support.patch b/SOURCES/bz1654976-1-fence_scsi-watchdog-retry-support.patch deleted file mode 100644 index 276c439..0000000 --- a/SOURCES/bz1654976-1-fence_scsi-watchdog-retry-support.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 11a63822fbdc0a9ebe1b668b26a59f1cc9649f6c Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 24 Oct 2018 14:51:27 +0200 -Subject: [PATCH] fence_scsi: watchdog retries support - ---- - agents/scsi/fence_scsi.py | 60 ++++++++++++++++++++---------- - tests/data/metadata/fence_scsi.xml | 4 +- - 2 files changed, 43 insertions(+), 21 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 79ada4fa..8a1e4c77 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -158,13 +158,15 @@ def get_reservation_key(options, dev): - return match.group(1) if match else None - - --def get_registration_keys(options, dev): -+def get_registration_keys(options, dev, fail=True): - reset_dev(options,dev) - keys = [] - cmd = options["--sg_persist-path"] + " -n -i -k -d " + dev - out = run_cmd(options, cmd) - if out["err"]: -- fail_usage("Cannot get registration keys") -+ fail_usage("Cannot get registration keys", fail) -+ if not fail: -+ return [] - for line in out["out"].split("\n"): - match = re.search(r"\s+0x(\S+)\s*", line) - if match: -@@ -218,9 +220,8 @@ def get_key(fail=True): - try: - f = open(file_path, "r") - except IOError: -- if fail: -- fail_usage("Failed: Cannot open file \""+ file_path + "\"") -- else: -+ fail_usage("Failed: Cannot open file \""+ file_path + "\"", fail) -+ if not fail: - return None - return f.readline().strip().lower() - -@@ -244,9 +245,8 @@ def dev_read(fail=True): - try: - f = open(file_path, "r") - except IOError: -- if fail: -- fail_usage("Failed: Cannot open file \"" + file_path + "\"") -- else: -+ fail_usage("Failed: Cannot open file \"" + file_path + "\"", fail) -+ if not fail: - return None - # get not empty lines from file - devs = [line.strip() for line in f if line.strip()] -@@ -371,14 +371,20 @@ def define_new_opts(): - } - - --def scsi_check_get_verbose(): -+def scsi_check_get_options(options): - try: -- f = open("/etc/sysconfig/watchdog", "r") -+ f = open("/etc/sysconfig/stonith", "r") - except IOError: -- return False -- match = re.search(r"^\s*verbose=yes", "".join(f.readlines()), re.MULTILINE) -+ return options -+ -+ match = re.findall(r"^\s*(\S*)\s*=\s*(\S*)\s*", "".join(f.readlines()), re.MULTILINE) -+ -+ for m in match: -+ options[m[0].lower()] = m[1].lower() -+ - f.close() -- return bool(match) -+ -+ return options - - - def scsi_check(hardreboot=False): -@@ -388,7 +394,10 @@ def scsi_check(hardreboot=False): - options["--sg_turs-path"] = "@SG_TURS_PATH@" - options["--sg_persist-path"] = "@SG_PERSIST_PATH@" - options["--power-timeout"] = "5" -- if scsi_check_get_verbose(): -+ options["retry"] = "0" -+ options["retry-sleep"] = "1" -+ options = scsi_check_get_options(options) -+ if "verbose" in options and options["verbose"] == "yes": - logging.getLogger().setLevel(logging.DEBUG) - devs = dev_read(fail=False) - if not devs: -@@ -399,11 +408,18 @@ def scsi_check(hardreboot=False): - logging.error("Key not found") - return 0 - for dev in devs: -- if key in get_registration_keys(options, dev): -- logging.debug("key " + key + " registered with device " + dev) -- return 0 -- else: -- logging.debug("key " + key + " not registered with device " + dev) -+ for n in range(int(options["retry"]) + 1): -+ if n > 0: -+ logging.debug("retry: " + str(n) + " of " + options["retry"]) -+ if key in get_registration_keys(options, dev, fail=False): -+ logging.debug("key " + key + " registered with device " + dev) -+ return 0 -+ else: -+ logging.debug("key " + key + " not registered with device " + dev) -+ -+ if n < int(options["retry"]): -+ time.sleep(float(options["retry-sleep"])) -+ - logging.debug("key " + key + " registered with any devices") - - if hardreboot == True: -@@ -452,7 +468,11 @@ def main(): - device(s). The result is that only registered nodes may write to the \ - device(s). When a node failure occurs, the fence_scsi agent will remove the \ - key belonging to the failed node from the device(s). The failed node will no \ --longer be able to write to the device(s). A manual reboot is required." -+longer be able to write to the device(s). A manual reboot is required.\ -+\n.P\n\ -+When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and \ -+verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it \ -+failing." - docs["vendorurl"] = "" - show_docs(options, docs) - -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index 45a84168..b8cdabd1 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -1,7 +1,9 @@ - - - fence_scsi is an I/O fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. These devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. --The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. -+The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. -+ -+When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it failing. - - - diff --git a/SOURCES/bz1654976-2-build-fix-check_used_options.patch b/SOURCES/bz1654976-2-build-fix-check_used_options.patch deleted file mode 100644 index 068375d..0000000 --- a/SOURCES/bz1654976-2-build-fix-check_used_options.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 267afc5caa0580cc483220e671cda094413a4e16 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 28 Nov 2018 09:54:16 +0100 -Subject: [PATCH] build: fix if-redirection to make check_used_options run for - the agents as intended - ---- - make/fencebuild.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/make/fencebuild.mk b/make/fencebuild.mk -index 9e8bd692..143082f0 100644 ---- a/make/fencebuild.mk -+++ b/make/fencebuild.mk -@@ -33,7 +33,7 @@ define gen_agent_from_py - -e 's#@''PING4_CMD@#${PING4_CMD}#g' \ - > $@ - -- if [ 0 -eq `echo "$(@)" | grep fence_ 2>&1 /dev/null; echo $$?` ]; then \ -+ if [ 0 -eq `echo "$(@)" | grep fence_ > /dev/null 2>&1; echo $$?` ]; then \ - PYTHONPATH=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib $(PYTHON) $(top_srcdir)/lib/check_used_options.py $@; \ - else true ; fi - diff --git a/SOURCES/bz1666914-1-fence_redfish.patch b/SOURCES/bz1666914-1-fence_redfish.patch deleted file mode 100644 index c6f5dfd..0000000 --- a/SOURCES/bz1666914-1-fence_redfish.patch +++ /dev/null @@ -1,812 +0,0 @@ -From 64e3f3ef4d0abefd2836fe015c87173310b1e130 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Mon, 3 Dec 2018 10:11:15 -0600 -Subject: [PATCH 1/8] Add new fence agent for Redfish - -- Agent works on all fence devices that implement the Redfish API specification -- Agent programatically finds the Systems Resouce URI if it's not provided ---- - agents/redfish/fence_redfish.py | 151 +++++++++++++++++++++ - tests/data/metadata/fence_redfish.xml | 181 ++++++++++++++++++++++++++ - 2 files changed, 332 insertions(+) - create mode 100644 agents/redfish/fence_redfish.py - create mode 100644 tests/data/metadata/fence_redfish.xml - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -new file mode 100644 -index 00000000..df7cf8c2 ---- /dev/null -+++ b/agents/redfish/fence_redfish.py -@@ -0,0 +1,151 @@ -+#!@PYTHON@ -tt -+ -+# Copyright (c) 2018 Dell Inc. or its subsidiaries. All Rights Reserved. -+ -+# Fence agent for devices that support the Redfish API Specification. -+ -+import sys -+import re -+import json -+import requests -+import atexit -+sys.path.append("@FENCEAGENTSLIBDIR@") -+ -+from requests.packages.urllib3.exceptions import InsecureRequestWarning -+from fencing import * -+from fencing import fail_usage -+ -+def get_power_status(conn, options): -+ uri = options["--systems-uri"] -+ response = send_get_request(options, uri) -+ if response['ret'] is False: -+ fail_usage("Couldn't get power information") -+ data = response['data'] -+ if data[u'PowerState'].strip() == "On": -+ return "on" -+ else: -+ return "off" -+ -+def set_power_status(conn, options): -+ action = { -+ 'on' : "On", -+ 'off': "ForceOff", -+ 'reboot': "GracefulRestart" -+ }[options["--action"]] -+ -+ payload = {'ResetType': action} -+ headers = {'content-type': 'application/json'} -+ -+ # Search for 'Actions' key and extract URI from it -+ uri = options["--systems-uri"] -+ response = send_get_request(options, uri) -+ if response['ret'] is False: -+ return {'ret': False} -+ data = response['data'] -+ uri = data["Actions"]["#ComputerSystem.Reset"]["target"] -+ -+ response = send_post_request(options, uri, payload, headers) -+ if response['ret'] is False: -+ fail_usage("Error sending power command") -+ return -+ -+def send_get_request(options, uri): -+ full_uri = "https://" + options["--ip"] + uri -+ try: -+ resp = requests.get(full_uri, verify=False, -+ auth=(options["--username"], options["--password"])) -+ data = resp.json() -+ except: -+ return {'ret': False} -+ return {'ret': True, 'data': data} -+ -+def send_post_request(options, uri, payload, headers): -+ full_uri = "https://" + options["--ip"] + uri -+ try: -+ requests.post(full_uri, data=json.dumps(payload), -+ headers=headers, verify=False, -+ auth=(options["--username"], options["--password"])) -+ except: -+ return {'ret': False} -+ return {'ret': True} -+ -+def find_systems_resource(options): -+ uri = options["--redfish-uri"] -+ response = send_get_request(options, uri) -+ if response['ret'] is False: -+ return {'ret': False} -+ data = response['data'] -+ -+ if 'Systems' not in data: -+ # Systems resource not found" -+ return {'ret': False} -+ else: -+ uri = data["Systems"]["@odata.id"] -+ response = send_get_request(options, uri) -+ if response['ret'] is False: -+ return {'ret': False} -+ data = response['data'] -+ -+ # need to be able to handle more than one entry -+ for member in data[u'Members']: -+ system_uri = member[u'@odata.id'] -+ return {'ret': True, 'uri': system_uri} -+ -+def define_new_opts(): -+ all_opt["redfish-uri"] = { -+ "getopt" : ":", -+ "longopt" : "redfish-uri", -+ "help" : "--redfish-uri=[uri] Base or starting Redifsh URI", -+ "required" : "0", -+ "default" : "/redfish/v1", -+ "shortdesc" : "Base or starting Redfish URI", -+ "order": 1 -+ } -+ all_opt["systems-uri"] = { -+ "getopt" : ":", -+ "longopt" : "systems-uri", -+ "help" : "--systems-uri=[uri] Redfish Systems resource URI", -+ "required" : "0", -+ "shortdesc" : "Redfish Systems resource URI, i.e. /redfish/v1/Systems/System.Embedded.1", -+ "order": 1 -+ } -+ -+def main(): -+ atexit.register(atexit_handler) -+ device_opt = ["ipaddr", "login", "passwd", "redfish-uri", "systems-uri", "ssl"] -+ define_new_opts() -+ -+ opt = process_input(device_opt) -+ -+ all_opt["ipport"]["default"] = "443" -+ options = check_input(device_opt, opt) -+ -+ docs = {} -+ docs["shortdesc"] = "I/O Fencing agent for Redfish" -+ docs["longdesc"] = "fence_redfish is an I/O Fencing agent which can be used with \ -+Out-of-Band controllers that support Redfish APIs. These controllers provide remote \ -+access to control power on a server." -+ docs["vendorurl"] = "http://www.dmtf.org" -+ show_docs(options, docs) -+ -+ ## -+ ## Operate the fencing device -+ #### -+ -+ # Disable insecure-certificate-warning message -+ if "--ssl-insecure" in opt: -+ requests.packages.urllib3.disable_warnings(InsecureRequestWarning) -+ -+ if "--systems-uri" not in opt: -+ # Systems URI not provided, find it -+ sysresult = find_systems_resource(options) -+ if sysresult['ret'] is False: -+ sys.exit(1) -+ else: -+ options["--systems-uri"] = sysresult["uri"] -+ -+ result = fence_action(None, options, set_power_status, get_power_status, None) -+ sys.exit(result) -+ -+if __name__ == "__main__": -+ main() -diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml -new file mode 100644 -index 00000000..43d447d0 ---- /dev/null -+++ b/tests/data/metadata/fence_redfish.xml -@@ -0,0 +1,181 @@ -+ -+ -+fence_redfish is an I/O Fencing agent which can be used with Out-of-Band controllers that support Redfish APIs. These controllers provide remote access to control power on a server. -+http://www.dmtf.org -+ -+ -+ -+ -+ TCP/UDP port to use for connection with device -+ -+ -+ -+ -+ SSL connection with verifying fence device's certificate -+ -+ -+ -+ -+ Redfish Systems resource URI, i.e. /redfish/v1/Systems/System.Embedded.1 -+ -+ -+ -+ -+ Fencing Action -+ -+ -+ -+ -+ Forces agent to use IPv6 addresses only -+ -+ -+ -+ -+ IP Address or Hostname -+ -+ -+ -+ -+ IP address or hostname of fencing device (together with --port-as-ip) -+ -+ -+ -+ -+ Script to retrieve password -+ -+ -+ -+ -+ Forces agent to use IPv4 addresses only -+ -+ -+ -+ -+ Login password or passphrase -+ -+ -+ -+ -+ SSL connection -+ -+ -+ -+ -+ Base or starting Redfish URI -+ -+ -+ -+ -+ SSL connection without verifying fence device's certificate -+ -+ -+ -+ -+ Login Name -+ -+ -+ -+ -+ IP address or hostname of fencing device (together with --port-as-ip) -+ -+ -+ -+ -+ Login Name -+ -+ -+ -+ -+ Base or starting Redfish URI -+ -+ -+ -+ -+ IP Address or Hostname -+ -+ -+ -+ -+ Redfish Systems resource URI, i.e. /redfish/v1/Systems/System.Embedded.1 -+ -+ -+ -+ -+ Login password or passphrase -+ -+ -+ -+ -+ Script to retrieve password -+ -+ -+ -+ -+ Verbose mode -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Display version information and exit -+ -+ -+ -+ -+ Display help and exit -+ -+ -+ -+ -+ Wait X seconds after issuing ON/OFF -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after login -+ -+ -+ -+ -+ Test X seconds for status change after ON/OFF -+ -+ -+ -+ -+ Wait X seconds before fencing is started -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after issuing command -+ -+ -+ -+ -+ Make "port/plug" to be an alias to IP address -+ -+ -+ -+ -+ Count of attempts to retry power on -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -From 6921a34d64d098a7b1f32205e0be434438c36898 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Mon, 3 Dec 2018 10:46:52 -0600 -Subject: [PATCH 2/8] Updated fence_redfish.xml with make xml-upload - ---- - tests/data/metadata/fence_redfish.xml | 148 ++++++++++++++------------ - 1 file changed, 79 insertions(+), 69 deletions(-) - -diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml -index 43d447d0..a39541e6 100644 ---- a/tests/data/metadata/fence_redfish.xml -+++ b/tests/data/metadata/fence_redfish.xml -@@ -3,110 +3,115 @@ - fence_redfish is an I/O Fencing agent which can be used with Out-of-Band controllers that support Redfish APIs. These controllers provide remote access to control power on a server. - http://www.dmtf.org - -- -- -- -- TCP/UDP port to use for connection with device -- -- -- -- -- SSL connection with verifying fence device's certificate -- -- -- -- -- Redfish Systems resource URI, i.e. /redfish/v1/Systems/System.Embedded.1 -- - - - -- Fencing Action -+ Fencing action -+ -+ -+ -+ -+ Forces agent to use IPv4 addresses only - - - - - Forces agent to use IPv6 addresses only - -- -+ - - -- IP Address or Hostname -+ IP address or hostname of fencing device - -- -- -+ -+ - -- IP address or hostname of fencing device (together with --port-as-ip) -+ IP address or hostname of fencing device - -- -- -- -- Script to retrieve password -+ -+ -+ -+ TCP/UDP port to use for connection with device - -- -- -- -- Forces agent to use IPv4 addresses only -+ -+ -+ -+ Login name - - - - - Login password or passphrase - -- -- -- -- SSL connection -- -- -- -- -- Base or starting Redfish URI -+ -+ -+ -+ Script to run to retrieve password - -- -- -- -- SSL connection without verifying fence device's certificate -+ -+ -+ -+ Login password or passphrase - -- -- -+ -+ - -- Login Name -+ Script to run to retrieve password - - - - - IP address or hostname of fencing device (together with --port-as-ip) - -- -- -+ -+ - -- Login Name -+ IP address or hostname of fencing device (together with --port-as-ip) -+ -+ -+ -+ -+ Base or starting Redfish URI - - - - - Base or starting Redfish URI - -- -- -+ -+ -+ -+ Use SSL connection with verifying certificate -+ -+ -+ -+ -+ Use SSL connection without verifying certificate -+ -+ -+ -+ -+ Use SSL connection with verifying certificate -+ -+ -+ - -- IP Address or Hostname -+ Redfish Systems resource URI, i.e. /redfish/v1/Systems/System.Embedded.1 - - - - - Redfish Systems resource URI, i.e. /redfish/v1/Systems/System.Embedded.1 - -- -- -+ -+ - -- Login password or passphrase -+ Login name - -- -- -- -- Script to retrieve password -+ -+ -+ -+ Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog. - - - -@@ -133,41 +138,45 @@ - - Display help and exit - -- -- -+ -+ - -- Wait X seconds after issuing ON/OFF -+ Wait X seconds before fencing is started - - - - - Wait X seconds for cmd prompt after login - -+ -+ -+ -+ Make "port/plug" to be an alias to IP address -+ - - - - Test X seconds for status change after ON/OFF - -- -- -+ -+ - -- Wait X seconds before fencing is started -+ Wait X seconds after issuing ON/OFF - - - - - Wait X seconds for cmd prompt after issuing command - -- -- -- -- Make "port/plug" to be an alias to IP address -- - - - - Count of attempts to retry power on - -+ -+ -+ Path to gnutls-cli binary -+ - - - -@@ -176,6 +185,7 @@ - - - -+ - - - - -From 755627fadd711848ea256d72f5e75f36f83b4d31 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Mon, 3 Dec 2018 11:55:23 -0600 -Subject: [PATCH 3/8] Added run_delay() - ---- - agents/redfish/fence_redfish.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index df7cf8c2..0e4a4f68 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -13,7 +13,7 @@ - - from requests.packages.urllib3.exceptions import InsecureRequestWarning - from fencing import * --from fencing import fail_usage -+from fencing import fail_usage, run_delay - - def get_power_status(conn, options): - uri = options["--systems-uri"] -@@ -127,6 +127,7 @@ def main(): - access to control power on a server." - docs["vendorurl"] = "http://www.dmtf.org" - show_docs(options, docs) -+ run_delay(options) - - ## - ## Operate the fencing device - -From 15fef4c47f391a3f03c714d86c9670ea209dec99 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Tue, 4 Dec 2018 10:56:58 -0600 -Subject: [PATCH 4/8] Modify power status check - -- Only returns off if PowerState = Off -- Otherwise returns on ---- - agents/redfish/fence_redfish.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 0e4a4f68..7998fb1c 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -21,10 +21,10 @@ def get_power_status(conn, options): - if response['ret'] is False: - fail_usage("Couldn't get power information") - data = response['data'] -- if data[u'PowerState'].strip() == "On": -- return "on" -- else: -+ if data[u'PowerState'].strip() == "Off": - return "off" -+ else: -+ return "on" - - def set_power_status(conn, options): - action = { - -From acf70f4672be65562841227ab0b4cacb87965f44 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Wed, 5 Dec 2018 10:39:32 -0600 -Subject: [PATCH 5/8] Changed reboot type to ForceRestart - ---- - agents/redfish/fence_redfish.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 7998fb1c..3fe2bfc0 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -30,7 +30,7 @@ def set_power_status(conn, options): - action = { - 'on' : "On", - 'off': "ForceOff", -- 'reboot': "GracefulRestart" -+ 'reboot': "ForceRestart" - }[options["--action"]] - - payload = {'ResetType': action} - -From 56e3358d45050ac669c099c56873feefa1ecda38 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Wed, 5 Dec 2018 10:54:44 -0600 -Subject: [PATCH 6/8] Replaced default port 443 with default ssl enabled option - ---- - agents/redfish/fence_redfish.py | 2 +- - tests/data/metadata/fence_redfish.xml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 3fe2bfc0..6a2dbb76 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -117,7 +117,7 @@ def main(): - - opt = process_input(device_opt) - -- all_opt["ipport"]["default"] = "443" -+ all_opt["ssl"]["default"] = "1" - options = check_input(device_opt, opt) - - docs = {} -diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml -index a39541e6..e1c18584 100644 ---- a/tests/data/metadata/fence_redfish.xml -+++ b/tests/data/metadata/fence_redfish.xml -@@ -80,7 +80,7 @@ - - - -- -+ - Use SSL connection with verifying certificate - - - -From 5c25a85b22a17d6bbc3dcb47c99b76e3a99a5857 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Wed, 5 Dec 2018 13:29:42 -0600 -Subject: [PATCH 7/8] Renamed variable to avoid reusing variable name - ---- - agents/redfish/fence_redfish.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 6a2dbb76..1ea25cd8 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -42,9 +42,9 @@ def set_power_status(conn, options): - if response['ret'] is False: - return {'ret': False} - data = response['data'] -- uri = data["Actions"]["#ComputerSystem.Reset"]["target"] -+ action_uri = data["Actions"]["#ComputerSystem.Reset"]["target"] - -- response = send_post_request(options, uri, payload, headers) -+ response = send_post_request(options, action_uri, payload, headers) - if response['ret'] is False: - fail_usage("Error sending power command") - return - -From 7dce8b1e22d57fec0d34e91a99fab9d8a06f1303 Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Thu, 6 Dec 2018 10:33:06 -0600 -Subject: [PATCH 8/8] Removed unnecessary variable assignments to simplify code - ---- - agents/redfish/fence_redfish.py | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 1ea25cd8..67ef67ab 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -16,8 +16,7 @@ - from fencing import fail_usage, run_delay - - def get_power_status(conn, options): -- uri = options["--systems-uri"] -- response = send_get_request(options, uri) -+ response = send_get_request(options, options["--systems-uri"]) - if response['ret'] is False: - fail_usage("Couldn't get power information") - data = response['data'] -@@ -37,8 +36,7 @@ def set_power_status(conn, options): - headers = {'content-type': 'application/json'} - - # Search for 'Actions' key and extract URI from it -- uri = options["--systems-uri"] -- response = send_get_request(options, uri) -+ response = send_get_request(options, options["--systems-uri"]) - if response['ret'] is False: - return {'ret': False} - data = response['data'] -@@ -70,8 +68,7 @@ def send_post_request(options, uri, payload, headers): - return {'ret': True} - - def find_systems_resource(options): -- uri = options["--redfish-uri"] -- response = send_get_request(options, uri) -+ response = send_get_request(options, options["--redfish-uri"]) - if response['ret'] is False: - return {'ret': False} - data = response['data'] -@@ -80,8 +77,7 @@ def find_systems_resource(options): - # Systems resource not found" - return {'ret': False} - else: -- uri = data["Systems"]["@odata.id"] -- response = send_get_request(options, uri) -+ response = send_get_request(options, data["Systems"]["@odata.id"]) - if response['ret'] is False: - return {'ret': False} - data = response['data'] diff --git a/SOURCES/bz1666914-2-fence_redfish-fail-invalid-cert.patch b/SOURCES/bz1666914-2-fence_redfish-fail-invalid-cert.patch deleted file mode 100644 index a834644..0000000 --- a/SOURCES/bz1666914-2-fence_redfish-fail-invalid-cert.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 7aa3c50d1d02dd26bdeac99c49ada72f842d88e8 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 17 Jan 2019 16:52:52 +0100 -Subject: [PATCH] fence_redfish: fail when using invalid cert without - --ssl-insecure - ---- - agents/redfish/fence_redfish.py | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 67ef67ab..5b719d4b 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -6,6 +6,7 @@ - - import sys - import re -+import logging - import json - import requests - import atexit -@@ -20,6 +21,9 @@ def get_power_status(conn, options): - if response['ret'] is False: - fail_usage("Couldn't get power information") - data = response['data'] -+ -+ logging.debug("PowerState is: " + data[u'PowerState']) -+ - if data[u'PowerState'].strip() == "Off": - return "off" - else: -@@ -50,21 +54,21 @@ def set_power_status(conn, options): - def send_get_request(options, uri): - full_uri = "https://" + options["--ip"] + uri - try: -- resp = requests.get(full_uri, verify=False, -+ resp = requests.get(full_uri, verify=not "--ssl-insecure" in options, - auth=(options["--username"], options["--password"])) - data = resp.json() -- except: -- return {'ret': False} -+ except Exception as e: -+ fail_usage("Failed: send_get_request: " + str(e)) - return {'ret': True, 'data': data} - - def send_post_request(options, uri, payload, headers): - full_uri = "https://" + options["--ip"] + uri - try: - requests.post(full_uri, data=json.dumps(payload), -- headers=headers, verify=False, -+ headers=headers, verify=not "--ssl-insecure" in options, - auth=(options["--username"], options["--password"])) -- except: -- return {'ret': False} -+ except Exception as e: -+ fail_usage("Failed: send_post_request: " + str(e)) - return {'ret': True} - - def find_systems_resource(options): diff --git a/SOURCES/bz1677327-1-fence_redfish-use-ipport-parameter.patch b/SOURCES/bz1677327-1-fence_redfish-use-ipport-parameter.patch deleted file mode 100644 index e2514f1..0000000 --- a/SOURCES/bz1677327-1-fence_redfish-use-ipport-parameter.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 9ebd2e2e36ae0de5c9164f4ac3fd29bdac0cab61 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 14 Feb 2019 10:03:33 +0100 -Subject: [PATCH] fence_redfish: use "ipport" parameter and improve logging - ---- - agents/redfish/fence_redfish.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 5b719d4b..28840058 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -22,7 +22,10 @@ def get_power_status(conn, options): - fail_usage("Couldn't get power information") - data = response['data'] - -- logging.debug("PowerState is: " + data[u'PowerState']) -+ try: -+ logging.debug("PowerState is: " + data[u'PowerState']) -+ except Exception: -+ fail_usage("Unable to get PowerState: " + "https://" + options["--ip"] + ":" + str(options["--ipport"]) + options["--systems-uri"]) - - if data[u'PowerState'].strip() == "Off": - return "off" -@@ -52,7 +55,7 @@ def set_power_status(conn, options): - return - - def send_get_request(options, uri): -- full_uri = "https://" + options["--ip"] + uri -+ full_uri = "https://" + options["--ip"] + ":" + str(options["--ipport"]) + uri - try: - resp = requests.get(full_uri, verify=not "--ssl-insecure" in options, - auth=(options["--username"], options["--password"])) -@@ -62,7 +65,7 @@ def send_get_request(options, uri): - return {'ret': True, 'data': data} - - def send_post_request(options, uri, payload, headers): -- full_uri = "https://" + options["--ip"] + uri -+ full_uri = "https://" + options["--ip"] + ":" + str(options["--ipport"]) + uri - try: - requests.post(full_uri, data=json.dumps(payload), - headers=headers, verify=not "--ssl-insecure" in options, diff --git a/SOURCES/bz1677327-2-fence_redfish-ip-parameter-backward-compatibility.patch b/SOURCES/bz1677327-2-fence_redfish-ip-parameter-backward-compatibility.patch deleted file mode 100644 index 3d97c4e..0000000 --- a/SOURCES/bz1677327-2-fence_redfish-ip-parameter-backward-compatibility.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 21898e45ca2624546de99086a27a14dd1ff86a2b Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 21 Feb 2019 09:08:03 +0100 -Subject: [PATCH] fence_redfish: backwards compatibility for : - ---- - agents/redfish/fence_redfish.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 28840058..f1424232 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -140,6 +140,10 @@ def main(): - if "--ssl-insecure" in opt: - requests.packages.urllib3.disable_warnings(InsecureRequestWarning) - -+ # backwards compatibility for : -+ if options["--ip"].count(":") == 1: -+ (options["--ip"], options["--ipport"]) = options["--ip"].split(":") -+ - if "--systems-uri" not in opt: - # Systems URI not provided, find it - sysresult = find_systems_resource(options) diff --git a/SOURCES/bz1685814-fence_gce-add-serviceaccount-file-support.patch b/SOURCES/bz1685814-fence_gce-add-serviceaccount-file-support.patch deleted file mode 100644 index 6f13714..0000000 --- a/SOURCES/bz1685814-fence_gce-add-serviceaccount-file-support.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --color -uNr a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py ---- a/agents/gce/fence_gce.py 2021-06-11 14:28:37.751959830 +0200 -+++ b/agents/gce/fence_gce.py 2021-06-11 14:54:03.638926494 +0200 -@@ -15,9 +15,15 @@ - import urllib2 as urlrequest - sys.path.append("@FENCEAGENTSLIBDIR@") - --import googleapiclient.discovery - from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action -- -+try: -+ import googleapiclient.discovery -+ try: -+ from google.oauth2.credentials import Credentials as GoogleCredentials -+ except: -+ from oauth2client.client import GoogleCredentials -+except: -+ pass - - METADATA_SERVER = 'http://metadata.google.internal/computeMetadata/v1/' - METADATA_HEADERS = {'Metadata-Flavor': 'Google'} -@@ -175,12 +181,21 @@ - "required" : "0", - "order" : 4 - } -+ all_opt["serviceaccount"] = { -+ "getopt" : ":", -+ "longopt" : "serviceaccount", -+ "help" : "--serviceaccount=[filename] Service account json file location e.g. serviceaccount=/somedir/service_account.json", -+ "shortdesc" : "Service Account to use for authentication to the google cloud APIs.", -+ "required" : "0", -+ "order" : 9 -+ } - - - def main(): - conn = None - -- device_opt = ["port", "no_password", "zone", "project", "stackdriver-logging", "method"] -+ device_opt = ["port", "no_password", "zone", "project", "stackdriver-logging", -+ "method", "serviceaccount"] - - atexit.register(atexit_handler) - -@@ -226,10 +241,24 @@ - - # Prepare cli - try: -- credentials = None -- if tuple(googleapiclient.__version__) < tuple("1.6.0"): -- import oauth2client.client -- credentials = oauth2client.client.GoogleCredentials.get_application_default() -+ serviceaccount = options.get("--serviceaccount") -+ if serviceaccount: -+ scope = ['https://www.googleapis.com/auth/cloud-platform'] -+ logging.debug("using credentials from service account") -+ try: -+ from google.oauth2.service_account import Credentials as ServiceAccountCredentials -+ credentials = ServiceAccountCredentials.from_service_account_file(filename=serviceaccount, scopes=scope) -+ except ImportError: -+ from oauth2client.service_account import ServiceAccountCredentials -+ credentials = ServiceAccountCredentials.from_json_keyfile_name(serviceaccount, scope) -+ else: -+ try: -+ from googleapiclient import _auth -+ credentials = _auth.default_credentials(); -+ except: -+ credentials = GoogleCredentials.get_application_default() -+ logging.debug("using application default credentials") -+ - conn = googleapiclient.discovery.build('compute', 'v1', credentials=credentials) - except Exception as err: - fail_usage("Failed: Create GCE compute v1 connection: {}".format(str(err))) diff --git a/SOURCES/bz1696584-fence_gce-fix-python3-encoding-issue.patch b/SOURCES/bz1696584-fence_gce-fix-python3-encoding-issue.patch deleted file mode 100644 index 9e9f7ad..0000000 --- a/SOURCES/bz1696584-fence_gce-fix-python3-encoding-issue.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 64ac6207152508392690b7c1dfcac3fe0a76adfd Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 5 Apr 2019 09:48:52 +0200 -Subject: [PATCH] fence_gce: fix Python 3 encoding issue - ---- - agents/gce/fence_gce.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 93cd11801..b171710d9 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -146,7 +146,7 @@ def get_metadata(metadata_key, params=None, timeout=None): - url = '%s?%s' % (metadata_url, params) - request = urlrequest.Request(url, headers=METADATA_HEADERS) - request_opener = urlrequest.build_opener(urlrequest.ProxyHandler({})) -- return request_opener.open(request, timeout=timeout * 1.1).read() -+ return request_opener.open(request, timeout=timeout * 1.1).read().decode("utf-8") - - - def define_new_opts(): diff --git a/SOURCES/bz1700546-fence_azure_arm-skip_shutdown.patch b/SOURCES/bz1700546-fence_azure_arm-skip_shutdown.patch deleted file mode 100644 index 708eb84..0000000 --- a/SOURCES/bz1700546-fence_azure_arm-skip_shutdown.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 1b3e548fcc0bd427dade178fa260567047ff3a0e Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 6 May 2019 13:24:18 +0200 -Subject: [PATCH] fence_azure_arm: use skip_shutdown feature when available - -The "skip_shutdown" parameter is ignored in older Azure SDK, so there's -no need for a fallback option. ---- - agents/azure_arm/fence_azure_arm.py | 6 +++--- - tests/data/metadata/fence_azure_arm.xml | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py -index 58b9eeb13..be0d40345 100755 ---- a/agents/azure_arm/fence_azure_arm.py -+++ b/agents/azure_arm/fence_azure_arm.py -@@ -114,8 +114,8 @@ def set_power_status(clients, options): - azure_fence.set_network_state(compute_client, network_client, rgName, vmName, "unblock") - - if (options["--action"]=="off"): -- logging.info("Deallocating " + vmName + " in resource group " + rgName) -- compute_client.virtual_machines.deallocate(rgName, vmName) -+ logging.info("Poweroff " + vmName + " in resource group " + rgName) -+ compute_client.virtual_machines.power_off(rgName, vmName, skip_shutdown=True) - elif (options["--action"]=="on"): - logging.info("Starting " + vmName + " in resource group " + rgName) - compute_client.virtual_machines.start(rgName, vmName) -@@ -199,7 +199,7 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for Azure Resource Manager" -- docs["longdesc"] = "Used to deallocate virtual machines and to report power state of virtual machines running in Azure. It uses Azure SDK for Python to connect to Azure.\ -+ docs["longdesc"] = "fence_azure_arm is an I/O Fencing agent for Azure Resource Manager. It uses Azure SDK for Python to connect to Azure.\ - \n.P\n\ - For instructions to setup credentials see: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal\ - \n.P\n\ -diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml -index 1c0b6cc6b..97ecfdba4 100644 ---- a/tests/data/metadata/fence_azure_arm.xml -+++ b/tests/data/metadata/fence_azure_arm.xml -@@ -1,6 +1,6 @@ - - --Used to deallocate virtual machines and to report power state of virtual machines running in Azure. It uses Azure SDK for Python to connect to Azure. -+fence_azure_arm is an I/O Fencing agent for Azure Resource Manager. It uses Azure SDK for Python to connect to Azure. - - For instructions to setup credentials see: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal - diff --git a/SOURCES/bz1704228-fence_redfish-full-redfish-spec-compliance.patch b/SOURCES/bz1704228-fence_redfish-full-redfish-spec-compliance.patch deleted file mode 100644 index 3b8ba13..0000000 --- a/SOURCES/bz1704228-fence_redfish-full-redfish-spec-compliance.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 75a74debba2205547d8eefae221221c2c71d99ce Mon Sep 17 00:00:00 2001 -From: Jose Delarosa -Date: Mon, 15 Apr 2019 12:46:42 -0500 -Subject: [PATCH] fence_redfish: add headers to HTTP methods - -* Needed for full compliance with Redfish spec. -* May cause errors in some devices if not sent. ---- - agents/redfish/fence_redfish.py | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index f1424232..390a4827 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -16,6 +16,11 @@ - from fencing import * - from fencing import fail_usage, run_delay - -+GET_HEADERS = {'accept': 'application/json', 'OData-Version': '4.0'} -+POST_HEADERS = {'content-type': 'application/json', 'accept': 'application/json', -+ 'OData-Version': '4.0'} -+ -+ - def get_power_status(conn, options): - response = send_get_request(options, options["--systems-uri"]) - if response['ret'] is False: -@@ -40,7 +45,6 @@ def set_power_status(conn, options): - }[options["--action"]] - - payload = {'ResetType': action} -- headers = {'content-type': 'application/json'} - - # Search for 'Actions' key and extract URI from it - response = send_get_request(options, options["--systems-uri"]) -@@ -49,7 +53,7 @@ def set_power_status(conn, options): - data = response['data'] - action_uri = data["Actions"]["#ComputerSystem.Reset"]["target"] - -- response = send_post_request(options, action_uri, payload, headers) -+ response = send_post_request(options, action_uri, payload) - if response['ret'] is False: - fail_usage("Error sending power command") - return -@@ -58,17 +62,18 @@ def send_get_request(options, uri): - full_uri = "https://" + options["--ip"] + ":" + str(options["--ipport"]) + uri - try: - resp = requests.get(full_uri, verify=not "--ssl-insecure" in options, -+ headers=GET_HEADERS, - auth=(options["--username"], options["--password"])) - data = resp.json() - except Exception as e: - fail_usage("Failed: send_get_request: " + str(e)) - return {'ret': True, 'data': data} - --def send_post_request(options, uri, payload, headers): -+def send_post_request(options, uri, payload): - full_uri = "https://" + options["--ip"] + ":" + str(options["--ipport"]) + uri - try: - requests.post(full_uri, data=json.dumps(payload), -- headers=headers, verify=not "--ssl-insecure" in options, -+ headers=POST_HEADERS, verify=not "--ssl-insecure" in options, - auth=(options["--username"], options["--password"])) - except Exception as e: - fail_usage("Failed: send_post_request: " + str(e)) diff --git a/SOURCES/bz1709780-fence_rhevm-RHEV-v4-API-support.patch b/SOURCES/bz1709780-fence_rhevm-RHEV-v4-API-support.patch deleted file mode 100644 index 6f115e8..0000000 --- a/SOURCES/bz1709780-fence_rhevm-RHEV-v4-API-support.patch +++ /dev/null @@ -1,164 +0,0 @@ -From a4e8b77ac51a0e4a6de489823ee1be47cbc7eb18 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 9 May 2019 12:09:48 +0200 -Subject: [PATCH] fence_rhevm: add RHEV v4 API support and auto-detection - ---- - agents/rhevm/fence_rhevm.py | 44 +++++++++++++++++++++++------ - tests/data/metadata/fence_rhevm.xml | 7 ++++- - 2 files changed, 41 insertions(+), 10 deletions(-) - -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index a1cdaf605..6012c4239 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -9,7 +9,8 @@ - from fencing import fail, EC_FETCH_VM_UUID, run_delay - - RE_GET_ID = re.compile("(.*?)", re.IGNORECASE) -+RE_STATUS = re.compile("(.*?)", re.IGNORECASE) -+RE_STATE = re.compile("(.*?)", re.IGNORECASE) - RE_GET_NAME = re.compile("(.*?)", re.IGNORECASE) - - def get_power_status(conn, options): -@@ -25,7 +26,10 @@ def get_power_status(conn, options): - - options["id"] = result.group(2) - -- result = RE_STATUS.search(res) -+ if tuple(map(int, options["--api-version"].split(".")))[0] > 3: -+ result = RE_STATUS.search(res) -+ else: -+ result = RE_STATE.search(res) - if result == None: - # We were able to parse ID so output is correct - # in some cases it is possible that RHEV-M output does not -@@ -59,7 +63,10 @@ def get_list(conn, options): - lines = res.split(" 3: -+ status = RE_STATUS.search(lines[i]).group(1) -+ else: -+ status = RE_STATE.search(lines[i]).group(1) - outlets[name] = ("", status) - except AttributeError: - return {} -@@ -69,6 +76,13 @@ def get_list(conn, options): - return outlets - - def send_command(opt, command, method="GET"): -+ if opt["--api-version"] == "auto": -+ opt["--api-version"] = "4" -+ res = send_command(opt, "") -+ if re.search("Error", res): -+ opt["--api-version"] = "3" -+ logging.debug("auto-detected API version: " + opt["--api-version"]) -+ - ## setup correct URL - if "--ssl" in opt or "--ssl-secure" in opt or "--ssl-insecure" in opt: - url = "https:" -@@ -90,7 +104,7 @@ def send_command(opt, command, method="GET"): - web_buffer = io.BytesIO() - conn.setopt(pycurl.URL, url.encode("UTF-8")) - conn.setopt(pycurl.HTTPHEADER, [ -- "Version: 3", -+ "Version: {}".format(opt["--api-version"]), - "Content-type: application/xml", - "Accept: application/xml", - "Prefer: persistent-auth", -@@ -130,8 +144,9 @@ def send_command(opt, command, method="GET"): - - result = web_buffer.getvalue().decode("UTF-8") - -- logging.debug("%s\n", command) -- logging.debug("%s\n", result) -+ logging.debug("url: %s\n", url) -+ logging.debug("command: %s\n", command) -+ logging.debug("result: %s\n", result) - - return result - -@@ -151,6 +166,15 @@ def define_new_opts(): - "required" : "0", - "shortdesc" : "Reuse cookies for authentication", - "order" : 1} -+ all_opt["api_version"] = { -+ "getopt" : ":", -+ "longopt" : "api-version", -+ "help" : "--api-version " -+ "Version of RHEV API (default: auto)", -+ "required" : "0", -+ "order" : 2, -+ "default" : "auto", -+ } - all_opt["api_path"] = { - "getopt" : ":", - "longopt" : "api-path", -@@ -158,20 +182,19 @@ def define_new_opts(): - "default" : "/ovirt-engine/api", - "required" : "0", - "shortdesc" : "The path part of the API URL", -- "order" : 2} -+ "order" : 3} - all_opt["disable_http_filter"] = { - "getopt" : "", - "longopt" : "disable-http-filter", - "help" : "--disable-http-filter Set HTTP Filter header to false", - "required" : "0", - "shortdesc" : "Set HTTP Filter header to false", -- "order" : 3} -+ "order" : 4} - - - def main(): - device_opt = [ - "ipaddr", -- "api_path", - "login", - "passwd", - "ssl", -@@ -179,6 +202,8 @@ def main(): - "web", - "port", - "use_cookies", -+ "api_version", -+ "api_path", - "disable_http_filter", - ] - -@@ -186,6 +211,7 @@ def main(): - define_new_opts() - - all_opt["power_wait"]["default"] = "1" -+ all_opt["shell_timeout"]["default"] = "5" - - options = check_input(device_opt, process_input(device_opt)) - -diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml -index 6344db79f..c56cf64b6 100644 ---- a/tests/data/metadata/fence_rhevm.xml -+++ b/tests/data/metadata/fence_rhevm.xml -@@ -98,6 +98,11 @@ - - Login name - -+ -+ -+ -+ Version of RHEV API (default: auto) -+ - - - The path part of the API URL -@@ -164,7 +169,7 @@ - - - -- -+ - Wait X seconds for cmd prompt after issuing command - - diff --git a/SOURCES/bz1709926-fence_mpath-fix-watchdog-hardreboot.patch b/SOURCES/bz1709926-fence_mpath-fix-watchdog-hardreboot.patch deleted file mode 100644 index 2b187c2..0000000 --- a/SOURCES/bz1709926-fence_mpath-fix-watchdog-hardreboot.patch +++ /dev/null @@ -1,21 +0,0 @@ -From e5c6c2e134fd397ffe3319adc7afb8b633a251b2 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 14 May 2019 16:44:59 +0200 -Subject: [PATCH] fence_mpath: import ctypes to fix watchdog hardreboot - ---- - agents/mpath/fence_mpath.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index d9ac2ef54..e4f598361 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -6,6 +6,7 @@ - import os - import logging - import atexit -+import ctypes - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import fail_usage, run_command, atexit_handler, check_input, process_input, show_docs - from fencing import fence_action, all_opt, run_delay diff --git a/SOURCES/bz1712263-fence_rhevm-1-use-UTF8-encoding.patch b/SOURCES/bz1712263-fence_rhevm-1-use-UTF8-encoding.patch deleted file mode 100644 index 281e006..0000000 --- a/SOURCES/bz1712263-fence_rhevm-1-use-UTF8-encoding.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a77165d7c8caadf514462d359c6d564048c2c33a Mon Sep 17 00:00:00 2001 -From: Sandro <42254081+Numblesix@users.noreply.github.com> -Date: Tue, 29 Jan 2019 13:29:52 +0100 -Subject: [PATCH] Changed Encoding to UTF-8 - -Starting from RHV/Ovirt 4.2 we saw issues with the agent(unable to fence) after switching to UTF-8 all worked again. ---- - agents/rhevm/fence_rhevm.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index 2a5107cc6..a1cdaf605 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -88,7 +88,7 @@ def send_command(opt, command, method="GET"): - ## send command through pycurl - conn = pycurl.Curl() - web_buffer = io.BytesIO() -- conn.setopt(pycurl.URL, url.encode("ascii")) -+ conn.setopt(pycurl.URL, url.encode("UTF-8")) - conn.setopt(pycurl.HTTPHEADER, [ - "Version: 3", - "Content-type: application/xml", -@@ -128,7 +128,7 @@ def send_command(opt, command, method="GET"): - - opt["cookie"] = cookie - -- result = web_buffer.getvalue().decode() -+ result = web_buffer.getvalue().decode("UTF-8") - - logging.debug("%s\n", command) - logging.debug("%s\n", result) diff --git a/SOURCES/bz1712263-fence_rhevm-2-fix-debug-encoding-issues.patch b/SOURCES/bz1712263-fence_rhevm-2-fix-debug-encoding-issues.patch deleted file mode 100644 index 9603498..0000000 --- a/SOURCES/bz1712263-fence_rhevm-2-fix-debug-encoding-issues.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 965924fe8bf7dcd0bc15fb0e9265ab49bb8a5dd8 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 20 May 2019 15:49:39 +0200 -Subject: [PATCH] fence_rhevm: fix debug encoding issues - -Tested with UTF-8 encoded comment in result, which caused this issue, -and added to command and url in case they are in UTF-8 decoded state. ---- - agents/rhevm/fence_rhevm.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index 6012c423..9e4650cd 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -144,9 +144,9 @@ def send_command(opt, command, method="GET"): - - result = web_buffer.getvalue().decode("UTF-8") - -- logging.debug("url: %s\n", url) -- logging.debug("command: %s\n", command) -- logging.debug("result: %s\n", result) -+ logging.debug("url: %s\n", url.encode("UTF-8")) -+ logging.debug("command: %s\n", command.encode("UTF-8")) -+ logging.debug("result: %s\n", result.encode("UTF-8")) - - return result - --- -2.21.0 - diff --git a/SOURCES/bz1714458-fence_scsi-node-id-new-format.patch b/SOURCES/bz1714458-fence_scsi-node-id-new-format.patch deleted file mode 100644 index 0364930..0000000 --- a/SOURCES/bz1714458-fence_scsi-node-id-new-format.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1c4a64ca803831b44c96c75022abe5bb8713cd1a Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 22 May 2019 10:13:34 +0200 -Subject: [PATCH] fence_scsi: detect node ID using new format, and fallback to - old format before failing - ---- - agents/scsi/fence_scsi.py | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 8a1e4c77..5580e08b 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -192,8 +192,14 @@ def get_cluster_id(options): - - def get_node_id(options): - cmd = options["--corosync-cmap-path"] + " nodelist" -+ out = run_cmd(options, cmd)["out"] -+ -+ match = re.search(r".(\d+).name \(str\) = " + options["--plug"] + "\n", out) -+ -+ # try old format before failing -+ if not match: -+ match = re.search(r".(\d+).ring._addr \(str\) = " + options["--plug"] + "\n", out) - -- match = re.search(r".(\d+).ring._addr \(str\) = " + options["--plug"] + "\n", run_cmd(options, cmd)["out"]) - return match.group(1) if match else fail_usage("Failed: unable to parse output of corosync-cmapctl or node does not exist") - - diff --git a/SOURCES/bz1720198-fence_scsi-watchdog-fix-retry-failing-on-first-try.patch b/SOURCES/bz1720198-fence_scsi-watchdog-fix-retry-failing-on-first-try.patch deleted file mode 100644 index 010fc00..0000000 --- a/SOURCES/bz1720198-fence_scsi-watchdog-fix-retry-failing-on-first-try.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 418b3a36c8a7de0e984a0cd4707f2b90f279c4ce Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 13 Jun 2019 11:29:25 +0200 -Subject: [PATCH] fence_scsi watchdog: dont exit when command fails using retry - parameter - ---- - lib/fencing.py.py | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 8cd0a813..6f2526a9 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -530,7 +530,7 @@ def fail_usage(message="", stop=True): - logging.error("Please use '-h' for usage\n") - sys.exit(EC_GENERIC_ERROR) - --def fail(error_code): -+def fail(error_code, stop=True): - message = { - EC_LOGIN_DENIED : "Unable to connect/login to fencing device", - EC_CONNECTION_LOST : "Connection lost", -@@ -546,7 +546,8 @@ def fail(error_code): - - }[error_code] + "\n" - logging.error("%s\n", message) -- sys.exit(EC_GENERIC_ERROR) -+ if stop: -+ sys.exit(EC_GENERIC_ERROR) - - def usage(avail_opt): - print("Usage:") -@@ -1009,7 +1010,7 @@ def run_command(options, command, timeout=None, env=None, log_command=None): - thread.join(timeout) - if thread.is_alive(): - process.kill() -- fail(EC_TIMED_OUT) -+ fail(EC_TIMED_OUT, stop=(int(options.get("retry", 0)) < 1)) - - status = process.wait() - diff --git a/SOURCES/bz1728203-bz1874862-fence_ibm_vpc-fence_ibm_powervs.patch b/SOURCES/bz1728203-bz1874862-fence_ibm_vpc-fence_ibm_powervs.patch deleted file mode 100644 index d68612c..0000000 --- a/SOURCES/bz1728203-bz1874862-fence_ibm_vpc-fence_ibm_powervs.patch +++ /dev/null @@ -1,740 +0,0 @@ -From 3078e4d55d3bad2bbf9309785fdb2b53afac8d65 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 13 Jul 2021 13:39:33 +0200 -Subject: [PATCH] fence_ibm_vpc/fence_ibm_powervs: new fence agents - ---- - agents/ibm_powervs/fence_ibm_powervs.py | 202 +++++++++++++++++++ - agents/ibm_vpc/fence_ibm_vpc.py | 230 ++++++++++++++++++++++ - tests/data/metadata/fence_ibm_powervs.xml | 134 +++++++++++++ - tests/data/metadata/fence_ibm_vpc.xml | 134 +++++++++++++ - 5 files changed, 724 insertions(+) - create mode 100755 agents/ibm_powervs/fence_ibm_powervs.py - create mode 100755 agents/ibm_vpc/fence_ibm_vpc.py - create mode 100644 tests/data/metadata/fence_ibm_powervs.xml - create mode 100644 tests/data/metadata/fence_ibm_vpc.xml - -diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py -new file mode 100755 -index 000000000..6649771ea ---- /dev/null -+++ b/agents/ibm_powervs/fence_ibm_powervs.py -@@ -0,0 +1,202 @@ -+#!@PYTHON@ -tt -+ -+import sys -+import pycurl, io, json -+import logging -+import atexit -+sys.path.append("@FENCEAGENTSLIBDIR@") -+from fencing import * -+from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS -+ -+state = { -+ "ACTIVE": "on", -+ "SHUTOFF": "off", -+ "ERROR": "unknown" -+} -+ -+def get_list(conn, options): -+ outlets = {} -+ -+ try: -+ command = "cloud-instances/{}/pvm-instances".format(options["--instance"]) -+ res = send_command(conn, command) -+ except Exception as e: -+ logging.debug("Failed: {}".format(e)) -+ return outlets -+ -+ for r in res["pvmInstances"]: -+ if "--verbose" in options: -+ logging.debug(json.dumps(r, indent=2)) -+ outlets[r["pvmInstanceID"]] = (r["serverName"], state[r["status"]]) -+ -+ return outlets -+ -+def get_power_status(conn, options): -+ try: -+ command = "cloud-instances/{}/pvm-instances/{}".format( -+ options["--instance"], options["--plug"]) -+ res = send_command(conn, command) -+ result = get_list(conn, options)[options["--plug"]][1] -+ except KeyError as e: -+ logging.debug("Failed: Unable to get status for {}".format(e)) -+ fail(EC_STATUS) -+ -+ return result -+ -+def set_power_status(conn, options): -+ action = { -+ "on" : '{"action" : "start"}', -+ "off" : '{"action" : "immediate-shutdown"}', -+ }[options["--action"]] -+ -+ try: -+ send_command(conn, "cloud-instances/{}/pvm-instances/{}/action".format( -+ options["--instance"], options["--plug"]), "POST", action) -+ except Exception as e: -+ logging.debug("Failed: Unable to set power to {} for {}".format(options["--action"], e)) -+ fail(EC_STATUS) -+ -+def connect(opt): -+ conn = pycurl.Curl() -+ -+ ## setup correct URL -+ conn.base_url = "https://" + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" -+ -+ if opt["--verbose-level"] > 1: -+ conn.setopt(pycurl.VERBOSE, 1) -+ -+ conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) -+ conn.setopt(pycurl.SSL_VERIFYPEER, 1) -+ conn.setopt(pycurl.SSL_VERIFYHOST, 2) -+ -+ # set auth token for later requests -+ conn.setopt(pycurl.HTTPHEADER, [ -+ "Content-Type: application/json", -+ "Authorization: Bearer {}".format(opt["--token"]), -+ "CRN: {}".format(opt["--crn"]), -+ "User-Agent: curl", -+ ]) -+ -+ return conn -+ -+def disconnect(conn): -+ conn.close() -+ -+def send_command(conn, command, method="GET", action=None): -+ url = conn.base_url + command -+ -+ conn.setopt(pycurl.URL, url.encode("ascii")) -+ -+ web_buffer = io.BytesIO() -+ -+ if method == "GET": -+ conn.setopt(pycurl.POST, 0) -+ if method == "POST": -+ conn.setopt(pycurl.POSTFIELDS, action) -+ if method == "DELETE": -+ conn.setopt(pycurl.CUSTOMREQUEST, "DELETE") -+ -+ conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) -+ -+ try: -+ conn.perform() -+ except Exception as e: -+ raise(e) -+ -+ rc = conn.getinfo(pycurl.HTTP_CODE) -+ result = web_buffer.getvalue().decode("UTF-8") -+ -+ web_buffer.close() -+ -+ if rc != 200: -+ if len(result) > 0: -+ raise Exception("{}: {}".format(rc, -+ result["value"]["messages"][0]["default_message"])) -+ else: -+ raise Exception("Remote returned {} for request to {}".format(rc, url)) -+ -+ if len(result) > 0: -+ result = json.loads(result) -+ -+ logging.debug("url: {}".format(url)) -+ logging.debug("method: {}".format(method)) -+ logging.debug("response code: {}".format(rc)) -+ logging.debug("result: {}\n".format(result)) -+ -+ return result -+ -+def define_new_opts(): -+ all_opt["token"] = { -+ "getopt" : ":", -+ "longopt" : "token", -+ "help" : "--token=[token] Bearer Token", -+ "required" : "1", -+ "shortdesc" : "Bearer Token", -+ "order" : 0 -+ } -+ all_opt["crn"] = { -+ "getopt" : ":", -+ "longopt" : "crn", -+ "help" : "--crn=[crn] CRN", -+ "required" : "1", -+ "shortdesc" : "CRN", -+ "order" : 0 -+ } -+ all_opt["instance"] = { -+ "getopt" : ":", -+ "longopt" : "instance", -+ "help" : "--instance=[instance] PowerVS Instance", -+ "required" : "1", -+ "shortdesc" : "PowerVS Instance", -+ "order" : 0 -+ } -+ all_opt["region"] = { -+ "getopt" : ":", -+ "longopt" : "region", -+ "help" : "--region=[region] Region", -+ "required" : "1", -+ "shortdesc" : "Region", -+ "order" : 0 -+ } -+ -+ -+def main(): -+ device_opt = [ -+ "token", -+ "crn", -+ "instance", -+ "region", -+ "port", -+ "no_password", -+ ] -+ -+ atexit.register(atexit_handler) -+ define_new_opts() -+ -+ all_opt["shell_timeout"]["default"] = "15" -+ all_opt["power_timeout"]["default"] = "30" -+ all_opt["power_wait"]["default"] = "1" -+ -+ options = check_input(device_opt, process_input(device_opt)) -+ -+ docs = {} -+ docs["shortdesc"] = "Fence agent for IBM PowerVS" -+ docs["longdesc"] = """fence_ibm_powervs is an I/O Fencing agent which can be \ -+used with IBM PowerVS to fence virtual machines.""" -+ docs["vendorurl"] = "https://www.ibm.com" -+ show_docs(options, docs) -+ -+ #### -+ ## Fence operations -+ #### -+ run_delay(options) -+ -+ conn = connect(options) -+ atexit.register(disconnect, conn) -+ -+ result = fence_action(conn, options, set_power_status, get_power_status, get_list) -+ -+ sys.exit(result) -+ -+if __name__ == "__main__": -+ main() -diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py -new file mode 100755 -index 000000000..9f84f7b2d ---- /dev/null -+++ b/agents/ibm_vpc/fence_ibm_vpc.py -@@ -0,0 +1,230 @@ -+#!@PYTHON@ -tt -+ -+import sys -+import pycurl, io, json -+import logging -+import atexit -+sys.path.append("@FENCEAGENTSLIBDIR@") -+from fencing import * -+from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS -+ -+state = { -+ "running": "on", -+ "stopped": "off", -+ "starting": "unknown", -+ "stopping": "unknown", -+ "restarting": "unknown", -+ "pending": "unknown", -+} -+ -+def get_list(conn, options): -+ outlets = {} -+ -+ try: -+ command = "instances?version=2021-05-25&generation=2&limit={}".format(options["--limit"]) -+ res = send_command(conn, command) -+ except Exception as e: -+ logging.debug("Failed: Unable to get list: {}".format(e)) -+ return outlets -+ -+ for r in res["instances"]: -+ if options["--verbose-level"] > 1: -+ logging.debug("Node:\n{}".format(json.dumps(r, indent=2))) -+ logging.debug("Status: " + state[r["status"]]) -+ outlets[r["id"]] = (r["name"], state[r["status"]]) -+ -+ return outlets -+ -+def get_power_status(conn, options): -+ try: -+ command = "instances/{}?version=2021-05-25&generation=2".format(options["--plug"]) -+ res = send_command(conn, command) -+ result = state[res["status"]] -+ if options["--verbose-level"] > 1: -+ logging.debug("Result:\n{}".format(json.dumps(res, indent=2))) -+ logging.debug("Status: " + result) -+ except Exception as e: -+ logging.debug("Failed: Unable to get status for {}: {}".format(options["--plug"], e)) -+ fail(EC_STATUS) -+ -+ return result -+ -+def set_power_status(conn, options): -+ action = { -+ "on" : '{"type" : "start"}', -+ "off" : '{"type" : "stop"}', -+ }[options["--action"]] -+ -+ try: -+ command = "instances/{}/actions?version=2021-05-25&generation=2".format(options["--plug"]) -+ send_command(conn, command, "POST", action, 201) -+ except Exception as e: -+ logging.debug("Failed: Unable to set power to {} for {}".format(options["--action"], e)) -+ fail(EC_STATUS) -+ -+def get_bearer_token(conn, options): -+ token = None -+ try: -+ conn.setopt(pycurl.HTTPHEADER, [ -+ "Content-Type: application/x-www-form-urlencoded", -+ "User-Agent: curl", -+ ]) -+ token = send_command(conn, "https://iam.cloud.ibm.com/identity/token", "POST", "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey={}".format(options["--apikey"]))["access_token"] -+ except Exception: -+ logging.error("Failed: Unable to authenticate") -+ fail(EC_LOGIN_DENIED) -+ -+ return token -+ -+def connect(opt): -+ conn = pycurl.Curl() -+ -+ ## setup correct URL -+ conn.base_url = "https://" + opt["--region"] + ".iaas.cloud.ibm.com/v1/" -+ -+ if opt["--verbose-level"] > 1: -+ conn.setopt(pycurl.VERBOSE, 1) -+ -+ conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) -+ conn.setopt(pycurl.SSL_VERIFYPEER, 1) -+ conn.setopt(pycurl.SSL_VERIFYHOST, 2) -+ -+ # get bearer token -+ bearer_token = get_bearer_token(conn, opt) -+ -+ # set auth token for later requests -+ conn.setopt(pycurl.HTTPHEADER, [ -+ "Content-Type: application/json", -+ "Authorization: Bearer {}".format(bearer_token), -+ "User-Agent: curl", -+ ]) -+ -+ return conn -+ -+def disconnect(conn): -+ conn.close() -+ -+def send_command(conn, command, method="GET", action=None, expected_rc=200): -+ if not command.startswith("https"): -+ url = conn.base_url + command -+ else: -+ url = command -+ -+ conn.setopt(pycurl.URL, url.encode("ascii")) -+ -+ web_buffer = io.BytesIO() -+ -+ if method == "GET": -+ conn.setopt(pycurl.POST, 0) -+ if method == "POST": -+ conn.setopt(pycurl.POSTFIELDS, action) -+ if method == "DELETE": -+ conn.setopt(pycurl.CUSTOMREQUEST, "DELETE") -+ -+ conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) -+ -+ try: -+ conn.perform() -+ except Exception as e: -+ raise(e) -+ -+ rc = conn.getinfo(pycurl.HTTP_CODE) -+ result = web_buffer.getvalue().decode("UTF-8") -+ -+ web_buffer.close() -+ -+ # actions (start/stop/reboot) report 201 when they've been created -+ if rc != expected_rc: -+ logging.debug("rc: {}, result: {}".format(rc, result)) -+ if len(result) > 0: -+ raise Exception("{}: {}".format(rc, -+ result["value"]["messages"][0]["default_message"])) -+ else: -+ raise Exception("Remote returned {} for request to {}".format(rc, url)) -+ -+ if len(result) > 0: -+ result = json.loads(result) -+ -+ logging.debug("url: {}".format(url)) -+ logging.debug("method: {}".format(method)) -+ logging.debug("response code: {}".format(rc)) -+ logging.debug("result: {}\n".format(result)) -+ -+ return result -+ -+def define_new_opts(): -+ all_opt["apikey"] = { -+ "getopt" : ":", -+ "longopt" : "apikey", -+ "help" : "--apikey=[key] API Key", -+ "required" : "1", -+ "shortdesc" : "API Key", -+ "order" : 0 -+ } -+ all_opt["instance"] = { -+ "getopt" : ":", -+ "longopt" : "instance", -+ "help" : "--instance=[instance] Cloud Instance", -+ "required" : "1", -+ "shortdesc" : "Cloud Instance", -+ "order" : 0 -+ } -+ all_opt["region"] = { -+ "getopt" : ":", -+ "longopt" : "region", -+ "help" : "--region=[region] Region", -+ "required" : "1", -+ "shortdesc" : "Region", -+ "order" : 0 -+ } -+ all_opt["limit"] = { -+ "getopt" : ":", -+ "longopt" : "limit", -+ "help" : "--limit=[number] Limit number of nodes returned by API", -+ "required" : "1", -+ "default": 50, -+ "shortdesc" : "Number of nodes returned by API", -+ "order" : 0 -+ } -+ -+ -+def main(): -+ device_opt = [ -+ "apikey", -+ "instance", -+ "region", -+ "limit", -+ "port", -+ "no_password", -+ ] -+ -+ atexit.register(atexit_handler) -+ define_new_opts() -+ -+ all_opt["shell_timeout"]["default"] = "15" -+ all_opt["power_timeout"]["default"] = "30" -+ all_opt["power_wait"]["default"] = "1" -+ -+ options = check_input(device_opt, process_input(device_opt)) -+ -+ docs = {} -+ docs["shortdesc"] = "Fence agent for IBM Cloud VPC" -+ docs["longdesc"] = """fence_ibm_vpc is an I/O Fencing agent which can be \ -+used with IBM Cloud VPC to fence virtual machines.""" -+ docs["vendorurl"] = "https://www.ibm.com" -+ show_docs(options, docs) -+ -+ #### -+ ## Fence operations -+ #### -+ run_delay(options) -+ -+ conn = connect(options) -+ atexit.register(disconnect, conn) -+ -+ result = fence_action(conn, options, set_power_status, get_power_status, get_list) -+ -+ sys.exit(result) -+ -+if __name__ == "__main__": -+ main() -diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml -new file mode 100644 -index 000000000..fe86331bd ---- /dev/null -+++ b/tests/data/metadata/fence_ibm_powervs.xml -@@ -0,0 +1,134 @@ -+ -+ -+fence_ibm_powervs is an I/O Fencing agent which can be used with IBM PowerVS to fence virtual machines. -+https://www.ibm.com -+ -+ -+ -+ -+ CRN -+ -+ -+ -+ -+ PowerVS Instance -+ -+ -+ -+ -+ Region -+ -+ -+ -+ -+ Bearer Token -+ -+ -+ -+ -+ Fencing action -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog. -+ -+ -+ -+ -+ 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). -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Display version information and exit -+ -+ -+ -+ -+ Display help and exit -+ -+ -+ -+ -+ Separator for CSV created by 'list' operation -+ -+ -+ -+ -+ Wait X seconds before fencing is started -+ -+ -+ -+ -+ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after login -+ -+ -+ -+ -+ Test X seconds for status change after ON/OFF -+ -+ -+ -+ -+ Wait X seconds after issuing ON/OFF -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after issuing command -+ -+ -+ -+ -+ Sleep X seconds between status calls during a STONITH action -+ -+ -+ -+ -+ Count of attempts to retry power on -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml -new file mode 100644 -index 000000000..926efcaa0 ---- /dev/null -+++ b/tests/data/metadata/fence_ibm_vpc.xml -@@ -0,0 +1,134 @@ -+ -+ -+fence_ibm_vpc is an I/O Fencing agent which can be used with IBM Cloud VPC to fence virtual machines. -+https://www.ibm.com -+ -+ -+ -+ -+ API Key -+ -+ -+ -+ -+ Cloud Instance -+ -+ -+ -+ -+ Number of nodes returned by API -+ -+ -+ -+ -+ Region -+ -+ -+ -+ -+ Fencing action -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog. -+ -+ -+ -+ -+ 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). -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Display version information and exit -+ -+ -+ -+ -+ Display help and exit -+ -+ -+ -+ -+ Separator for CSV created by 'list' operation -+ -+ -+ -+ -+ Wait X seconds before fencing is started -+ -+ -+ -+ -+ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after login -+ -+ -+ -+ -+ Test X seconds for status change after ON/OFF -+ -+ -+ -+ -+ Wait X seconds after issuing ON/OFF -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after issuing command -+ -+ -+ -+ -+ Sleep X seconds between status calls during a STONITH action -+ -+ -+ -+ -+ Count of attempts to retry power on -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ diff --git a/SOURCES/bz1732766-fence_aliyun-1-add-RAM-role.patch b/SOURCES/bz1732766-fence_aliyun-1-add-RAM-role.patch deleted file mode 100644 index fd636fa..0000000 --- a/SOURCES/bz1732766-fence_aliyun-1-add-RAM-role.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 31548d184c977521dad5e6320c7a74ed732c19bb Mon Sep 17 00:00:00 2001 -From: dongchen126 <51401223+dongchen126@users.noreply.github.com> -Date: Thu, 11 Jul 2019 14:05:58 +0800 -Subject: [PATCH 1/4] Update fence_aliyun.py - -1.Import region provider to enable Alibaba cloud private zone functionality which support API endpoint access from intranet -2.Add ram role functionality to improve security which disable AccessKey ID and Access Key Secret ---- - agents/aliyun/fence_aliyun.py | 28 +++++++++++++++++++++------- - 1 file changed, 21 insertions(+), 7 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index d780e2ab..aea1ea8f 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -15,6 +15,7 @@ - from aliyunsdkecs.request.v20140526.StartInstanceRequest import StartInstanceRequest - from aliyunsdkecs.request.v20140526.StopInstanceRequest import StopInstanceRequest - from aliyunsdkecs.request.v20140526.RebootInstanceRequest import RebootInstanceRequest -+ from aliyunsdkcore.profile import region_provider - except ImportError: - pass - -@@ -121,12 +122,20 @@ def define_new_opts(): - "required" : "0", - "order" : 4 - } -+ all_opt["ram_role"] = { -+ "getopt": "m:", -+ "longopt": "ram-role", -+ "help": "-m, --ram-role=[name] Ram Role", -+ "shortdesc": "Ram Role.", -+ "required": "0", -+ "order": 5 -+ } - - # Main agent method - def main(): - conn = None - -- device_opt = ["port", "no_password", "region", "access_key", "secret_key"] -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "ram_role"] - - atexit.register(atexit_handler) - -@@ -144,13 +153,18 @@ def main(): - - run_delay(options) - -- if "--region" in options and "--access-key" in options and "--secret-key" in options: -+ if "--region" in options: - region = options["--region"] -- access_key = options["--access-key"] -- secret_key = options["--secret-key"] -- conn = client.AcsClient(access_key, secret_key, region) -- -- -+ if "--access-key" in options and "--secret-key" in options: -+ access_key = options["--access-key"] -+ secret_key = options["--secret-key"] -+ conn = client.AcsClient(access_key, secret_key, region) -+ elif "--ram-role" in options: -+ ram_role = options["--ram-role"] -+ role = EcsRamRoleCredential(ram_role) -+ conn = client.AcsClient(region_id=region, credential=role) -+ region_provider.modify_point('Ecs', region, 'ecs.%s.aliyuncs.com' % region) -+ - # Operate the fencing device - result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) - sys.exit(result) - -From 285d29d398bbf8f87da7acfde3f89f83b32fa586 Mon Sep 17 00:00:00 2001 -From: chen dong <51401223+dongchen126@users.noreply.github.com> -Date: Thu, 11 Jul 2019 15:30:10 +0800 -Subject: [PATCH 2/4] Update fence_aliyun.xml - -Add ram role for security -Add region provider for private zone functionality ---- - tests/data/metadata/fence_aliyun.xml | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -index b41d82bf..eecd6f4e 100644 ---- a/tests/data/metadata/fence_aliyun.xml -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -33,6 +33,11 @@ - - Secret Key. - -+ -+ -+ -+ Ram Role. -+ - - - - -From d4de57fdb94eeee483988584086c5690c8967f76 Mon Sep 17 00:00:00 2001 -From: chen dong <51401223+dongchen126@users.noreply.github.com> -Date: Wed, 24 Jul 2019 17:23:48 +0800 -Subject: [PATCH 3/4] Update fence_aliyun.py -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -delet paramater “m” ---- - agents/aliyun/fence_aliyun.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index aea1ea8f..3bc825fe 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -123,9 +123,9 @@ def define_new_opts(): - "order" : 4 - } - all_opt["ram_role"] = { -- "getopt": "m:", -+ "getopt": ":", - "longopt": "ram-role", -- "help": "-m, --ram-role=[name] Ram Role", -+ "help": "--ram-role=[name] Ram Role", - "shortdesc": "Ram Role.", - "required": "0", - "order": 5 - -From 367c17ef4f44b6cce2d10f0a220b55b02d0d631e Mon Sep 17 00:00:00 2001 -From: chen dong <51401223+dongchen126@users.noreply.github.com> -Date: Wed, 24 Jul 2019 17:25:39 +0800 -Subject: [PATCH 4/4] Update fence_aliyun.xml - -delete "m" parameter ---- - tests/data/metadata/fence_aliyun.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -index eecd6f4e..2de3a8aa 100644 ---- a/tests/data/metadata/fence_aliyun.xml -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -34,7 +34,7 @@ - Secret Key. - - -- -+ - - Ram Role. - diff --git a/SOURCES/bz1732766-fence_aliyun-2-import-EcsRamRoleCredential.patch b/SOURCES/bz1732766-fence_aliyun-2-import-EcsRamRoleCredential.patch deleted file mode 100644 index db4416d..0000000 --- a/SOURCES/bz1732766-fence_aliyun-2-import-EcsRamRoleCredential.patch +++ /dev/null @@ -1,39 +0,0 @@ -From b5f1bd2a257ce868b6845d77abdfc741c19d4d3e Mon Sep 17 00:00:00 2001 -From: chen dong <51401223+dongchen126@users.noreply.github.com> -Date: Thu, 11 Jul 2019 15:30:10 +0800 -Subject: [PATCH] Update fence_aliyun.xml -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add ram role for security -Add region provider for private zone functionality - -Update fence_aliyun.py - -delet paramater “m” - -Update fence_aliyun.xml - -delete "m" parameter - -Update fence_aliyun.py - -add "EcsRamRoleCredential" class from aliyun SDK ---- - agents/aliyun/fence_aliyun.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index 3bc825fe..aa0b741d 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -10,7 +10,7 @@ - - try: - from aliyunsdkcore import client -- -+ from aliyunsdkcore.auth.credentials import EcsRamRoleCredential - from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest - from aliyunsdkecs.request.v20140526.StartInstanceRequest import StartInstanceRequest - from aliyunsdkecs.request.v20140526.StopInstanceRequest import StopInstanceRequest diff --git a/SOURCES/bz1732773-fence_vmware_rest-fix-keyerror-suspended-vms.patch b/SOURCES/bz1732773-fence_vmware_rest-fix-keyerror-suspended-vms.patch deleted file mode 100644 index 3c9af83..0000000 --- a/SOURCES/bz1732773-fence_vmware_rest-fix-keyerror-suspended-vms.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 33a638ff624839d7fa2d409479c348abee57763e Mon Sep 17 00:00:00 2001 -From: dwannamaker-onr -Date: Tue, 25 Jun 2019 15:28:00 -0400 -Subject: [PATCH] Fixed issue with SUSPENDED VMs - -If any VMs in the vCenter are suspended, you get a KeyError because that state is not expected. This breaks list and monitor actions. ---- - 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 b544d385..53b4066d 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -8,7 +8,7 @@ - from fencing import * - from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS - --state = {"POWERED_ON": "on", 'POWERED_OFF': "off"} -+state = {"POWERED_ON": "on", 'POWERED_OFF': "off", 'SUSPENDED': "off"} - - def get_power_status(conn, options): - res = send_command(conn, "vcenter/vm?filter.names={}".format(options["--plug"]))["value"] diff --git a/SOURCES/bz1734811-fence_iloX_ssh-monitor-timeout-warning.patch b/SOURCES/bz1734811-fence_iloX_ssh-monitor-timeout-warning.patch deleted file mode 100644 index ba26ed3..0000000 --- a/SOURCES/bz1734811-fence_iloX_ssh-monitor-timeout-warning.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7c1348d53aa8080f2fcfc344a2f4a2372739a62c Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 6 Aug 2019 13:06:13 +0200 -Subject: [PATCH] fence_ilo_ssh*: add timeout warning in metadata/manpage - ---- - agents/ilo_ssh/fence_ilo_ssh.py | 5 ++++- - 5 files changed, 16 insertions(+), 5 deletions(-) - -diff --git a/agents/ilo_ssh/fence_ilo_ssh.py b/agents/ilo_ssh/fence_ilo_ssh.py -index 88f13d17..a27e3418 100644 ---- a/agents/ilo_ssh/fence_ilo_ssh.py -+++ b/agents/ilo_ssh/fence_ilo_ssh.py -@@ -51,7 +51,10 @@ def main(): - docs = {} - docs["shortdesc"] = "Fence agent for HP iLO over SSH" - docs["longdesc"] = "fence_ilo_ssh is a fence agent that connects to iLO device. It logs into \ --device via ssh and reboot a specified outlet. " -+device via ssh and reboot a specified outlet.\ -+\n.P\n\ -+WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent \ -+to avoid this issue." - docs["vendorurl"] = "http://www.hp.com" - docs["symlink"] = [("fence_ilo3_ssh", "Fence agent for HP iLO3 over SSH"), - ("fence_ilo4_ssh", "Fence agent for HP iLO4 over SSH"), diff --git a/SOURCES/bz1748443-fence_zvmip-python3-fixes.patch b/SOURCES/bz1748443-fence_zvmip-python3-fixes.patch deleted file mode 100644 index 90586aa..0000000 --- a/SOURCES/bz1748443-fence_zvmip-python3-fixes.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 2735a4ee096f87fda2e94029db7f059d7be28464 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 5 Sep 2019 10:28:18 +0200 -Subject: [PATCH] fence_zvmip: fix Python 3 issues - ---- - agents/zvm/fence_zvmip.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index 5fbe53e4..e6bb01d1 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -37,7 +37,7 @@ def open_socket(options): - return conn - - def smapi_pack_string(string): -- return struct.pack("!i%ds" % (len(string)), len(string), string) -+ return struct.pack("!i%ds" % (len(string)), len(string), string.encode("UTF-8")) - - def prepare_smapi_command(options, smapi_function, additional_args): - packet_size = 3*INT4 + len(smapi_function) + len(options["--username"]) + len(options["--password"]) -@@ -126,7 +126,7 @@ def get_list_of_images(options, command, data_as_plug): - data = "" - - while True: -- read_data = conn.recv(1024, socket.MSG_WAITALL) -+ read_data = conn.recv(1024, socket.MSG_WAITALL).decode("UTF-8") - data += read_data - if array_len == len(data): - break -@@ -136,9 +136,9 @@ def get_list_of_images(options, command, data_as_plug): - - parsed_len = 0 - while parsed_len < array_len: -- string_len = struct.unpack("!i", data[parsed_len:parsed_len+INT4])[0] -+ string_len = struct.unpack("!i", data[parsed_len:parsed_len+INT4].encode("UTF-8"))[0] - parsed_len += INT4 -- image_name = struct.unpack("!%ds" % (string_len), data[parsed_len:parsed_len+string_len])[0] -+ image_name = struct.unpack("!%ds" % (string_len), data[parsed_len:parsed_len+string_len].encode("UTF-8"))[0].decode("UTF-8") - parsed_len += string_len - images.add(image_name) - diff --git a/SOURCES/bz1750596-fence_scsi-add-readonly-parameter.patch b/SOURCES/bz1750596-fence_scsi-add-readonly-parameter.patch deleted file mode 100644 index dea7876..0000000 --- a/SOURCES/bz1750596-fence_scsi-add-readonly-parameter.patch +++ /dev/null @@ -1,79 +0,0 @@ -From f1f8fe7791d0bf439f7caf1365c371153f9819ff Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 14 May 2020 15:41:52 +0200 -Subject: [PATCH] fence_scsi: add readonly parameter - ---- - agents/scsi/fence_scsi.py | 21 ++++++++++++++++++--- - tests/data/metadata/fence_scsi.xml | 5 +++++ - 2 files changed, 23 insertions(+), 3 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 9b6af556..77817f35 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -150,7 +150,10 @@ def reserve_dev(options, dev): - - def get_reservation_key(options, dev): - reset_dev(options,dev) -- cmd = options["--sg_persist-path"] + " -n -i -r -d " + 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"]: - fail_usage("Cannot get reservation key") -@@ -161,7 +164,10 @@ def get_reservation_key(options, dev): - def get_registration_keys(options, dev, fail=True): - reset_dev(options,dev) - keys = [] -- cmd = options["--sg_persist-path"] + " -n -i -k -d " + dev -+ opts = "" -+ if "--readonly" in options: -+ opts = "-y " -+ cmd = options["--sg_persist-path"] + " -n -i " + opts + "-k -d " + dev - out = run_cmd(options, cmd) - if out["err"]: - fail_usage("Cannot get registration keys", fail) -@@ -342,6 +348,14 @@ def define_new_opts(): - "shortdesc" : "Use the APTPL flag for registrations. This option is only used for the 'on' action.", - "order": 1 - } -+ all_opt["readonly"] = { -+ "getopt" : "", -+ "longopt" : "readonly", -+ "help" : "--readonly Open DEVICE read-only. May be useful with PRIN commands if there are unwanted side effects with the default read-write open.", -+ "required" : "0", -+ "shortdesc" : "Open DEVICE read-only.", -+ "order": 4 -+ } - all_opt["logfile"] = { - "getopt" : ":", - "longopt" : "logfile", -@@ -464,7 +478,8 @@ def main(): - - device_opt = ["no_login", "no_password", "devices", "nodename", "port",\ - "no_port", "key", "aptpl", "fabric_fencing", "on_target", "corosync_cmap_path",\ -- "sg_persist_path", "sg_turs_path", "logfile", "vgs_path", "force_on", "key_value"] -+ "sg_persist_path", "sg_turs_path", "readonly", "logfile", "vgs_path",\ -+ "force_on", "key_value"] - - define_new_opts() - -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index b840f3cf..d0818b0d 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -36,6 +36,11 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - Name of the node to be fenced. The node name is used to generate the key value used for the current operation. This option will be ignored when used with the -k option. - -+ -+ -+ -+ Open DEVICE read-only. -+ - - - diff --git a/SOURCES/bz1751704-fence_mpath-fix-watchdog-trigger-multipath-disconnect.patch b/SOURCES/bz1751704-fence_mpath-fix-watchdog-trigger-multipath-disconnect.patch deleted file mode 100644 index 8c804c2..0000000 --- a/SOURCES/bz1751704-fence_mpath-fix-watchdog-trigger-multipath-disconnect.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 2df8abf25eddc8da71c193ca29f6be51e66b02f0 Mon Sep 17 00:00:00 2001 -From: Hideo Yamauchi -Date: Thu, 12 Sep 2019 08:44:49 +0900 -Subject: [PATCH] High: mpath: Correction of failure detection behavior from - watchdog service. - ---- - agents/mpath/fence_mpath.py | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index e4f59836..b17388eb 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -117,12 +117,14 @@ def get_reservation_key(options, dev): - match = re.search(r"\s+key\s*=\s*0x(\S+)\s+", out["out"], re.IGNORECASE) - return match.group(1) if match else None - --def get_registration_keys(options, dev): -+def get_registration_keys(options, dev, fail=True): - keys = [] - cmd = options["--mpathpersist-path"] + " -i -k -d " + dev - out = run_cmd(options, cmd) - if out["err"]: -- fail_usage("Cannot get registration keys") -+ fail_usage("Cannot get registration keys", fail) -+ if not fail: -+ return [] - for line in out["out"].split("\n"): - match = re.search(r"\s+0x(\S+)\s*", line) - if match: -@@ -183,7 +185,7 @@ def mpath_check(hardreboot=False): - logging.error("No devices found") - return 0 - for dev, key in list(devs.items()): -- if key in get_registration_keys(options, dev): -+ if key in get_registration_keys(options, dev, fail=False): - logging.debug("key " + key + " registered with device " + dev) - return 0 - else: diff --git a/SOURCES/bz1753228-fence_mpath-1-add-plug-parameter-support.patch b/SOURCES/bz1753228-fence_mpath-1-add-plug-parameter-support.patch deleted file mode 100644 index 216f48c..0000000 --- a/SOURCES/bz1753228-fence_mpath-1-add-plug-parameter-support.patch +++ /dev/null @@ -1,197 +0,0 @@ -From d866e11213ebeab8da280b41371a968ae12410bd Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 13 Sep 2019 12:48:46 +0200 -Subject: [PATCH] fence_mpath: use -n/--plug/port parameter to be able to use - pcmk_host_map - ---- - agents/mpath/fence_mpath.py | 63 +++++++++++++++++------------ - tests/data/metadata/fence_mpath.xml | 12 +++++- - 2 files changed, 49 insertions(+), 26 deletions(-) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index e4f59836..dfc5657b 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -16,11 +16,11 @@ def get_status(conn, options): - status = "off" - for dev in options["devices"]: - is_block_device(dev) -- if options["--key"] in get_registration_keys(options, dev): -+ if options["--plug"] in get_registration_keys(options, dev): - status = "on" - else: - logging.debug("No registration for key "\ -- + options["--key"] + " on device " + dev + "\n") -+ + options["--plug"] + " on device " + dev + "\n") - - if options["--action"] == "monitor": - dev_read(options) -@@ -36,10 +36,10 @@ def set_status(conn, options): - is_block_device(dev) - - register_dev(options, dev) -- if options["--key"] not in get_registration_keys(options, dev): -+ if options["--plug"] not in get_registration_keys(options, dev): - count += 1 - logging.debug("Failed to register key "\ -- + options["--key"] + "on device " + dev + "\n") -+ + options["--plug"] + "on device " + dev + "\n") - continue - dev_write(options, dev) - -@@ -48,7 +48,7 @@ def set_status(conn, options): - and get_reservation_key(options, dev) is None: - count += 1 - logging.debug("Failed to create reservation (key="\ -- + options["--key"] + ", device=" + dev + ")\n") -+ + options["--plug"] + ", device=" + dev + ")\n") - - else: - dev_keys = dev_read(options) -@@ -56,14 +56,14 @@ def set_status(conn, options): - for dev in options["devices"]: - is_block_device(dev) - -- if options["--key"] in get_registration_keys(options, dev): -+ if options["--plug"] in get_registration_keys(options, dev): - preempt_abort(options, dev_keys[dev], dev) - - for dev in options["devices"]: -- if options["--key"] in get_registration_keys(options, dev): -+ if options["--plug"] in get_registration_keys(options, dev): - count += 1 - logging.debug("Failed to remove key "\ -- + options["--key"] + " on device " + dev + "\n") -+ + options["--plug"] + " on device " + dev + "\n") - continue - - if not get_reservation_key(options, dev): -@@ -97,16 +97,16 @@ def is_block_device(dev): - - # cancel registration - def preempt_abort(options, host, dev): -- cmd = options["--mpathpersist-path"] + " -o --preempt-abort --prout-type=5 --param-rk=" + host +" --param-sark=" + options["--key"] +" -d " + dev -+ cmd = options["--mpathpersist-path"] + " -o --preempt-abort --prout-type=5 --param-rk=" + host +" --param-sark=" + options["--plug"] +" -d " + dev - return not bool(run_cmd(options, cmd)["err"]) - - def register_dev(options, dev): -- cmd = options["--mpathpersist-path"] + " -o --register --param-sark=" + options["--key"] + " -d " + dev -+ cmd = options["--mpathpersist-path"] + " -o --register --param-sark=" + options["--plug"] + " -d " + dev - #cmd return code != 0 but registration can be successful - return not bool(run_cmd(options, cmd)["err"]) - - def reserve_dev(options, dev): -- cmd = options["--mpathpersist-path"] + " -o --reserv --prout-type=5 --param-rk=" + options["--key"] + " -d " + dev -+ cmd = options["--mpathpersist-path"] + " -o --reserv --prout-type=5 --param-rk=" + options["--plug"] + " -d " + dev - return not bool(run_cmd(options, cmd)["err"]) - - def get_reservation_key(options, dev): -@@ -141,7 +141,7 @@ def dev_write(options, dev): - fail_usage("Failed: Cannot open file \""+ file_path + "\"") - out = store_fh.read() - if not re.search(r"^" + dev + r"\s+", out): -- store_fh.write(dev + "\t" + options["--key"] + "\n") -+ store_fh.write(dev + "\t" + options["--plug"] + "\n") - store_fh.close() - - def dev_read(options, fail=True): -@@ -209,12 +209,9 @@ def define_new_opts(): - all_opt["key"] = { - "getopt" : "k:", - "longopt" : "key", -- "help" : "-k, --key=[key] Key to use for the current operation", -- "required" : "1", -- "shortdesc" : "Key to use for the current operation. This key should be \ --unique to a node and have to be written in /etc/multipath.conf. For the \"on\" action, the key specifies the key use to \ --register the local node. For the \"off\" action, this key specifies the key to \ --be removed from the device(s).", -+ "help" : "-k, --key=[key] Replaced by -n, --plug", -+ "required" : "0", -+ "shortdesc" : "Replaced by -n, --plug", - "order": 1 - } - all_opt["mpathpersist_path"] = { -@@ -240,10 +237,18 @@ def main(): - atexit.register(atexit_handler) - - device_opt = ["no_login", "no_password", "devices", "key", "sudo", \ -- "fabric_fencing", "on_target", "store_path", "mpathpersist_path", "force_on"] -+ "fabric_fencing", "on_target", "store_path", \ -+ "mpathpersist_path", "force_on", "port", "no_port"] - - define_new_opts() - -+ all_opt["port"]["help"] = "Key to use for the current operation" -+ all_opt["port"]["shortdesc"] = "Key to use for the current operation. \ -+This key should be unique to a node and have to be written in \ -+/etc/multipath.conf. For the \"on\" action, the key specifies the key use to \ -+register the local node. For the \"off\" action, this key specifies the key to \ -+be removed from the device(s)." -+ - # fence_mpath_check - if os.path.basename(sys.argv[0]) == "fence_mpath_check": - sys.exit(mpath_check()) -@@ -252,6 +257,17 @@ def main(): - - options = check_input(device_opt, process_input(device_opt), other_conditions=True) - -+ # hack to remove list/list-status actions which are not supported -+ options["device_opt"] = [ o for o in options["device_opt"] if o != "separator" ] -+ -+ # workaround to avoid regressions -+ if "--key" in options: -+ options["--plug"] = options["--key"] -+ del options["--key"] -+ elif options["--action"] in ["off", "on", "reboot", "status"] \ -+ and "--plug" not in options: -+ fail_usage("Failed: You have to enter plug number or machine identification", stop) -+ - docs = {} - docs["shortdesc"] = "Fence agent for multipath persistent reservation" - docs["longdesc"] = "fence_mpath is an I/O fencing agent that uses SCSI-3 \ -@@ -271,16 +287,13 @@ def main(): - run_delay(options) - - # Input control BEGIN -- if not "--key" in options: -- fail_usage("Failed: key is required") -- - if options["--action"] == "validate-all": - sys.exit(0) - -- options["devices"] = options["--devices"].split(",") -- -- if not options["devices"]: -+ if not ("--devices" in options and options["--devices"]): - fail_usage("Failed: No devices found") -+ -+ options["devices"] = options["--devices"].split(",") - # Input control END - - result = fence_action(None, options, set_status, get_status) -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index bbe9ad2b..fe9378df 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -14,9 +14,19 @@ The fence_mpath agent works by having a unique key for each node that has to be - - List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations. - -- -+ - - -+ Replaced by -n, --plug -+ -+ -+ -+ -+ Key to use for the current operation. This key should be unique to a node and have to be written in /etc/multipath.conf. For the "on" action, the key specifies the key use to register the local node. For the "off" action, this key specifies the key to be removed from the device(s). -+ -+ -+ -+ - Key to use for the current operation. This key should be unique to a node and have to be written in /etc/multipath.conf. For the "on" action, the key specifies the key use to register the local node. For the "off" action, this key specifies the key to be removed from the device(s). - - diff --git a/SOURCES/bz1753228-fence_mpath-2-fix-plug-parameter-issues.patch b/SOURCES/bz1753228-fence_mpath-2-fix-plug-parameter-issues.patch deleted file mode 100644 index d668e27..0000000 --- a/SOURCES/bz1753228-fence_mpath-2-fix-plug-parameter-issues.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 868c494d17952eecc6736683c6df04aa9d3a3199 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 20 Sep 2019 12:06:55 +0200 -Subject: [PATCH] fence_mpath: fix fail_usage() issue and a couple of other - minor issues w/the newly added plug/port parameter - ---- - agents/mpath/fence_mpath.py | 12 +++++++----- - tests/data/metadata/fence_mpath.xml | 10 +++++----- - 2 files changed, 12 insertions(+), 10 deletions(-) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index 25aeb052..73517851 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -213,7 +213,7 @@ def define_new_opts(): - "longopt" : "key", - "help" : "-k, --key=[key] Replaced by -n, --plug", - "required" : "0", -- "shortdesc" : "Replaced by -n, --plug", -+ "shortdesc" : "Replaced by port/-n/--plug", - "order": 1 - } - all_opt["mpathpersist_path"] = { -@@ -244,7 +244,8 @@ def main(): - - define_new_opts() - -- all_opt["port"]["help"] = "Key to use for the current operation" -+ all_opt["port"]["required"] = "0" -+ all_opt["port"]["help"] = "-n, --plug=[key] Key to use for the current operation" - all_opt["port"]["shortdesc"] = "Key to use for the current operation. \ - This key should be unique to a node and have to be written in \ - /etc/multipath.conf. For the \"on\" action, the key specifies the key use to \ -@@ -266,9 +267,10 @@ def main(): - if "--key" in options: - options["--plug"] = options["--key"] - del options["--key"] -- elif options["--action"] in ["off", "on", "reboot", "status"] \ -- and "--plug" not in options: -- fail_usage("Failed: You have to enter plug number or machine identification", stop) -+ elif "--help" not in options and options["--action"] in ["off", "on", \ -+ "reboot", "status", "validate-all"] and "--plug" not in options: -+ stop_after_error = False if options["--action"] == "validate-all" else True -+ fail_usage("Failed: You have to enter plug number or machine identification", stop_after_error) - - docs = {} - docs["shortdesc"] = "Fence agent for multipath persistent reservation" -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index fe9378df..f5e60823 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -17,15 +17,15 @@ The fence_mpath agent works by having a unique key for each node that has to be - - - -- Replaced by -n, --plug -+ Replaced by port/-n/--plug - -- -- -+ -+ - - Key to use for the current operation. This key should be unique to a node and have to be written in /etc/multipath.conf. For the "on" action, the key specifies the key use to register the local node. For the "off" action, this key specifies the key to be removed from the device(s). - -- -- -+ -+ - - Key to use for the current operation. This key should be unique to a node and have to be written in /etc/multipath.conf. For the "on" action, the key specifies the key use to register the local node. For the "off" action, this key specifies the key to be removed from the device(s). - diff --git a/SOURCES/bz1760201-fence_compute-fence_evacuate-1-fix-region_name-type.patch b/SOURCES/bz1760201-fence_compute-fence_evacuate-1-fix-region_name-type.patch deleted file mode 100644 index 2d8ba1c..0000000 --- a/SOURCES/bz1760201-fence_compute-fence_evacuate-1-fix-region_name-type.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 32d2aa2cea22bb38fc3eeded1f6682daad097908 Mon Sep 17 00:00:00 2001 -From: Gauvain Pocentek -Date: Tue, 13 Aug 2019 20:11:21 +0200 -Subject: [PATCH] Fix argument parsing for region_name - -The region_name attribute for fence_compute and fence_evacuate is not a boolean -and should expect a string argument. ---- - agents/compute/fence_compute.py | 2 +- - agents/evacuate/fence_evacuate.py | 2 +- - tests/data/metadata/fence_compute.xml | 2 +- - tests/data/metadata/fence_evacuate.xml | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py -index 0e6c8044..a94bdc46 100644 ---- a/agents/compute/fence_compute.py -+++ b/agents/compute/fence_compute.py -@@ -381,7 +381,7 @@ def define_new_opts(): - "order": 1, - } - all_opt["region_name"] = { -- "getopt" : "", -+ "getopt" : ":", - "longopt" : "region-name", - "help" : "--region-name=[region] Region Name", - "required" : "0", -diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py -index 2b9af273..76e78b87 100644 ---- a/agents/evacuate/fence_evacuate.py -+++ b/agents/evacuate/fence_evacuate.py -@@ -318,7 +318,7 @@ def define_new_opts(): - "order": 1, - } - all_opt["region_name"] = { -- "getopt" : "", -+ "getopt" : ":", - "longopt" : "region-name", - "help" : "--region-name=[region] Region Name", - "required" : "0", -diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml -index 1dcbfc54..abc276ca 100644 ---- a/tests/data/metadata/fence_compute.xml -+++ b/tests/data/metadata/fence_compute.xml -@@ -55,7 +55,7 @@ - - - -- -+ - Region Name - - -diff --git a/tests/data/metadata/fence_evacuate.xml b/tests/data/metadata/fence_evacuate.xml -index 4f1f6a58..7decb05c 100644 ---- a/tests/data/metadata/fence_evacuate.xml -+++ b/tests/data/metadata/fence_evacuate.xml -@@ -55,7 +55,7 @@ - - - -- -+ - Region Name - - diff --git a/SOURCES/bz1760201-fence_compute-fence_evacuate-2-fix-project-shortopt.patch b/SOURCES/bz1760201-fence_compute-fence_evacuate-2-fix-project-shortopt.patch deleted file mode 100644 index 1458956..0000000 --- a/SOURCES/bz1760201-fence_compute-fence_evacuate-2-fix-project-shortopt.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 708d0a8e4e45d4f4a6bee67f0a9ebc0ff573e1ff Mon Sep 17 00:00:00 2001 -From: Kumabuchi Kenji -Date: Fri, 25 Oct 2019 16:34:40 +0900 -Subject: [PATCH] fix shortopt in fence-compute / fence_evacuate help messages - -Signed-off-by: Kumabuchi Kenji ---- - agents/compute/fence_compute.py | 2 +- - agents/evacuate/fence_evacuate.py | 2 +- - tests/data/metadata/fence_compute.xml | 4 ++-- - tests/data/metadata/fence_evacuate.xml | 4 ++-- - 4 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py -index c08a9dbe..d0e012e6 100644 ---- a/agents/compute/fence_compute.py -+++ b/agents/compute/fence_compute.py -@@ -365,7 +365,7 @@ def define_new_opts(): - all_opt["project-domain"] = { - "getopt" : "P:", - "longopt" : "project-domain", -- "help" : "-d, --project-domain=[name] Keystone v3 Project Domain", -+ "help" : "-P, --project-domain=[name] Keystone v3 Project Domain", - "required" : "0", - "shortdesc" : "Keystone v3 Project Domain", - "default" : "Default", -diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py -index 76e78b87..60bb130e 100644 ---- a/agents/evacuate/fence_evacuate.py -+++ b/agents/evacuate/fence_evacuate.py -@@ -302,7 +302,7 @@ def define_new_opts(): - all_opt["project-domain"] = { - "getopt" : "P:", - "longopt" : "project-domain", -- "help" : "-d, --project-domain=[name] Keystone v3 Project Domain", -+ "help" : "-P, --project-domain=[name] Keystone v3 Project Domain", - "required" : "0", - "shortdesc" : "Keystone v3 Project Domain", - "default" : "Default", -diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml -index abc276ca..99d56af0 100644 ---- a/tests/data/metadata/fence_compute.xml -+++ b/tests/data/metadata/fence_compute.xml -@@ -74,12 +74,12 @@ - Allow Insecure TLS Requests - - -- -+ - - Keystone v3 Project Domain - - -- -+ - - Keystone v3 Project Domain - -diff --git a/tests/data/metadata/fence_evacuate.xml b/tests/data/metadata/fence_evacuate.xml -index 7decb05c..8c720b80 100644 ---- a/tests/data/metadata/fence_evacuate.xml -+++ b/tests/data/metadata/fence_evacuate.xml -@@ -74,12 +74,12 @@ - Allow Insecure TLS Requests - - -- -+ - - Keystone v3 Project Domain - - -- -+ - - Keystone v3 Project Domain - diff --git a/SOURCES/bz1760213-fence_compute-disable-service-after-force-down.patch b/SOURCES/bz1760213-fence_compute-disable-service-after-force-down.patch deleted file mode 100644 index a8161d1..0000000 --- a/SOURCES/bz1760213-fence_compute-disable-service-after-force-down.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 099758a41bbb153c4a13a89de57cdcb72e1f1ea7 Mon Sep 17 00:00:00 2001 -From: Michele Baldessari -Date: Fri, 11 Oct 2019 10:39:53 +0200 -Subject: [PATCH] fence_compute: Invert the force-down/service disable order - -In OpenStack Train we first observed that IHA was not working via -https://bugzilla.redhat.com/show_bug.cgi?id=1760213 - -The reason for this is that nova has made the disabling of the compute -service depend on the compute node being up via: -https://review.opendev.org/#/c/654596/ - -By first calling force-down, the subsequence service-disable API -call won't wait for the reachability of the compute node any -longer and the whole operation has the same outcome. - -Tested this on an OSP Train environment and we correctly -got Instance HA working again and we observed the VMs being -restarted on the available compute nodes. - -Co-Authored-By: Luca Miccini ---- - agents/compute/fence_compute.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py -index a94bdc46..c08a9dbe 100644 ---- a/agents/compute/fence_compute.py -+++ b/agents/compute/fence_compute.py -@@ -117,11 +117,11 @@ def set_power_status_off(connection, options): - if status in [ "off" ]: - return - -- connection.services.disable(options["--plug"], 'nova-compute') - try: - # Until 2.53 - connection.services.force_down( - options["--plug"], "nova-compute", force_down=True) -+ connection.services.disable(options["--plug"], 'nova-compute') - except Exception as e: - # Something went wrong when we tried to force the host down. - # That could come from either an incompatible API version diff --git a/SOURCES/bz1760224-fence_vmware_rest-improve-logging.patch b/SOURCES/bz1760224-fence_vmware_rest-improve-logging.patch deleted file mode 100644 index 9b39fa6..0000000 --- a/SOURCES/bz1760224-fence_vmware_rest-improve-logging.patch +++ /dev/null @@ -1,61 +0,0 @@ -From a128c296c18faa1b58c3f067370bde64e7c49dae Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 9 Oct 2019 14:35:48 +0200 -Subject: [PATCH] fence_vmware_rest: improve logging - ---- - agents/vmware_rest/fence_vmware_rest.py | 23 +++++++++++++++++++---- - 1 file changed, 19 insertions(+), 4 deletions(-) - -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index 53b4066d..cd99b4ac 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -11,7 +11,11 @@ - state = {"POWERED_ON": "on", 'POWERED_OFF': "off", 'SUSPENDED': "off"} - - def get_power_status(conn, options): -- res = send_command(conn, "vcenter/vm?filter.names={}".format(options["--plug"]))["value"] -+ try: -+ res = send_command(conn, "vcenter/vm?filter.names={}".format(options["--plug"]))["value"] -+ except Exception as e: -+ logging.debug("Failed: {}".format(e)) -+ fail(EC_STATUS) - - if len(res) == 0: - fail(EC_STATUS) -@@ -28,12 +32,20 @@ def set_power_status(conn, options): - "off" : "stop" - }[options["--action"]] - -- send_command(conn, "vcenter/vm/{}/power/{}".format(options["id"], action), "POST") -+ try: -+ send_command(conn, "vcenter/vm/{}/power/{}".format(options["id"], action), "POST") -+ except Exception as e: -+ logging.debug("Failed: {}".format(e)) -+ fail(EC_STATUS) - - def get_list(conn, options): - outlets = {} - -- res = send_command(conn, "vcenter/vm") -+ try: -+ res = send_command(conn, "vcenter/vm") -+ except: -+ logging.debug("Failed: {}".format(e)) -+ fail(EC_STATUS) - - for r in res["value"]: - outlets[r["name"]] = ("", state[r["power_state"]]) -@@ -87,7 +99,10 @@ def connect(opt): - return conn - - def disconnect(conn): -- send_command(conn, "com/vmware/cis/session", "DELETE") -+ try: -+ send_command(conn, "com/vmware/cis/session", "DELETE") -+ except Exception as e: -+ logging.debug("Failed: {}".format(e)) - conn.close() - - def send_command(conn, command, method="GET"): diff --git a/SOURCES/bz1763674-fence_rhevm-add-cookie-support.patch b/SOURCES/bz1763674-fence_rhevm-add-cookie-support.patch deleted file mode 100644 index d4f7be9..0000000 --- a/SOURCES/bz1763674-fence_rhevm-add-cookie-support.patch +++ /dev/null @@ -1,109 +0,0 @@ -From b885e0f65af626154096a49554e9765e18bfbbd9 Mon Sep 17 00:00:00 2001 -From: Frank Toth -Date: Wed, 16 Oct 2019 13:58:50 +0800 -Subject: [PATCH 1/3] Added cookie file management to properly reuse session - and do not create new one every time. - ---- - agents/rhevm/fence_rhevm.py | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index 9e4650cd..defa35e6 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -117,7 +117,12 @@ def send_command(opt, command, method="GET"): - conn.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC) - conn.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"]) - if "--use-cookies" in opt: -- conn.setopt(pycurl.COOKIEFILE, "") -+ if "--cookie-file" in opt: -+ cookie_file = opt["--cookie-file"] -+ else: -+ cookie_file = "/tmp/fence_rhevm_" + opt["--ip"] + "_" + opt["--username"] + "_cookie.dat" -+ conn.setopt(pycurl.COOKIEFILE, cookie_file) -+ conn.setopt(pycurl.COOKIEJAR, cookie_file) - - conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) - if "--ssl" in opt or "--ssl-secure" in opt: -@@ -166,6 +171,14 @@ def define_new_opts(): - "required" : "0", - "shortdesc" : "Reuse cookies for authentication", - "order" : 1} -+ all_opt["cookie_file"] = { -+ "getopt" : ":", -+ "longopt" : "cookie-file", -+ "help" : "--cookie-file Path to cookie file for authentication\n" -+ "\t\t\t\t (Default: /tmp/fence_rhevm_ip_username_cookie.dat)", -+ "required" : "0", -+ "shortdesc" : "Path to cookie file for authentication", -+ "order" : 2} - all_opt["api_version"] = { - "getopt" : ":", - "longopt" : "api-version", - -From 874344acbfee5f774b320e384a46e1ce953a34ce Mon Sep 17 00:00:00 2001 -From: Frank Toth -Date: Wed, 16 Oct 2019 23:41:50 +0800 -Subject: [PATCH 2/3] Added cookie_file to device_opt array. Use - tempfile.gettempdir() to get the TMP dir instead of hardcoded /tmp - ---- - agents/rhevm/fence_rhevm.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index defa35e6..25aecbe5 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -4,6 +4,7 @@ - import pycurl, io - import logging - import atexit -+import tempfile - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * - from fencing import fail, EC_FETCH_VM_UUID, run_delay -@@ -120,7 +121,7 @@ def send_command(opt, command, method="GET"): - if "--cookie-file" in opt: - cookie_file = opt["--cookie-file"] - else: -- cookie_file = "/tmp/fence_rhevm_" + opt["--ip"] + "_" + opt["--username"] + "_cookie.dat" -+ cookie_file = tempfile.gettempdir() + "/fence_rhevm_" + opt["--ip"] + "_" + opt["--username"] + "_cookie.dat" - conn.setopt(pycurl.COOKIEFILE, cookie_file) - conn.setopt(pycurl.COOKIEJAR, cookie_file) - -@@ -215,6 +216,7 @@ def main(): - "web", - "port", - "use_cookies", -+ "cookie_file", - "api_version", - "api_path", - "disable_http_filter", - -From 196513cfc0edfd28f483a00b4adfa230b666a47d Mon Sep 17 00:00:00 2001 -From: Frank Toth -Date: Fri, 18 Oct 2019 05:16:18 +0200 -Subject: [PATCH 3/3] After 'make xml-upload' - ---- - tests/data/metadata/fence_rhevm.xml | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml -index c56cf64b..2b6b02b2 100644 ---- a/tests/data/metadata/fence_rhevm.xml -+++ b/tests/data/metadata/fence_rhevm.xml -@@ -103,6 +103,11 @@ - - Version of RHEV API (default: auto) - -+ -+ -+ -+ Path to cookie file for authentication -+ - - - The path part of the API URL diff --git a/SOURCES/bz1769783-fencing-improve-stdin-quote-parsing.patch b/SOURCES/bz1769783-fencing-improve-stdin-quote-parsing.patch deleted file mode 100644 index adf0754..0000000 --- a/SOURCES/bz1769783-fencing-improve-stdin-quote-parsing.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 82626dbdb12519e95a5df70ae6ae21bc17112f43 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 13 Feb 2019 13:28:25 +0100 -Subject: [PATCH] fencing: improve stdin parse function - -- Remove quotes around stdin parameters for consistency with CLI -parameters and to be able to quote number and time parameters ---- - lib/fencing.py.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 287cd01f..8cd0a813 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -1389,6 +1389,7 @@ def _parse_input_stdin(avail_opt): - - (name, value) = (line + "=").split("=", 1) - value = value[:-1] -+ value = re.sub("^\"(.*)\"$", "\\1", value) - - if name.replace("-", "_") in mapping_longopt_names: - name = mapping_longopt_names[name.replace("-", "_")] diff --git a/SOURCES/bz1771594-1-fencing-inetX_only-SSH-fence_zvmip.patch b/SOURCES/bz1771594-1-fencing-inetX_only-SSH-fence_zvmip.patch deleted file mode 100644 index 6ee722d..0000000 --- a/SOURCES/bz1771594-1-fencing-inetX_only-SSH-fence_zvmip.patch +++ /dev/null @@ -1,756 +0,0 @@ -From cecf3b3edeccbac6293b95073b0c0ad4f02a8652 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 12 Nov 2019 17:25:57 +0100 -Subject: [PATCH] fencing: only use inetX_only parameters for SSH based agents - and fence_zvmip, and fixed syntax issue for Gawk v5+ - ---- - agents/zvm/fence_zvmip.py | 2 +- - lib/fencing.py.py | 4 ++-- - make/agentpycheck.mk | 2 +- - tests/data/metadata/fence_amt.xml | 10 ---------- - tests/data/metadata/fence_amt_ws.xml | 10 ---------- - tests/data/metadata/fence_apc_snmp.xml | 10 ---------- - tests/data/metadata/fence_cisco_mds.xml | 10 ---------- - tests/data/metadata/fence_cisco_ucs.xml | 10 ---------- - tests/data/metadata/fence_docker.xml | 10 ---------- - tests/data/metadata/fence_drac.xml | 10 ---------- - tests/data/metadata/fence_eaton_snmp.xml | 10 ---------- - tests/data/metadata/fence_emerson.xml | 10 ---------- - tests/data/metadata/fence_eps.xml | 10 ---------- - tests/data/metadata/fence_ibmblade.xml | 10 ---------- - tests/data/metadata/fence_idrac.xml | 10 ---------- - tests/data/metadata/fence_ifmib.xml | 10 ---------- - tests/data/metadata/fence_ilo.xml | 10 ---------- - tests/data/metadata/fence_ilo2.xml | 10 ---------- - tests/data/metadata/fence_ilo3.xml | 10 ---------- - tests/data/metadata/fence_ilo4.xml | 10 ---------- - tests/data/metadata/fence_imm.xml | 10 ---------- - tests/data/metadata/fence_intelmodular.xml | 10 ---------- - tests/data/metadata/fence_ipdu.xml | 10 ---------- - tests/data/metadata/fence_ipmilan.xml | 10 ---------- - tests/data/metadata/fence_netio.xml | 10 ---------- - tests/data/metadata/fence_powerman.xml | 10 ---------- - tests/data/metadata/fence_pve.xml | 10 ---------- - tests/data/metadata/fence_raritan.xml | 10 ---------- - tests/data/metadata/fence_redfish.xml | 10 ---------- - tests/data/metadata/fence_rhevm.xml | 10 ---------- - tests/data/metadata/fence_sanbox2.xml | 10 ---------- - tests/data/metadata/fence_tripplite_snmp.xml | 10 ---------- - tests/data/metadata/fence_vmware_rest.xml | 10 ---------- - tests/data/metadata/fence_vmware_soap.xml | 10 ---------- - tests/data/metadata/fence_vmware_vcloud.xml | 10 ---------- - 36 files changed, 4 insertions(+), 334 deletions(-) - -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index e6bb01d1..5b272bb9 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -146,7 +146,7 @@ def get_list_of_images(options, command, data_as_plug): - return (return_code, reason_code, images) - - def main(): -- device_opt = ["ipaddr", "login", "passwd", "port", "method", "missing_as_off"] -+ device_opt = ["ipaddr", "login", "passwd", "port", "method", "missing_as_off", "inet4_only", "inet6_only"] - - atexit.register(atexit_handler) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 2a0b0b91..4b54aa7c 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -459,9 +459,9 @@ - "delay", "quiet"], - "passwd" : ["passwd_script"], - "sudo" : ["sudo_path"], -- "secure" : ["identity_file", "ssh_options", "ssh_path"], -+ "secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"], - "telnet" : ["telnet_path"], -- "ipaddr" : ["ipport", "inet4_only", "inet6_only"], -+ "ipaddr" : ["ipport"], - "port" : ["separator"], - "ssl" : ["ssl_secure", "ssl_insecure", "gnutlscli_path"], - "snmp" : ["snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \ -diff --git a/make/agentpycheck.mk b/make/agentpycheck.mk -index 58122c65..13482bf2 100644 ---- a/make/agentpycheck.mk -+++ b/make/agentpycheck.mk -@@ -1,5 +1,5 @@ - DATADIR:=$(abs_top_srcdir)/tests/data/metadata --AWK_VAL='BEGIN {store=-1} /name=\".*_path\"/ {store=2} {if (store!=0) {print}; store--}' -+AWK_VAL='BEGIN {store=-1} /name=".*_path"/ {store=2} {if (store!=0) {print}; store--}' - - TEST_TARGET=$(filter-out $(TEST_TARGET_SKIP),$(TARGET)) - -diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml -index c1e24db9..5f0adc98 100644 ---- a/tests/data/metadata/fence_amt.xml -+++ b/tests/data/metadata/fence_amt.xml -@@ -19,16 +19,6 @@ - - Change the default boot behavior of the machine. - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_amt_ws.xml b/tests/data/metadata/fence_amt_ws.xml -index 07c22db3..86f36f6c 100644 ---- a/tests/data/metadata/fence_amt_ws.xml -+++ b/tests/data/metadata/fence_amt_ws.xml -@@ -19,16 +19,6 @@ - - Change the default boot behavior of the machine. - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_apc_snmp.xml b/tests/data/metadata/fence_apc_snmp.xml -index 26661d6a..7f1c616c 100644 ---- a/tests/data/metadata/fence_apc_snmp.xml -+++ b/tests/data/metadata/fence_apc_snmp.xml -@@ -14,16 +14,6 @@ - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml -index 1917595e..15d7798c 100644 ---- a/tests/data/metadata/fence_cisco_mds.xml -+++ b/tests/data/metadata/fence_cisco_mds.xml -@@ -13,16 +13,6 @@ - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml -index 40581da7..848e72f8 100644 ---- a/tests/data/metadata/fence_cisco_ucs.xml -+++ b/tests/data/metadata/fence_cisco_ucs.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml -index fdd6324c..3285314c 100644 ---- a/tests/data/metadata/fence_docker.xml -+++ b/tests/data/metadata/fence_docker.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml -index 405d660a..2184ee0c 100644 ---- a/tests/data/metadata/fence_drac.xml -+++ b/tests/data/metadata/fence_drac.xml -@@ -18,16 +18,6 @@ - - Force Python regex for command prompt - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_eaton_snmp.xml b/tests/data/metadata/fence_eaton_snmp.xml -index 33957ed1..3dd92dd2 100644 ---- a/tests/data/metadata/fence_eaton_snmp.xml -+++ b/tests/data/metadata/fence_eaton_snmp.xml -@@ -13,16 +13,6 @@ - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml -index 87205c1b..f6886469 100644 ---- a/tests/data/metadata/fence_emerson.xml -+++ b/tests/data/metadata/fence_emerson.xml -@@ -13,16 +13,6 @@ - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml -index 68d8fb69..26e75477 100644 ---- a/tests/data/metadata/fence_eps.xml -+++ b/tests/data/metadata/fence_eps.xml -@@ -15,16 +15,6 @@ Agent basically works by connecting to hidden page and pass appropriate argument - - Name of hidden page - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ibmblade.xml b/tests/data/metadata/fence_ibmblade.xml -index eff551f6..5084b3a0 100644 ---- a/tests/data/metadata/fence_ibmblade.xml -+++ b/tests/data/metadata/fence_ibmblade.xml -@@ -13,16 +13,6 @@ - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml -index f4588b35..55d9ced3 100644 ---- a/tests/data/metadata/fence_idrac.xml -+++ b/tests/data/metadata/fence_idrac.xml -@@ -32,16 +32,6 @@ - - Hexadecimal-encoded Kg key for IPMIv2 authentication - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ifmib.xml b/tests/data/metadata/fence_ifmib.xml -index b5f3b1d4..c07a6e1f 100644 ---- a/tests/data/metadata/fence_ifmib.xml -+++ b/tests/data/metadata/fence_ifmib.xml -@@ -15,16 +15,6 @@ It was written with managed ethernet switches in mind, in order to fence iSCSI S - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml -index eb2e7a72..44b3c43a 100644 ---- a/tests/data/metadata/fence_ilo.xml -+++ b/tests/data/metadata/fence_ilo.xml -@@ -9,16 +9,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml -index b14aa2fb..e9cae6d2 100644 ---- a/tests/data/metadata/fence_ilo2.xml -+++ b/tests/data/metadata/fence_ilo2.xml -@@ -9,16 +9,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml -index deaeaaf0..2a99e0a4 100644 ---- a/tests/data/metadata/fence_ilo3.xml -+++ b/tests/data/metadata/fence_ilo3.xml -@@ -32,16 +32,6 @@ - - Hexadecimal-encoded Kg key for IPMIv2 authentication - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml -index bbf0833b..68790266 100644 ---- a/tests/data/metadata/fence_ilo4.xml -+++ b/tests/data/metadata/fence_ilo4.xml -@@ -32,16 +32,6 @@ - - Hexadecimal-encoded Kg key for IPMIv2 authentication - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml -index 22cb54e7..e22e4723 100644 ---- a/tests/data/metadata/fence_imm.xml -+++ b/tests/data/metadata/fence_imm.xml -@@ -32,16 +32,6 @@ - - Hexadecimal-encoded Kg key for IPMIv2 authentication - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_intelmodular.xml b/tests/data/metadata/fence_intelmodular.xml -index 4f2e8c49..5e0d3b19 100644 ---- a/tests/data/metadata/fence_intelmodular.xml -+++ b/tests/data/metadata/fence_intelmodular.xml -@@ -15,16 +15,6 @@ Note: Since firmware update version 2.7, SNMP v2 write support is removed, and r - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ipdu.xml b/tests/data/metadata/fence_ipdu.xml -index 0b615852..546e372c 100644 ---- a/tests/data/metadata/fence_ipdu.xml -+++ b/tests/data/metadata/fence_ipdu.xml -@@ -13,16 +13,6 @@ - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml -index b9ce66f8..3e13d288 100644 ---- a/tests/data/metadata/fence_ipmilan.xml -+++ b/tests/data/metadata/fence_ipmilan.xml -@@ -32,16 +32,6 @@ - - Hexadecimal-encoded Kg key for IPMIv2 authentication - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_netio.xml b/tests/data/metadata/fence_netio.xml -index e6350ed4..79d27af3 100644 ---- a/tests/data/metadata/fence_netio.xml -+++ b/tests/data/metadata/fence_netio.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_powerman.xml b/tests/data/metadata/fence_powerman.xml -index f0499d86..ce72e002 100644 ---- a/tests/data/metadata/fence_powerman.xml -+++ b/tests/data/metadata/fence_powerman.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_pve.xml b/tests/data/metadata/fence_pve.xml -index b727a7e8..5d744903 100644 ---- a/tests/data/metadata/fence_pve.xml -+++ b/tests/data/metadata/fence_pve.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_raritan.xml b/tests/data/metadata/fence_raritan.xml -index c75783fd..565eebc7 100644 ---- a/tests/data/metadata/fence_raritan.xml -+++ b/tests/data/metadata/fence_raritan.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml -index e1c18584..91b483b7 100644 ---- a/tests/data/metadata/fence_redfish.xml -+++ b/tests/data/metadata/fence_redfish.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml -index 2b6b02b2..73c9906f 100644 ---- a/tests/data/metadata/fence_rhevm.xml -+++ b/tests/data/metadata/fence_rhevm.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_sanbox2.xml b/tests/data/metadata/fence_sanbox2.xml -index 9832841e..7e20c8ce 100644 ---- a/tests/data/metadata/fence_sanbox2.xml -+++ b/tests/data/metadata/fence_sanbox2.xml -@@ -18,16 +18,6 @@ - - Force Python regex for command prompt - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_tripplite_snmp.xml b/tests/data/metadata/fence_tripplite_snmp.xml -index 22d3db5d..d3769133 100644 ---- a/tests/data/metadata/fence_tripplite_snmp.xml -+++ b/tests/data/metadata/fence_tripplite_snmp.xml -@@ -14,16 +14,6 @@ - - Set the community string - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_vmware_rest.xml b/tests/data/metadata/fence_vmware_rest.xml -index 1e1f790f..5b497a6a 100644 ---- a/tests/data/metadata/fence_vmware_rest.xml -+++ b/tests/data/metadata/fence_vmware_rest.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml -index 46d29116..da6a1002 100644 ---- a/tests/data/metadata/fence_vmware_soap.xml -+++ b/tests/data/metadata/fence_vmware_soap.xml -@@ -10,16 +10,6 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - -diff --git a/tests/data/metadata/fence_vmware_vcloud.xml b/tests/data/metadata/fence_vmware_vcloud.xml -index 69269a2d..505eaf2b 100644 ---- a/tests/data/metadata/fence_vmware_vcloud.xml -+++ b/tests/data/metadata/fence_vmware_vcloud.xml -@@ -8,16 +8,6 @@ - - Fencing action - -- -- -- -- Forces agent to use IPv4 addresses only -- -- -- -- -- Forces agent to use IPv6 addresses only -- - - - diff --git a/SOURCES/bz1771594-2-fence_redfish-fence_vmware_soap-suppress-warning.patch b/SOURCES/bz1771594-2-fence_redfish-fence_vmware_soap-suppress-warning.patch deleted file mode 100644 index 889c6f9..0000000 --- a/SOURCES/bz1771594-2-fence_redfish-fence_vmware_soap-suppress-warning.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 559771f2c5a638f7e14ec9c0ef1068c86ee9d40e Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 26 Nov 2019 14:09:14 +0100 -Subject: [PATCH] fence_redfish/fence_vmware_soap: suppress warnings correctly - with new python-requests - -python-requests doesnt suppress warnings anymore, so it needs to be done in urllib3: https://stackoverflow.com/questions/27981545/suppress-insecurerequestwarning-unverified-https-request-is-being-made-in-pytho/28002687#28002687 ---- - agents/redfish/fence_redfish.py | 4 ++-- - agents/vmware_soap/fence_vmware_soap.py | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 390a4827..c7c6492c 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -12,7 +12,6 @@ - import atexit - sys.path.append("@FENCEAGENTSLIBDIR@") - --from requests.packages.urllib3.exceptions import InsecureRequestWarning - from fencing import * - from fencing import fail_usage, run_delay - -@@ -143,7 +142,8 @@ def main(): - - # Disable insecure-certificate-warning message - if "--ssl-insecure" in opt: -- requests.packages.urllib3.disable_warnings(InsecureRequestWarning) -+ import urllib3 -+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) - - # backwards compatibility for : - if options["--ip"].count(":") == 1: -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index dd1a4ed6..53e8d8f4 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -37,10 +37,10 @@ def soap_login(options): - if "--ssl" in options or "--ssl-secure" in options or "--ssl-insecure" in options: - if "--ssl-insecure" in options: - import ssl -- from requests.packages.urllib3.exceptions import InsecureRequestWarning -+ import urllib3 - if hasattr(ssl, '_create_unverified_context'): - ssl._create_default_https_context = ssl._create_unverified_context -- requests.packages.urllib3.disable_warnings(InsecureRequestWarning) -+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) - verify = False - else: - verify = True diff --git a/SOURCES/bz1773890-fence_scsi-add-hash-key-value-support.patch b/SOURCES/bz1773890-fence_scsi-add-hash-key-value-support.patch deleted file mode 100644 index b8cf248..0000000 --- a/SOURCES/bz1773890-fence_scsi-add-hash-key-value-support.patch +++ /dev/null @@ -1,237 +0,0 @@ -From baf8d524e89d7f6c716e8241a12d8135debadfcc Mon Sep 17 00:00:00 2001 -From: Ondrej Famera -Date: Sun, 20 Oct 2019 20:13:40 +0900 -Subject: [PATCH 1/4] add new method for autogenerating SCSI key - -this methos generates second part of SCSI key based on hash of cluster -node name instead of currently used ID based approach which can brake if -the nodes get removed from cluster but whole cluster is not restarted -because the IDs changes. With hash approach hashes stays same. -Note that there is theoretical risk that hashes could colide. ---- - agents/scsi/fence_scsi.py | 32 ++++++++++++++++++++++++++++-- - tests/data/metadata/fence_scsi.xml | 5 +++++ - 2 files changed, 35 insertions(+), 2 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 5580e08b..4cc9b66c 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -202,9 +202,20 @@ def get_node_id(options): - - return match.group(1) if match else fail_usage("Failed: unable to parse output of corosync-cmapctl or node does not exist") - -+def get_node_hash(options): -+ try: -+ return hashlib.md5(options["--plug"].encode('ascii')).hexdigest() -+ except ValueError: -+ # FIPS requires usedforsecurity=False and might not be -+ # available on all distros: https://bugs.python.org/issue9216 -+ return hashlib.md5(options["--plug"].encode('ascii'), usedforsecurity=False).hexdigest() -+ - - def generate_key(options): -- return "%.4s%.4d" % (get_cluster_id(options), int(get_node_id(options))) -+ if options["--key_value"] == "hash": -+ return "%.4s%.4s" % (get_cluster_id(options), get_node_hash(options)) -+ else: -+ return "%.4s%.4d" % (get_cluster_id(options), int(get_node_id(options))) - - - # save node key to file -@@ -375,6 +386,19 @@ def define_new_opts(): - "default" : "@VGS_PATH@", - "order": 300 - } -+ all_opt["key_value"] = { -+ "getopt" : ":", -+ "longopt" : "key_value", -+ "help" : "--key_value= SCSI key node generation method", -+ "required" : "0", -+ "shortdesc" : "Method used to generate the SCSI key. \"id\" (default) \ -+uses the positional ID from \"corosync-cmactl nodelist\" output which can get inconsistent \ -+when nodes are removed from cluster without full cluster restart. \"hash\" uses part of hash \ -+made out of node names which is not affected over time but there is theoretical chance that \ -+hashes can collide as size of SCSI key is quite limited.", -+ "default" : "id", -+ "order": 300 -+ } - - - def scsi_check_get_options(options): -@@ -440,7 +464,7 @@ def main(): - - device_opt = ["no_login", "no_password", "devices", "nodename", "port",\ - "no_port", "key", "aptpl", "fabric_fencing", "on_target", "corosync_cmap_path",\ -- "sg_persist_path", "sg_turs_path", "logfile", "vgs_path", "force_on"] -+ "sg_persist_path", "sg_turs_path", "logfile", "vgs_path", "force_on", "key_value"] - - define_new_opts() - -@@ -517,6 +541,10 @@ def main(): - if options["--key"] == "0" or not options["--key"]: - fail_usage("Failed: key cannot be 0", stop_after_error) - -+ if "--key_value" in options\ -+ and (options["--key_value"] != "id" and options["--key_value"] != "hash"): -+ fail_usage("Failed: key_value has to be 'id' or 'hash'", stop_after_error) -+ - if options["--action"] == "validate-all": - sys.exit(0) - -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index b8cdabd1..56c6224d 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -105,6 +105,11 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - Path to corosync-cmapctl binary - -+ -+ -+ -+ Method used to generate the SCSI key. "id" (default) uses the positional ID from "corosync-cmactl nodelist" output which can get inconsistent when nodes are removed from cluster without full cluster restart. "hash" uses part of hash made out of node names which is not affected over time but there is theoretical chance that hashes can collide as size of SCSI key is quite limited. -+ - - - Path to sg_persist binary - -From ee7a5ea238b4b3312384e4cfd9edd392c311d17a Mon Sep 17 00:00:00 2001 -From: Ondrej Famera -Date: Fri, 1 Nov 2019 13:16:58 +0900 -Subject: [PATCH 2/4] rename 'key_value' to 'key-value' for manual invokation - ---- - agents/scsi/fence_scsi.py | 12 ++++++------ - tests/data/metadata/fence_scsi.xml | 2 +- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 4cc9b66c..7d515e16 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -212,7 +212,7 @@ def get_node_hash(options): - - - def generate_key(options): -- if options["--key_value"] == "hash": -+ if options["--key-value"] == "hash": - return "%.4s%.4s" % (get_cluster_id(options), get_node_hash(options)) - else: - return "%.4s%.4d" % (get_cluster_id(options), int(get_node_id(options))) -@@ -388,8 +388,8 @@ def define_new_opts(): - } - all_opt["key_value"] = { - "getopt" : ":", -- "longopt" : "key_value", -- "help" : "--key_value= SCSI key node generation method", -+ "longopt" : "key-value", -+ "help" : "--key-value= SCSI key node generation method", - "required" : "0", - "shortdesc" : "Method used to generate the SCSI key. \"id\" (default) \ - uses the positional ID from \"corosync-cmactl nodelist\" output which can get inconsistent \ -@@ -541,9 +541,9 @@ def main(): - if options["--key"] == "0" or not options["--key"]: - fail_usage("Failed: key cannot be 0", stop_after_error) - -- if "--key_value" in options\ -- and (options["--key_value"] != "id" and options["--key_value"] != "hash"): -- fail_usage("Failed: key_value has to be 'id' or 'hash'", stop_after_error) -+ if "--key-value" in options\ -+ and (options["--key-value"] != "id" and options["--key-value"] != "hash"): -+ fail_usage("Failed: key-value has to be 'id' or 'hash'", stop_after_error) - - if options["--action"] == "validate-all": - sys.exit(0) -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index 56c6224d..72800688 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -106,7 +106,7 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - Path to corosync-cmapctl binary - - -- -+ - - Method used to generate the SCSI key. "id" (default) uses the positional ID from "corosync-cmactl nodelist" output which can get inconsistent when nodes are removed from cluster without full cluster restart. "hash" uses part of hash made out of node names which is not affected over time but there is theoretical chance that hashes can collide as size of SCSI key is quite limited. - - -From 58105710876bd6a2220f92ea37d621991d68bf4b Mon Sep 17 00:00:00 2001 -From: Ondrej Famera -Date: Fri, 1 Nov 2019 13:20:17 +0900 -Subject: [PATCH 3/4] expand longdesc of fence_scsi to describe the impact of - key_value option - ---- - agents/scsi/fence_scsi.py | 6 +++++- - tests/data/metadata/fence_scsi.xml | 2 +- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 7d515e16..4b2bfe20 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -493,7 +493,11 @@ def main(): - devices must support SCSI-3 persistent reservations (SPC-3 or greater) as \ - well as the \"preempt-and-abort\" subcommand.\nThe fence_scsi agent works by \ - having each node in the cluster register a unique key with the SCSI \ --device(s). Once registered, a single node will become the reservation holder \ -+device(s). Reservation key is generated from \"node id\" (default) or from \ -+\"node name hash\" (recommended) by adjusting \"key_value\" option. \ -+Using hash is recommended to prevent issues when removing nodes \ -+from cluster without full cluster restart. \ -+Once registered, a single node will become the reservation holder \ - by creating a \"write exclusive, registrants only\" reservation on the \ - device(s). The result is that only registered nodes may write to the \ - device(s). When a node failure occurs, the fence_scsi agent will remove the \ -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index 72800688..6f914823 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -1,7 +1,7 @@ - - - fence_scsi is an I/O fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. These devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. --The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. -+The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Reservation key is generated from "node id" (default) or from "node name hash" (recommended) by adjusting "key_value" option. Using hash is recommended to prevent issues when removing nodes from cluster without full cluster restart. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. - - When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it failing. - - -From 6a73919ab70d76fcf4ce19b4fd00e182e41f33b5 Mon Sep 17 00:00:00 2001 -From: Ondrej Famera -Date: Sat, 16 Nov 2019 17:03:42 +0900 -Subject: [PATCH 4/4] emphasize the recommendation to use 'hash' over 'id' - ---- - agents/scsi/fence_scsi.py | 2 +- - tests/data/metadata/fence_scsi.xml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 4b2bfe20..9b6af556 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -494,7 +494,7 @@ def main(): - well as the \"preempt-and-abort\" subcommand.\nThe fence_scsi agent works by \ - having each node in the cluster register a unique key with the SCSI \ - device(s). Reservation key is generated from \"node id\" (default) or from \ --\"node name hash\" (recommended) by adjusting \"key_value\" option. \ -+\"node name hash\" (RECOMMENDED) by adjusting \"key_value\" option. \ - Using hash is recommended to prevent issues when removing nodes \ - from cluster without full cluster restart. \ - Once registered, a single node will become the reservation holder \ -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index 6f914823..b840f3cf 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -1,7 +1,7 @@ - - - fence_scsi is an I/O fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. These devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. --The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Reservation key is generated from "node id" (default) or from "node name hash" (recommended) by adjusting "key_value" option. Using hash is recommended to prevent issues when removing nodes from cluster without full cluster restart. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. -+The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Reservation key is generated from "node id" (default) or from "node name hash" (RECOMMENDED) by adjusting "key_value" option. Using hash is recommended to prevent issues when removing nodes from cluster without full cluster restart. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. - - When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it failing. - diff --git a/SOURCES/bz1774458-fence_sbd-stderr-support.patch b/SOURCES/bz1774458-fence_sbd-stderr-support.patch deleted file mode 100644 index 59a6794..0000000 --- a/SOURCES/bz1774458-fence_sbd-stderr-support.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f37e5ba0b6c8dab527f947bfc602d50b953a7d08 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 17 Sep 2019 15:15:06 +0200 -Subject: [PATCH] fence_sbd: support errors on stderr - ---- - agents/sbd/fence_sbd.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/agents/sbd/fence_sbd.py b/agents/sbd/fence_sbd.py -index b1df70ac..3ae8df6e 100644 ---- a/agents/sbd/fence_sbd.py -+++ b/agents/sbd/fence_sbd.py -@@ -8,6 +8,7 @@ - from fencing import fail_usage, run_command, fence_action, all_opt - from fencing import atexit_handler, check_input, process_input, show_docs - from fencing import run_delay -+import itertools - - DEVICE_INIT = 1 - DEVICE_NOT_INIT = -3 -@@ -82,7 +83,7 @@ def check_sbd_device(options, device_path): - - (return_code, out, err) = run_command(options, cmd) - -- for line in out.split("\n"): -+ for line in itertools.chain(out.split("\n"), err.split("\n")): - if len(line) == 0: - continue - -@@ -148,7 +149,7 @@ def get_msg_timeout(options): - - (return_code, out, err) = run_command(options, cmd) - -- for line in out.split("\n"): -+ for line in itertools.chain(out.split("\n"), err.split("\n")): - if len(line) == 0: - continue - diff --git a/SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch b/SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch deleted file mode 100644 index 4151486..0000000 --- a/SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b322891e91649d47656d63c73a0e08e9627f0b38 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 28 Apr 2021 12:20:07 +0200 -Subject: [PATCH] fencing: add stonith_status_sleep parameter for sleep between - status calls during a STONITH action - ---- - lib/fencing.py.py | 13 +++++++++++-- - 76 files changed, 386 insertions(+), 2 deletions(-) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 9654f57be..bd7f529f7 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -367,6 +367,14 @@ - "default" : "0", - "required" : "0", - "order" : 200}, -+ "stonith_status_sleep" : { -+ "getopt" : ":", -+ "longopt" : "stonith-status-sleep", -+ "type" : "second", -+ "help" : "--stonith-status-sleep=[seconds] Sleep X seconds between status calls during a STONITH action", -+ "default" : "1", -+ "required" : "0", -+ "order" : 200}, - "missing_as_off" : { - "getopt" : "", - "longopt" : "missing-as-off", -@@ -478,7 +486,8 @@ - "default" : ["help", "debug", "verbose", "verbose_level", - "version", "action", "agent", "power_timeout", - "shell_timeout", "login_timeout", "disable_timeout", -- "power_wait", "retry_on", "delay", "quiet"], -+ "power_wait", "stonith_status_sleep", "retry_on", "delay", -+ "quiet"], - "passwd" : ["passwd_script"], - "sudo" : ["sudo_path"], - "secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"], -@@ -828,7 +837,7 @@ def async_set_multi_power_fn(connection, options, set_power_fn, get_power_fn, re - - for _ in itertools.count(1): - if get_multi_power_fn(connection, options, get_power_fn) != options["--action"]: -- time.sleep(1) -+ time.sleep(int(options["--stonith-status-sleep"])) - else: - return True diff --git a/SOURCES/bz1780825-fencing-2-metadata-fix-long-parameters.patch b/SOURCES/bz1780825-fencing-2-metadata-fix-long-parameters.patch deleted file mode 100644 index 5aea6f9..0000000 --- a/SOURCES/bz1780825-fencing-2-metadata-fix-long-parameters.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 199b5e8a63d8b3457262751b7fbe187f92b38e73 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 4 May 2021 09:33:34 +0200 -Subject: [PATCH] fencing: fix issue with hardcoded help text length for - metadata - ---- - lib/fencing.py.py | 2 +- - 77 files changed, 153 insertions(+), 153 deletions(-) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index bd7f529f7..b0ddde850 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -641,7 +641,7 @@ def metadata(options, avail_opt, docs): - mixed = _encode_html_entities(mixed) - - if not "shortdesc" in opt: -- shortdesc = re.sub("\s\s+", " ", opt["help"][31:]) -+ shortdesc = re.sub(".*\s\s+", "", opt["help"][31:]) - else: - shortdesc = opt["shortdesc"] diff --git a/SOURCES/bz1781357-fence_aws-improve-logging-and-metadata-usage-text.patch b/SOURCES/bz1781357-fence_aws-improve-logging-and-metadata-usage-text.patch deleted file mode 100644 index e81dce6..0000000 --- a/SOURCES/bz1781357-fence_aws-improve-logging-and-metadata-usage-text.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 7ac16fb281fa8cfc51a31f672014c614c81aec82 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 31 Jan 2020 15:53:47 +0100 -Subject: [PATCH] fence_aws: improve logging and metadata/usage text - ---- - agents/aws/fence_aws.py | 36 +++++++++++++++++++------------ - tests/data/metadata/fence_aws.xml | 6 +++--- - 2 files changed, 25 insertions(+), 17 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 647b66fc..74321e8e 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -5,7 +5,7 @@ - import atexit - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * --from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay -+from fencing import fail, fail_usage, run_delay, EC_STATUS - - import boto3 - from botocore.exceptions import ClientError, EndpointConnectionError, NoRegionError -@@ -19,6 +19,8 @@ def get_nodes_list(conn, options): - fail_usage("Failed: Incorrect Access Key or Secret Key.") - except EndpointConnectionError: - fail_usage("Failed: Incorrect Region.") -+ except Exception as e: -+ logging.error("Failed to get node list: %s", e) - - return result - -@@ -38,20 +40,26 @@ def get_power_status(conn, options): - except EndpointConnectionError: - fail_usage("Failed: Incorrect Region.") - except IndexError: -- return "fail" -+ fail(EC_STATUS) -+ except Exception as e: -+ logging.error("Failed to get power status: %s", e) -+ fail(EC_STATUS) - - def set_power_status(conn, options): -- if (options["--action"]=="off"): -- conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) -- elif (options["--action"]=="on"): -- conn.instances.filter(InstanceIds=[options["--plug"]]).start() -- -+ try: -+ if (options["--action"]=="off"): -+ conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) -+ elif (options["--action"]=="on"): -+ conn.instances.filter(InstanceIds=[options["--plug"]]).start() -+ except Exception as e: -+ logging.error("Failed to power %s %s: %s", \ -+ options["--action"], options["--plug"], e) - - def define_new_opts(): - all_opt["region"] = { - "getopt" : "r:", - "longopt" : "region", -- "help" : "-r, --region=[name] Region, e.g. us-east-1", -+ "help" : "-r, --region=[region] Region, e.g. us-east-1", - "shortdesc" : "Region.", - "required" : "0", - "order" : 2 -@@ -59,7 +67,7 @@ def define_new_opts(): - all_opt["access_key"] = { - "getopt" : "a:", - "longopt" : "access-key", -- "help" : "-a, --access-key=[name] Access Key", -+ "help" : "-a, --access-key=[key] Access Key", - "shortdesc" : "Access Key.", - "required" : "0", - "order" : 3 -@@ -67,7 +75,7 @@ def define_new_opts(): - all_opt["secret_key"] = { - "getopt" : "s:", - "longopt" : "secret-key", -- "help" : "-s, --secret-key=[name] Secret Key", -+ "help" : "-s, --secret-key=[key] Secret Key", - "shortdesc" : "Secret Key.", - "required" : "0", - "order" : 4 -@@ -107,16 +115,16 @@ def main(): - conn = boto3.resource('ec2', region_name=region, - aws_access_key_id=access_key, - aws_secret_access_key=secret_key) -- except: -- fail_usage("Failed: Unable to connect to AWS. Check your configuration.") -+ except Exception as e: -+ fail_usage("Failed: Unable to connect to AWS: " + str(e)) - else: - # If setup with "aws configure" or manually in - # ~/.aws/credentials - try: - conn = boto3.resource('ec2') -- except: -+ except Exception as e: - # If any of region/access/secret are missing -- fail_usage("Failed: Unable to connect to AWS. Check your configuration.") -+ fail_usage("Failed: Unable to connect to AWS: " + str(e)) - - # Operate the fencing device - result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) -diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml -index 4dea4418..5e5d5d99 100644 ---- a/tests/data/metadata/fence_aws.xml -+++ b/tests/data/metadata/fence_aws.xml -@@ -22,17 +22,17 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht - Physical plug number on device, UUID or identification of machine - - -- -+ - - Region. - - -- -+ - - Access Key. - - -- -+ - - Secret Key. - diff --git a/SOURCES/bz1787178-1-fence_vmware_soap-set-timeout-cleanup-tmp-dirs.patch b/SOURCES/bz1787178-1-fence_vmware_soap-set-timeout-cleanup-tmp-dirs.patch deleted file mode 100644 index fee804b..0000000 --- a/SOURCES/bz1787178-1-fence_vmware_soap-set-timeout-cleanup-tmp-dirs.patch +++ /dev/null @@ -1,70 +0,0 @@ -From d4d2dd5066b62210a05c1256c6aee39609e3a974 Mon Sep 17 00:00:00 2001 -From: Thanasis Katsios -Date: Mon, 1 Nov 2021 12:31:36 +0200 -Subject: [PATCH 1/3] fence_vmware_soap: Use --login-timeout option - -Fixes issue #446. ---- - agents/vmware_soap/fence_vmware_soap.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index a7f08b3d6..034695931 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -57,7 +57,8 @@ def soap_login(options): - - try: - headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"} -- conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers) -+ login_timeout = int(options["--login-timeout"]) -+ conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout) - - mo_ServiceInstance = Property('ServiceInstance') - mo_ServiceInstance._type = 'ServiceInstance' - -From 1e8f0d7582c7768149269f8d002d71b2febbdda0 Mon Sep 17 00:00:00 2001 -From: Thanasis Katsios -Date: Tue, 2 Nov 2021 16:52:59 +0200 -Subject: [PATCH 2/3] Set timeout to 60s when disable-timeouts is used - ---- - agents/vmware_soap/fence_vmware_soap.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index 034695931..38101352e 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -57,7 +57,7 @@ def soap_login(options): - - try: - headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"} -- login_timeout = int(options["--login-timeout"]) -+ login_timeout = 60 if "--disable-timeout" in options and options["--disable-timeout"] != "false" else int(options["--login-timeout"]) - conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout) - - mo_ServiceInstance = Property('ServiceInstance') - -From 8094c8a5a06adf0bd891d4fddcc0b72861a0947e Mon Sep 17 00:00:00 2001 -From: Thanasis Katsios -Date: Tue, 2 Nov 2021 18:51:02 +0200 -Subject: [PATCH 3/3] Support disable-timeout simplification - ---- - agents/vmware_soap/fence_vmware_soap.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index 38101352e..2cd45e0b3 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -57,7 +57,7 @@ def soap_login(options): - - try: - headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"} -- login_timeout = 60 if "--disable-timeout" in options and options["--disable-timeout"] != "false" else int(options["--login-timeout"]) -+ login_timeout = int(options["--login-timeout"]) or 60 - conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout) - - mo_ServiceInstance = Property('ServiceInstance') diff --git a/SOURCES/bz1787178-2-fence_vmware_soap-login-timeout-15s.patch b/SOURCES/bz1787178-2-fence_vmware_soap-login-timeout-15s.patch deleted file mode 100644 index 58b90bc..0000000 --- a/SOURCES/bz1787178-2-fence_vmware_soap-login-timeout-15s.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 2d4b3ea47fa7a9a301d34cefc8f279cae7df4afd Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 26 Jan 2023 13:19:16 +0100 -Subject: [PATCH] fence_vmware_soap: set login_timeout lower than default - pcmk_monitor_timeout (20s) to remove tmp dirs on fail - ---- - agents/vmware_soap/fence_vmware_soap.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index b1d27a9fb..4a4ec1780 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -57,7 +57,7 @@ def soap_login(options): - - try: - headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"} -- login_timeout = int(options["--login-timeout"]) or 60 -+ login_timeout = int(options["--login-timeout"]) or 15 - conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout) - - mo_ServiceInstance = Property('ServiceInstance') diff --git a/SOURCES/bz1793739-fence_vmware_rest-1-fix-encoding.patch b/SOURCES/bz1793739-fence_vmware_rest-1-fix-encoding.patch deleted file mode 100644 index c215ab1..0000000 --- a/SOURCES/bz1793739-fence_vmware_rest-1-fix-encoding.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 06cba4aa30322f410b0b2fec5785be39d0953433 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 12 Feb 2020 14:21:54 +0100 -Subject: [PATCH] fence_vmware_rest: fix encoding to avoid issues with UTF-8 - encoded comments - ---- - 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 cd99b4ac..d07bc10d 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -127,7 +127,7 @@ def send_command(conn, command, method="GET"): - raise Exception(e[1]) - - rc = conn.getinfo(pycurl.HTTP_CODE) -- result = web_buffer.getvalue().decode() -+ result = web_buffer.getvalue().decode("UTF-8") - - web_buffer.close() - diff --git a/SOURCES/bz1793739-fence_vmware_rest-2-support-utf-8-vm-names.patch b/SOURCES/bz1793739-fence_vmware_rest-2-support-utf-8-vm-names.patch deleted file mode 100644 index ce113af..0000000 --- a/SOURCES/bz1793739-fence_vmware_rest-2-support-utf-8-vm-names.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 80aea3942aaca881349230a32b5dcc06c57de98a Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 19 May 2020 15:10:16 +0200 -Subject: [PATCH] fence_vmware_rest: support UTF-8 VM names - ---- - agents/vmware_rest/fence_vmware_rest.py | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index 675de246..a038a096 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -8,11 +8,14 @@ - from fencing import * - from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS - -+if sys.version_info[0] > 2: import urllib.parse as urllib -+else: import urllib -+ - state = {"POWERED_ON": "on", 'POWERED_OFF': "off", 'SUSPENDED': "off"} - - def get_power_status(conn, options): - try: -- res = send_command(conn, "vcenter/vm?filter.names={}".format(options["--plug"]))["value"] -+ res = send_command(conn, "vcenter/vm?filter.names={}".format(urllib.quote(options["--plug"])))["value"] - except Exception as e: - logging.debug("Failed: {}".format(e)) - fail(EC_STATUS) -@@ -58,7 +61,7 @@ def get_list(conn, options): - fail(EC_STATUS) - - for r in res["value"]: -- outlets[r["name"]] = ("", state[r["power_state"]]) -+ outlets[r["name"].encode("UTF-8")] = ("", state[r["power_state"]]) - - return outlets - diff --git a/SOURCES/bz1793739-fence_vmware_rest-3-fix-encode-issue.patch b/SOURCES/bz1793739-fence_vmware_rest-3-fix-encode-issue.patch deleted file mode 100644 index 55b7f17..0000000 --- a/SOURCES/bz1793739-fence_vmware_rest-3-fix-encode-issue.patch +++ /dev/null @@ -1,23 +0,0 @@ -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/bz1796654-fence_vmware_soap-log-exception-message-for-SSLError.patch b/SOURCES/bz1796654-fence_vmware_soap-log-exception-message-for-SSLError.patch deleted file mode 100644 index c362210..0000000 --- a/SOURCES/bz1796654-fence_vmware_soap-log-exception-message-for-SSLError.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 39e96371ab9ab1318db004c0ddbb1049d1c0f474 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 11 Jun 2020 10:25:34 +0200 -Subject: [PATCH] fence_vmware_soap: log exception message for SSLError - exception - ---- - agents/vmware_soap/fence_vmware_soap.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index 53e8d8f4..f2ab68b0 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -67,7 +67,7 @@ def soap_login(options): - - conn.service.Login(mo_SessionManager, options["--username"], options["--password"]) - except requests.exceptions.SSLError as ex: -- fail_usage("Server side certificate verification failed") -+ fail_usage("Server side certificate verification failed: %s" % ex) - except Exception: - fail(EC_LOGIN_DENIED) - diff --git a/SOURCES/bz1798641-fence_mpath-fix-reserve-parameter-typo.patch b/SOURCES/bz1798641-fence_mpath-fix-reserve-parameter-typo.patch deleted file mode 100644 index 03d7c5e..0000000 --- a/SOURCES/bz1798641-fence_mpath-fix-reserve-parameter-typo.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0d3ff341c5dcff7ded0274ae20460895f35c13d6 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 13 Feb 2020 15:40:24 +0100 -Subject: [PATCH] fence_mpath: fix --reserve parameter typo - ---- - 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 73517851..a3d9fe23 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -106,7 +106,7 @@ def register_dev(options, dev): - return not bool(run_cmd(options, cmd)["err"]) - - def reserve_dev(options, dev): -- cmd = options["--mpathpersist-path"] + " -o --reserv --prout-type=5 --param-rk=" + options["--plug"] + " -d " + dev -+ cmd = options["--mpathpersist-path"] + " -o --reserve --prout-type=5 --param-rk=" + options["--plug"] + " -d " + dev - return not bool(run_cmd(options, cmd)["err"]) - - def get_reservation_key(options, dev): diff --git a/SOURCES/bz1810457-fence_aws-improve-parameter-logic.patch b/SOURCES/bz1810457-fence_aws-improve-parameter-logic.patch deleted file mode 100644 index 29c1f8c..0000000 --- a/SOURCES/bz1810457-fence_aws-improve-parameter-logic.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 1c2f791b6b2be13bcceaa096df52654164b1f6cb Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 5 Mar 2020 14:10:29 +0100 -Subject: [PATCH] fence_aws: improve connect parameter logic, so region can be - specified as parameter, while using role or keys from ~/.aws/config - ---- - agents/aws/fence_aws.py | 27 +++++++++------------------ - 1 file changed, 9 insertions(+), 18 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 74321e8e..4a4d9de2 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -107,24 +107,15 @@ def main(): - - run_delay(options) - -- if "--region" in options and "--access-key" in options and "--secret-key" in options: -- region = options["--region"] -- access_key = options["--access-key"] -- secret_key = options["--secret-key"] -- try: -- conn = boto3.resource('ec2', region_name=region, -- aws_access_key_id=access_key, -- aws_secret_access_key=secret_key) -- except Exception as e: -- fail_usage("Failed: Unable to connect to AWS: " + str(e)) -- else: -- # If setup with "aws configure" or manually in -- # ~/.aws/credentials -- try: -- conn = boto3.resource('ec2') -- except Exception as e: -- # If any of region/access/secret are missing -- fail_usage("Failed: Unable to connect to AWS: " + str(e)) -+ region = options.get("--region") -+ access_key = options.get("--access-key") -+ secret_key = options.get("--secret-key") -+ try: -+ conn = boto3.resource('ec2', region_name=region, -+ aws_access_key_id=access_key, -+ aws_secret_access_key=secret_key) -+ except Exception as e: -+ fail_usage("Failed: Unable to connect to AWS: " + str(e)) - - # Operate the fencing device - result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) diff --git a/SOURCES/bz1816203-fence_aws-1-fix-race-condition.patch b/SOURCES/bz1816203-fence_aws-1-fix-race-condition.patch deleted file mode 100644 index ce17980..0000000 --- a/SOURCES/bz1816203-fence_aws-1-fix-race-condition.patch +++ /dev/null @@ -1,421 +0,0 @@ -From 1742baf17954c58a84b9c668a617bac78303ce95 Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Tue, 17 Mar 2020 13:18:38 +0000 -Subject: [PATCH 1/9] fence_aws: Fix fence race condition by checking local - instance status - ---- - agents/aws/fence_aws.py | 37 ++++++++++++++++++++++++++++++++++++- - 1 file changed, 36 insertions(+), 1 deletion(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 4a4d9de2..f37f68d6 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -3,6 +3,7 @@ - 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 -@@ -10,6 +11,17 @@ - import boto3 - from botocore.exceptions import ClientError, EndpointConnectionError, NoRegionError - -+def get_instance_id(): -+ try: -+ r = requests.get('http://169.254.169.254/latest/meta-data/instance-id') -+ return r.content -+ except HTTPError as http_err: -+ logging.error('HTTP error occurred while trying to access EC2 metadata server: %s', http_err) -+ except Exception as err: -+ logging.error('A fatal error occurred while trying to access EC2 metadata server: %s', err) -+ return None -+ -+ - def get_nodes_list(conn, options): - result = {} - try: -@@ -45,10 +57,33 @@ def get_power_status(conn, options): - logging.error("Failed to get power status: %s", e) - fail(EC_STATUS) - -+def get_self_power_status(conn, options): -+ try: -+ instance = conn.instances.filter(Filters=[{"Name": "instance-id", "Values": [instance_id]}]) -+ state = list(instance)[0].state["Name"] -+ if state == "running": -+ logging.debug("Captured my (%s) state and it %s - returning OK - Proceeding with fencing",instance_id,state.upper()) -+ return "ok" -+ else: -+ logging.debug("Captured my (%s) state it is %s - returning Alert - Unable to fence other nodes",instance_id,state.upper()) -+ return "alert" -+ -+ except ClientError: -+ fail_usage("Failed: Incorrect Access Key or Secret Key.") -+ except EndpointConnectionError: -+ fail_usage("Failed: Incorrect Region.") -+ except IndexError: -+ return "fail" -+ - def set_power_status(conn, options): -+ my_instance = get_instance_id() - try: - if (options["--action"]=="off"): -- conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) -+ if (get_self_power_status(conn,myinstance) == "ok"): -+ logging.info("Called StopInstance API call for %s", options["--plug"]) -+ conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) -+ else: -+ logging.info("Skipping fencing as instance is not in running status") - elif (options["--action"]=="on"): - conn.instances.filter(InstanceIds=[options["--plug"]]).start() - except Exception as e: - -From 45e429b3132ebc9e78121c3fbb15f0bf46845a59 Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Tue, 17 Mar 2020 13:28:34 +0000 -Subject: [PATCH 2/9] fence_aws: Use local logger and improve logging - experience - ---- - agents/aws/fence_aws.py | 34 ++++++++++++++++++++++++++-------- - 1 file changed, 26 insertions(+), 8 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index f37f68d6..b0b6685a 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -6,7 +6,7 @@ - import requests - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * --from fencing import fail, fail_usage, run_delay, EC_STATUS -+from fencing import fail, fail_usage, run_delay, EC_STATUS, SyslogLibHandler - - import boto3 - from botocore.exceptions import ClientError, EndpointConnectionError, NoRegionError -@@ -16,13 +16,14 @@ def get_instance_id(): - r = requests.get('http://169.254.169.254/latest/meta-data/instance-id') - return r.content - except HTTPError as http_err: -- logging.error('HTTP error occurred while trying to access EC2 metadata server: %s', http_err) -+ logger.error('HTTP error occurred while trying to access EC2 metadata server: %s', http_err) - except Exception as err: -- logging.error('A fatal error occurred while trying to access EC2 metadata server: %s', err) -+ logger.error('A fatal error occurred while trying to access EC2 metadata server: %s', err) - return None - - - def get_nodes_list(conn, options): -+ logger.info("Starting monitor operation") - result = {} - try: - for instance in conn.instances.all(): -@@ -32,14 +33,16 @@ def get_nodes_list(conn, options): - except EndpointConnectionError: - fail_usage("Failed: Incorrect Region.") - except Exception as e: -- logging.error("Failed to get node list: %s", e) -- -+ logger.error("Failed to get node list: %s", e) -+ logger.debug("Monitor operation OK: %s",result) - return result - - def get_power_status(conn, options): -+ logger.debug("Starting status operation") - try: - instance = conn.instances.filter(Filters=[{"Name": "instance-id", "Values": [options["--plug"]]}]) - state = list(instance)[0].state["Name"] -+ logger.info("Status operation for EC2 instance %s returned state: %s",options["--plug"],state.upper()) - if state == "running": - return "on" - elif state == "stopped": -@@ -80,14 +83,14 @@ def set_power_status(conn, options): - try: - if (options["--action"]=="off"): - if (get_self_power_status(conn,myinstance) == "ok"): -- logging.info("Called StopInstance API call for %s", options["--plug"]) - conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) -+ logger.info("Called StopInstance API call for %s", options["--plug"]) - else: -- logging.info("Skipping fencing as instance is not in running status") -+ logger.info("Skipping fencing as instance is not in running status") - elif (options["--action"]=="on"): - conn.instances.filter(InstanceIds=[options["--plug"]]).start() - except Exception as e: -- logging.error("Failed to power %s %s: %s", \ -+ logger.error("Failed to power %s %s: %s", \ - options["--action"], options["--plug"], e) - - def define_new_opts(): -@@ -142,6 +145,13 @@ def main(): - - run_delay(options) - -+ if options.get("--verbose") is not None: -+ lh = logging.FileHandler('/var/log/fence_aws_debug.log') -+ logger.addHandler(lh) -+ lhf = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') -+ lh.setFormatter(lhf) -+ logger.setLevel(logging.DEBUG) -+ - region = options.get("--region") - access_key = options.get("--access-key") - secret_key = options.get("--secret-key") -@@ -157,4 +167,12 @@ def main(): - sys.exit(result) - - if __name__ == "__main__": -+ -+ logger = logging.getLogger("fence_aws") -+ logger.propagate = False -+ logger.setLevel(logging.INFO) -+ logger.addHandler(SyslogLibHandler()) -+ logger.getLogger('botocore.vendored').propagate = False -+ -+ - main() - -From 00569921597b8007c67296ab8332747baf1e6fae Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Tue, 17 Mar 2020 13:33:02 +0000 -Subject: [PATCH 3/9] fence_aws: Decouple boto3 and botocore debug logging from - local logging - ---- - agents/aws/fence_aws.py | 26 +++++++++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index b0b6685a..11714315 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -118,18 +118,27 @@ def define_new_opts(): - "required" : "0", - "order" : 4 - } -+ all_opt["boto3_debug"] = { -+ "getopt" : "b:", -+ "longopt" : "boto3_debug", -+ "help" : "-b, --boto3_debug=on|off Boto3 and Botocore library debug logging", -+ "shortdesc": "Boto Lib debug", -+ "required": "0", -+ "order": 5 -+ } - - # Main agent method - def main(): - conn = None - -- device_opt = ["port", "no_password", "region", "access_key", "secret_key"] -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "boto3_debug"] - - atexit.register(atexit_handler) - - define_new_opts() - - all_opt["power_timeout"]["default"] = "60" -+ all_opt["boto3_debug"]["default"] = "off" - - options = check_input(device_opt, process_input(device_opt)) - -@@ -151,6 +160,21 @@ def main(): - lhf = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') - lh.setFormatter(lhf) - logger.setLevel(logging.DEBUG) -+ -+ if options["--boto3_debug"] != "on": -+ boto3.set_stream_logger('boto3',logging.INFO) -+ boto3.set_stream_logger('botocore',logging.INFO) -+ logging.getLogger('botocore').propagate = False -+ logging.getLogger('boto3').propagate = False -+ else: -+ log_format = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s') -+ logging.getLogger('botocore').propagate = False -+ logging.getLogger('boto3').propagate = False -+ fdh = logging.FileHandler('/var/log/fence_aws_boto3.log') -+ fdh.setFormatter(log_format) -+ logging.getLogger('boto3').addHandler(fdh) -+ logging.getLogger('botocore').addHandler(fdh) -+ logging.debug("Boto debug level is %s and sending debug info to /var/log/fence_aws_boto3.log", options["--boto3_debug"]) - - region = options.get("--region") - access_key = options.get("--access-key") - -From ed309bd51dfd5e0fed30156e7a312d5b5a8f4bd4 Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Thu, 19 Mar 2020 16:02:47 +0000 -Subject: [PATCH 4/9] fence_aws: Fix typos and variable names - ---- - agents/aws/fence_aws.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 11714315..207631e8 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -60,7 +60,7 @@ def get_power_status(conn, options): - logging.error("Failed to get power status: %s", e) - fail(EC_STATUS) - --def get_self_power_status(conn, options): -+def get_self_power_status(conn, instance_id): - try: - instance = conn.instances.filter(Filters=[{"Name": "instance-id", "Values": [instance_id]}]) - state = list(instance)[0].state["Name"] -@@ -82,7 +82,7 @@ def set_power_status(conn, options): - my_instance = get_instance_id() - try: - if (options["--action"]=="off"): -- if (get_self_power_status(conn,myinstance) == "ok"): -+ if (get_self_power_status(conn,my_instance) == "ok"): - conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) - logger.info("Called StopInstance API call for %s", options["--plug"]) - else: -@@ -196,7 +196,7 @@ def main(): - logger.propagate = False - logger.setLevel(logging.INFO) - logger.addHandler(SyslogLibHandler()) -- logger.getLogger('botocore.vendored').propagate = False -+ logging.getLogger('botocore.vendored').propagate = False - - - main() - -From 624c652a95a676286af408898186186b7d7fcf55 Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Thu, 19 Mar 2020 16:58:45 +0000 -Subject: [PATCH 5/9] fence_aws: Missing brackets on boto3_debug metadata - ---- - agents/aws/fence_aws.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 207631e8..8916f4a0 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -121,7 +121,7 @@ def define_new_opts(): - all_opt["boto3_debug"] = { - "getopt" : "b:", - "longopt" : "boto3_debug", -- "help" : "-b, --boto3_debug=on|off Boto3 and Botocore library debug logging", -+ "help" : "-b, --boto3_debug=[on|off] Boto3 and Botocore library debug logging", - "shortdesc": "Boto Lib debug", - "required": "0", - "order": 5 - -From 7c641a6885c4ab67b7739a43892d92d95a6f566c Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Thu, 19 Mar 2020 17:04:31 +0000 -Subject: [PATCH 6/9] fence_aws: Fix travis build #1 - ---- - agents/aws/fence_aws.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 8916f4a0..f41a47e4 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -121,7 +121,7 @@ def define_new_opts(): - all_opt["boto3_debug"] = { - "getopt" : "b:", - "longopt" : "boto3_debug", -- "help" : "-b, --boto3_debug=[on|off] Boto3 and Botocore library debug logging", -+ "help" : "-b, --boto3_debug=[option] Boto3 and Botocore library debug logging", - "shortdesc": "Boto Lib debug", - "required": "0", - "order": 5 - -From 257af7ccc9789646adc7abf1e7dbac744b756071 Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Fri, 20 Mar 2020 10:59:56 +0000 -Subject: [PATCH 7/9] fence_aws: Updated metadata XML file - ---- - tests/data/metadata/fence_aws.xml | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml -index 5e5d5d99..acfebb61 100644 ---- a/tests/data/metadata/fence_aws.xml -+++ b/tests/data/metadata/fence_aws.xml -@@ -36,6 +36,11 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht - - Secret Key. - -+ -+ -+ -+ Boto Lib debug -+ - - - - -From 8f78bc19356b5e07d0021aaf7da3fc4e712e00f0 Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Fri, 20 Mar 2020 12:13:16 +0000 -Subject: [PATCH 8/9] fence_aws: Moving logger config next to import statements - for visibility - ---- - agents/aws/fence_aws.py | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index f41a47e4..72fb8843 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -11,6 +11,12 @@ - import boto3 - from botocore.exceptions import ClientError, EndpointConnectionError, NoRegionError - -+logger = logging.getLogger("fence_aws") -+logger.propagate = False -+logger.setLevel(logging.INFO) -+logger.addHandler(SyslogLibHandler()) -+logging.getLogger('botocore.vendored').propagate = False -+ - def get_instance_id(): - try: - r = requests.get('http://169.254.169.254/latest/meta-data/instance-id') -@@ -192,11 +198,4 @@ def main(): - - if __name__ == "__main__": - -- logger = logging.getLogger("fence_aws") -- logger.propagate = False -- logger.setLevel(logging.INFO) -- logger.addHandler(SyslogLibHandler()) -- logging.getLogger('botocore.vendored').propagate = False -- -- - main() - -From 570a05c425fe55008c8892ebaad8a73d36143909 Mon Sep 17 00:00:00 2001 -From: Guilherme Felix -Date: Fri, 20 Mar 2020 14:17:55 +0000 -Subject: [PATCH 9/9] fence_aws: Remove empty line - ---- - agents/aws/fence_aws.py | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 72fb8843..ed55f390 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -197,5 +197,4 @@ def main(): - sys.exit(result) - - if __name__ == "__main__": -- -- main() -+ main() -\ No newline at end of file diff --git a/SOURCES/bz1816203-fence_aws-2-fix-python3-encoding.patch b/SOURCES/bz1816203-fence_aws-2-fix-python3-encoding.patch deleted file mode 100644 index 2751b79..0000000 --- a/SOURCES/bz1816203-fence_aws-2-fix-python3-encoding.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 9758f8c83c44ad6949d4411042c59bcf9365f67e Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 24 Mar 2020 15:31:13 +0100 -Subject: [PATCH] fence_aws: fix Python 3 encoding issue - ---- - agents/aws/fence_aws.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index ed55f390..17c2fedb 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -20,7 +20,7 @@ - def get_instance_id(): - try: - r = requests.get('http://169.254.169.254/latest/meta-data/instance-id') -- return r.content -+ return r.content.decode("UTF-8") - 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/bz1818157-fence_azure_arm-fix-MSI-support.patch b/SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch deleted file mode 100644 index 5e33400..0000000 --- a/SOURCES/bz1818157-fence_azure_arm-fix-MSI-support.patch +++ /dev/null @@ -1,75 +0,0 @@ -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/bz1827559-fence_vmware_rest-improve-exception-handling.patch b/SOURCES/bz1827559-fence_vmware_rest-improve-exception-handling.patch deleted file mode 100644 index 1c61b35..0000000 --- a/SOURCES/bz1827559-fence_vmware_rest-improve-exception-handling.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 020f48a309bcad659dc493960d2b39e8e1243085 Mon Sep 17 00:00:00 2001 -From: Thomas Abraham -Date: Mon, 20 Apr 2020 20:28:43 -0400 -Subject: [PATCH] fence_vmware_rest: improve exception handling in - send_command() - -If an exception occurs, simply raise it. pycurl's perform() method can -generate a pycurl.error object, which does not support indexing and -attempting to do so will generate an exception that hides the original -exception. - -Also, don't assume that the remote will return a JSON formatted response. -If it doesn't, a exception will occur accessing result which will not -raise the intended exception. ---- - agents/vmware_rest/fence_vmware_rest.py | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index d07bc10d..1505ffe6 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -124,7 +124,7 @@ def send_command(conn, command, method="GET"): - try: - conn.perform() - except Exception as e: -- raise Exception(e[1]) -+ raise(e) - - rc = conn.getinfo(pycurl.HTTP_CODE) - result = web_buffer.getvalue().decode("UTF-8") -@@ -135,7 +135,11 @@ def send_command(conn, command, method="GET"): - result = json.loads(result) - - if rc != 200: -- raise Exception("{}: {}".format(rc, result["value"]["messages"][0]["default_message"])) -+ if len(result) > 0: -+ raise Exception("{}: {}".format(rc, -+ result["value"]["messages"][0]["default_message"])) -+ else: -+ raise Exception("Remote returned {} for request to {}".format(rc, url)) - - logging.debug("url: {}".format(url)) - logging.debug("method: {}".format(method)) diff --git a/SOURCES/bz1827652-fence_vmware_rest-1-add-filter-parameter.patch b/SOURCES/bz1827652-fence_vmware_rest-1-add-filter-parameter.patch deleted file mode 100644 index 2e17f7f..0000000 --- a/SOURCES/bz1827652-fence_vmware_rest-1-add-filter-parameter.patch +++ /dev/null @@ -1,92 +0,0 @@ -From ab193580dcdd810b7bef69cc04cebef315f4781d Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 23 Apr 2020 15:55:11 +0200 -Subject: [PATCH] fence_vmware_rest: add filter parameter - ---- - agents/vmware_rest/fence_vmware_rest.py | 24 ++++++++++++++++++++--- - tests/data/metadata/fence_vmware_rest.xml | 9 ++++++++- - 2 files changed, 29 insertions(+), 4 deletions(-) - -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index 1505ffe6..6daff121 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -42,7 +42,10 @@ def get_list(conn, options): - outlets = {} - - try: -- res = send_command(conn, "vcenter/vm") -+ command = "vcenter/vm" -+ if "--filter" in options: -+ command = command + "?" + options["--filter"] -+ res = send_command(conn, command) - except: - logging.debug("Failed: {}".format(e)) - fail(EC_STATUS) -@@ -157,6 +160,16 @@ def define_new_opts(): - "required" : "0", - "shortdesc" : "The path part of the API URL", - "order" : 2} -+ all_opt["filter"] = { -+ "getopt" : ":", -+ "longopt" : "filter", -+ "help" : "--filter=[filter] Filter to only return relevant VMs" -+ " (e.g. \"filter.names=node1&filter.names=node2\").", -+ "default" : "", -+ "required" : "0", -+ "shortdesc" : "Filter to only return relevant VMs. It can be used to avoid " -+ "the agent failing when more than 1000 VMs should be returned.", -+ "order" : 2} - - - def main(): -@@ -169,6 +182,7 @@ def main(): - "notls", - "web", - "port", -+ "filter", - ] - - atexit.register(atexit_handler) -@@ -181,8 +195,12 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for VMware REST API" -- docs["longdesc"] = "fence_vmware_rest is an I/O Fencing agent which can be \ --used with VMware API to fence virtual machines." -+ docs["longdesc"] = """fence_vmware_rest is an I/O Fencing agent which can be \ -+used with VMware API to fence virtual machines. -+ -+NOTE: If there's more than 1000 VMs there is a filter parameter to work around \ -+the API limit. See https://code.vmware.com/apis/62/vcenter-management#/VM%20/get_vcenter_vm \ -+for full list of filters.""" - docs["vendorurl"] = "https://www.vmware.com" - show_docs(options, docs) - -diff --git a/tests/data/metadata/fence_vmware_rest.xml b/tests/data/metadata/fence_vmware_rest.xml -index 5b497a6a..d60c8775 100644 ---- a/tests/data/metadata/fence_vmware_rest.xml -+++ b/tests/data/metadata/fence_vmware_rest.xml -@@ -1,6 +1,8 @@ - - --fence_vmware_rest is an I/O Fencing agent which can be used with VMware API to fence virtual machines. -+fence_vmware_rest is an I/O Fencing agent which can be used with VMware API to fence virtual machines. -+ -+NOTE: If there's more than 1000 VMs there is a filter parameter to work around the API limit. See https://code.vmware.com/apis/62/vcenter-management#/VM%20/get_vcenter_vm for full list of filters. - https://www.vmware.com - - -@@ -87,6 +89,11 @@ - - The path part of the API URL - -+ -+ -+ -+ Filter to only return relevant VMs. It can be used to avoid the agent failing when more than 1000 VMs should be returned. -+ - - - diff --git a/SOURCES/bz1827652-fence_vmware_rest-2-fix-1000-VM-monitor-error.patch b/SOURCES/bz1827652-fence_vmware_rest-2-fix-1000-VM-monitor-error.patch deleted file mode 100644 index 0f83fa7..0000000 --- a/SOURCES/bz1827652-fence_vmware_rest-2-fix-1000-VM-monitor-error.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 0296bc8512e37b8b935bc342b6493ed4fa8aa001 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 14 May 2020 13:17:04 +0200 -Subject: [PATCH 1/2] fence_vmware_rest: fix exception and remove default value - for filter parameter (which was shown in the manpage) - ---- - agents/vmware_rest/fence_vmware_rest.py | 3 +-- - tests/data/metadata/fence_vmware_rest.xml | 2 +- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index 6daff121..2635ae07 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -46,7 +46,7 @@ def get_list(conn, options): - if "--filter" in options: - command = command + "?" + options["--filter"] - res = send_command(conn, command) -- except: -+ except Exception as e: - logging.debug("Failed: {}".format(e)) - fail(EC_STATUS) - -@@ -165,7 +165,6 @@ def define_new_opts(): - "longopt" : "filter", - "help" : "--filter=[filter] Filter to only return relevant VMs" - " (e.g. \"filter.names=node1&filter.names=node2\").", -- "default" : "", - "required" : "0", - "shortdesc" : "Filter to only return relevant VMs. It can be used to avoid " - "the agent failing when more than 1000 VMs should be returned.", -diff --git a/tests/data/metadata/fence_vmware_rest.xml b/tests/data/metadata/fence_vmware_rest.xml -index d60c8775..830b6a21 100644 ---- a/tests/data/metadata/fence_vmware_rest.xml -+++ b/tests/data/metadata/fence_vmware_rest.xml -@@ -91,7 +91,7 @@ NOTE: If there's more than 1000 VMs there is a filter parameter to work around t - - - -- -+ - Filter to only return relevant VMs. It can be used to avoid the agent failing when more than 1000 VMs should be returned. - - - -From 7420cf9f11568be7239956bed4631cdbaa6fb87c Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 14 May 2020 14:17:03 +0200 -Subject: [PATCH 2/2] fence_vmware_rest: dont fail when receiving more than - 1000 VM error during monitor-action - ---- - agents/vmware_rest/fence_vmware_rest.py | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index 2635ae07..675de246 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -48,7 +48,14 @@ def get_list(conn, options): - res = send_command(conn, command) - except Exception as e: - logging.debug("Failed: {}".format(e)) -- fail(EC_STATUS) -+ if str(e).startswith("400"): -+ if options.get("--original-action") == "monitor": -+ return outlets -+ else: -+ logging.error("More than 1000 VMs returned. Use --filter parameter to limit which VMs to list.") -+ fail(EC_STATUS) -+ else: -+ fail(EC_STATUS) - - for r in res["value"]: - outlets[r["name"]] = ("", state[r["power_state"]]) diff --git a/SOURCES/bz1830776-fence_compute-fence_evacuate-fix-insecure-parameter.patch b/SOURCES/bz1830776-fence_compute-fence_evacuate-fix-insecure-parameter.patch deleted file mode 100644 index 914b7e3..0000000 --- a/SOURCES/bz1830776-fence_compute-fence_evacuate-fix-insecure-parameter.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 8920d2fc7993453e7ad05f807f6ec51745b408a5 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 4 May 2020 16:53:55 +0200 -Subject: [PATCH] fence_compute/fence_evacuate: fix --insecure parameter - ---- - agents/compute/fence_compute.py | 10 +++++++--- - agents/evacuate/fence_evacuate.py | 10 +++++++--- - tests/data/metadata/fence_compute.xml | 2 +- - tests/data/metadata/fence_evacuate.xml | 2 +- - 4 files changed, 16 insertions(+), 8 deletions(-) - -diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py -index d0e012e6..f53b97da 100644 ---- a/agents/compute/fence_compute.py -+++ b/agents/compute/fence_compute.py -@@ -281,7 +281,7 @@ def create_nova_connection(options): - - loader = loading.get_plugin_loader('password') - keystone_auth = loader.load_from_options(**kwargs) -- keystone_session = session.Session(auth=keystone_auth, verify=(not options["--insecure"])) -+ keystone_session = session.Session(auth=keystone_auth, verify=not "--insecure" in options) - - nova_versions = [ "2.11", "2" ] - for version in nova_versions: -@@ -307,7 +307,7 @@ def create_nova_connection(options): - None, # Password - None, # Tenant - None, # Auth URL -- insecure=options["--insecure"], -+ insecure="--insecure" in options, - region_name=options["--region-name"], - endpoint_type=options["--endpoint-type"], - session=keystone_session, auth=keystone_auth, -@@ -395,7 +395,6 @@ def define_new_opts(): - "help" : "--insecure Explicitly allow agent to perform \"insecure\" TLS (https) requests", - "required" : "0", - "shortdesc" : "Allow Insecure TLS Requests", -- "default" : "False", - "order": 2, - } - all_opt["domain"] = { -@@ -484,6 +483,11 @@ def main(): - options["--domain"] = options["--compute-domain"] - del options["--domain"] - -+ # Disable insecure-certificate-warning message -+ if "--insecure" in options: -+ import urllib3 -+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) -+ - logging.debug("Running "+options["--action"]) - connection = create_nova_connection(options) - -diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py -index 60bb130e..88837dd8 100644 ---- a/agents/evacuate/fence_evacuate.py -+++ b/agents/evacuate/fence_evacuate.py -@@ -217,7 +217,7 @@ def create_nova_connection(options): - - loader = loading.get_plugin_loader('password') - keystone_auth = loader.load_from_options(**kwargs) -- keystone_session = session.Session(auth=keystone_auth, verify=(not options["--insecure"])) -+ keystone_session = session.Session(auth=keystone_auth, verify=not "--insecure" in options) - - versions = [ "2.11", "2" ] - for version in versions: -@@ -244,7 +244,7 @@ def create_nova_connection(options): - None, # Password - None, # Tenant - None, # Auth URL -- insecure=options["--insecure"], -+ insecure="--insecure" in options, - region_name=options["--region-name"], - endpoint_type=options["--endpoint-type"], - session=keystone_session, auth=keystone_auth, -@@ -332,7 +332,6 @@ def define_new_opts(): - "help" : "--insecure Explicitly allow agent to perform \"insecure\" TLS (https) requests", - "required" : "0", - "shortdesc" : "Allow Insecure TLS Requests", -- "default" : "False", - "order": 2, - } - all_opt["domain"] = { -@@ -397,6 +396,11 @@ def main(): - del options["--domain"] - - -+ # Disable insecure-certificate-warning message -+ if "--insecure" in options: -+ import urllib3 -+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) -+ - connection = create_nova_connection(options) - - # Un-evacuating a server doesn't make sense -diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml -index 99d56af0..2f183268 100644 ---- a/tests/data/metadata/fence_compute.xml -+++ b/tests/data/metadata/fence_compute.xml -@@ -70,7 +70,7 @@ - - - -- -+ - Allow Insecure TLS Requests - - -diff --git a/tests/data/metadata/fence_evacuate.xml b/tests/data/metadata/fence_evacuate.xml -index 8c720b80..95da0e1b 100644 ---- a/tests/data/metadata/fence_evacuate.xml -+++ b/tests/data/metadata/fence_evacuate.xml -@@ -70,7 +70,7 @@ - - - -- -+ - Allow Insecure TLS Requests - - diff --git a/SOURCES/bz1839776-fence_aws-catch-connectionerror.patch b/SOURCES/bz1839776-fence_aws-catch-connectionerror.patch deleted file mode 100644 index 674586e..0000000 --- a/SOURCES/bz1839776-fence_aws-catch-connectionerror.patch +++ /dev/null @@ -1,95 +0,0 @@ -From be20615859c518b3161b08ee63f5da5213eba91d Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 25 May 2020 14:03:53 +0200 -Subject: [PATCH 1/2] fence_aws: catch ConnectionError and suppress traceback - for caught exceptions - ---- - agents/aws/fence_aws.py | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 17c2fedb..191f5de1 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -9,14 +9,14 @@ - from fencing import fail, fail_usage, run_delay, EC_STATUS, SyslogLibHandler - - import boto3 --from botocore.exceptions import ClientError, EndpointConnectionError, NoRegionError -+from botocore.exceptions import ConnectionError, ClientError, EndpointConnectionError, NoRegionError - - logger = logging.getLogger("fence_aws") - logger.propagate = False - logger.setLevel(logging.INFO) - logger.addHandler(SyslogLibHandler()) - logging.getLogger('botocore.vendored').propagate = False -- -+ - def get_instance_id(): - try: - r = requests.get('http://169.254.169.254/latest/meta-data/instance-id') -@@ -38,6 +38,8 @@ def get_nodes_list(conn, options): - fail_usage("Failed: Incorrect Access Key or Secret Key.") - except EndpointConnectionError: - fail_usage("Failed: Incorrect Region.") -+ except ConnectionError as e: -+ fail_usage("Failed: Unable to connect to AWS: " + str(e)) - except Exception as e: - logger.error("Failed to get node list: %s", e) - logger.debug("Monitor operation OK: %s",result) -@@ -169,7 +171,7 @@ def main(): - - if options["--boto3_debug"] != "on": - boto3.set_stream_logger('boto3',logging.INFO) -- boto3.set_stream_logger('botocore',logging.INFO) -+ boto3.set_stream_logger('botocore',logging.CRITICAL) - logging.getLogger('botocore').propagate = False - logging.getLogger('boto3').propagate = False - else: -@@ -197,4 +199,4 @@ def main(): - sys.exit(result) - - if __name__ == "__main__": -- main() -\ No newline at end of file -+ main() - -From 50772024cffa60d05938d328bbd5cffd930f6b42 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 25 May 2020 14:07:14 +0200 -Subject: [PATCH 2/2] fence_aws: improve boto3_debug boolean handling - ---- - agents/aws/fence_aws.py | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 191f5de1..483a2991 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -132,6 +132,7 @@ def define_new_opts(): - "help" : "-b, --boto3_debug=[option] Boto3 and Botocore library debug logging", - "shortdesc": "Boto Lib debug", - "required": "0", -+ "default": "False", - "order": 5 - } - -@@ -146,7 +147,6 @@ def main(): - define_new_opts() - - all_opt["power_timeout"]["default"] = "60" -- all_opt["boto3_debug"]["default"] = "off" - - options = check_input(device_opt, process_input(device_opt)) - -@@ -169,7 +169,7 @@ def main(): - lh.setFormatter(lhf) - logger.setLevel(logging.DEBUG) - -- if options["--boto3_debug"] != "on": -+ if options["--boto3_debug"].lower() not in ["1", "yes", "on", "true"]: - boto3.set_stream_logger('boto3',logging.INFO) - boto3.set_stream_logger('botocore',logging.CRITICAL) - logging.getLogger('botocore').propagate = False 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 deleted file mode 100644 index 5bc1198..0000000 --- a/SOURCES/bz1841087-fence_scsi-dont-write-key-device-to-file.patch +++ /dev/null @@ -1,60 +0,0 @@ -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 deleted file mode 100644 index cd36647..0000000 --- a/SOURCES/bz1851115-fence_mpath-support-comma-and-space-separated-devices.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 28abff6..0000000 --- a/SOURCES/bz1853973-fence_ipmilan-allow-increasing-ipmitool-verbosity.patch +++ /dev/null @@ -1,1489 +0,0 @@ -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 deleted file mode 100644 index 60eddd2..0000000 --- a/SOURCES/bz1859932-fence_evacuate-support-private-flavors.patch +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index f65f6ba..0000000 --- a/SOURCES/bz1860544-fence_lpar-fix-long-user-host-issue.patch +++ /dev/null @@ -1,127 +0,0 @@ -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 deleted file mode 100644 index 5842f73..0000000 --- a/SOURCES/bz1861926-fence_lpar-fix-list-status-action.patch +++ /dev/null @@ -1,145 +0,0 @@ -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/bz1886074-1-fencing-source_env.patch b/SOURCES/bz1886074-1-fencing-source_env.patch deleted file mode 100644 index 31ad189..0000000 --- a/SOURCES/bz1886074-1-fencing-source_env.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/lib/fencing.py.py 2022-04-22 10:25:59.347139685 +0200 -+++ b/lib/fencing.py.py 2022-04-22 10:26:05.127169492 +0200 -@@ -1115,6 +1115,14 @@ - except pexpect.ExceptionPexpect: - pass - -+def source_env(env_file): -+ # POSIX: name shall not contain '=', value doesn't contain '\0' -+ output = subprocess.check_output("source {} && env -0".format(env_file), shell=True, -+ executable="/bin/sh") -+ # replace env -+ os.environ.clear() -+ os.environ.update(line.partition('=')[::2] for line in output.decode("utf-8").split('\0')) -+ - # Convert array of format [[key1, value1], [key2, value2], ... [keyN, valueN]] to dict, where key is - # in format a.b.c.d...z and returned dict has key only z - def array_to_dict(array): diff --git a/SOURCES/bz1886074-2-fence_openstack.patch b/SOURCES/bz1886074-2-fence_openstack.patch deleted file mode 100644 index 51796c9..0000000 --- a/SOURCES/bz1886074-2-fence_openstack.patch +++ /dev/null @@ -1,460 +0,0 @@ ---- a/agents/openstack/fence_openstack.py 2018-06-28 14:24:54.000000000 +0200 -+++ b/agents/openstack/fence_openstack.py 2022-04-22 10:15:28.069884360 +0200 -@@ -2,110 +2,303 @@ - - import atexit - import logging --import os --import re - import sys --from pipes import quote --sys.path.append("/usr/share/fence") -+import os -+ -+import urllib3 -+ -+sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * --from fencing import fail_usage, is_executable, run_command, run_delay --from keystoneclient.v3 import client as ksclient --from novaclient import client as novaclient --from keystoneclient import session as ksc_session --from keystoneclient.auth.identity import v3 -- --def get_name_or_uuid(options): -- return options["--uuid"] if "--uuid" in options else options["--plug"] -- --def get_power_status(_, options): -- output = nova_run_command(options, "status") -- if (output == 'ACTIVE'): -- return 'on' -- else: -- return 'off' -+from fencing import fail_usage, run_delay, source_env -+ -+try: -+ from novaclient import client -+ from novaclient.exceptions import Conflict, NotFound -+except ImportError: -+ pass -+ -+urllib3.disable_warnings(urllib3.exceptions.SecurityWarning) -+ -+ -+def translate_status(instance_status): -+ if instance_status == "ACTIVE": -+ return "on" -+ elif instance_status == "SHUTOFF": -+ return "off" -+ return "unknown" -+ -+def get_cloud(options): -+ import yaml -+ -+ clouds_yaml = "~/.config/openstack/clouds.yaml" -+ if not os.path.exists(os.path.expanduser(clouds_yaml)): -+ clouds_yaml = "/etc/openstack/clouds.yaml" -+ if not os.path.exists(os.path.expanduser(clouds_yaml)): -+ fail_usage("Failed: ~/.config/openstack/clouds.yaml and /etc/openstack/clouds.yaml does not exist") -+ -+ clouds_yaml = os.path.expanduser(clouds_yaml) -+ if os.path.exists(clouds_yaml): -+ with open(clouds_yaml, "r") as yaml_stream: -+ try: -+ clouds = yaml.safe_load(yaml_stream) -+ except yaml.YAMLError as exc: -+ fail_usage("Failed: Unable to read: " + clouds_yaml) -+ -+ cloud = clouds.get("clouds").get(options["--cloud"]) -+ if not cloud: -+ fail_usage("Cloud: {} not found.".format(options["--cloud"])) -+ -+ return cloud -+ -+ -+def get_nodes_list(conn, options): -+ logging.info("Running %s action", options["--action"]) -+ result = {} -+ response = conn.servers.list(detailed=True) -+ if response is not None: -+ for item in response: -+ instance_id = item.id -+ instance_name = item.name -+ instance_status = item.status -+ result[instance_id] = (instance_name, translate_status(instance_status)) -+ return result -+ -+ -+def get_power_status(conn, options): -+ logging.info("Running %s action on %s", options["--action"], options["--plug"]) -+ server = None -+ try: -+ server = conn.servers.get(options["--plug"]) -+ except NotFound as e: -+ fail_usage("Failed: Not Found: " + str(e)) -+ if server is None: -+ fail_usage("Server %s not found", options["--plug"]) -+ state = server.status -+ status = translate_status(state) -+ logging.info("get_power_status: %s (state: %s)" % (status, state)) -+ return status -+ -+ -+def set_power_status(conn, options): -+ logging.info("Running %s action on %s", options["--action"], options["--plug"]) -+ action = options["--action"] -+ server = None -+ try: -+ server = conn.servers.get(options["--plug"]) -+ except NotFound as e: -+ fail_usage("Failed: Not Found: " + str(e)) -+ if server is None: -+ fail_usage("Server %s not found", options["--plug"]) -+ if action == "on": -+ logging.info("Starting instance " + server.name) -+ try: -+ server.start() -+ except Conflict as e: -+ fail_usage(e) -+ logging.info("Called start API call for " + server.id) -+ if action == "off": -+ logging.info("Stopping instance " + server.name) -+ try: -+ server.stop() -+ except Conflict as e: -+ fail_usage(e) -+ logging.info("Called stop API call for " + server.id) -+ if action == "reboot": -+ logging.info("Rebooting instance " + server.name) -+ try: -+ server.reboot("HARD") -+ except Conflict as e: -+ fail_usage(e) -+ logging.info("Called reboot hard API call for " + server.id) -+ -+ -+def nova_login(username, password, projectname, auth_url, user_domain_name, -+ project_domain_name, ssl_insecure, cacert, apitimeout): -+ legacy_import = False -+ -+ try: -+ from keystoneauth1 import loading -+ from keystoneauth1 import session as ksc_session -+ from keystoneauth1.exceptions.discovery import DiscoveryFailure -+ from keystoneauth1.exceptions.http import Unauthorized -+ except ImportError: -+ try: -+ from keystoneclient import session as ksc_session -+ from keystoneclient.auth.identity import v3 -+ -+ legacy_import = True -+ except ImportError: -+ fail_usage("Failed: Keystone client not found or not accessible") -+ -+ if not legacy_import: -+ loader = loading.get_plugin_loader("password") -+ auth = loader.load_from_options( -+ auth_url=auth_url, -+ username=username, -+ password=password, -+ project_name=projectname, -+ user_domain_name=user_domain_name, -+ project_domain_name=project_domain_name, -+ ) -+ else: -+ auth = v3.Password( -+ auth_url=auth_url, -+ username=username, -+ password=password, -+ project_name=projectname, -+ user_domain_name=user_domain_name, -+ project_domain_name=project_domain_name, -+ cacert=cacert, -+ ) -+ -+ caverify=True -+ if ssl_insecure: -+ caverify=False -+ elif cacert: -+ caverify=cacert -+ -+ session = ksc_session.Session(auth=auth, verify=caverify, timeout=apitimeout) -+ nova = client.Client("2", session=session, timeout=apitimeout) -+ apiversion = None -+ try: -+ apiversion = nova.versions.get_current() -+ except DiscoveryFailure as e: -+ fail_usage("Failed: Discovery Failure: " + str(e)) -+ except Unauthorized as e: -+ fail_usage("Failed: Unauthorized: " + str(e)) -+ except Exception as e: -+ logging.error(e) -+ logging.debug("Nova version: %s", apiversion) -+ return nova - --def set_power_status(_, options): -- nova_run_command(options, options["--action"]) -- return -- --def nova_login(username,password,projectname,auth_url,user_domain_name,project_domain_name): -- auth=v3.Password(username=username,password=password,project_name=projectname,user_domain_name=user_domain_name,project_domain_name=project_domain_name,auth_url=auth_url) -- session = ksc_session.Session(auth=auth) -- keystone = ksclient.Client(session=session) -- nova = novaclient.Client(session=session) -- return nova -- --def nova_run_command(options,action,timeout=None): -- username=options["--username"] -- password=options["--password"] -- projectname=options["--project-name"] -- auth_url=options["--auth-url"] -- user_domain_name=options["--user-domain-name"] -- project_domain_name=options["--project-domain-name"] -- novaclient=nova_login(username,password,projectname,auth_url,user_domain_name,project_domain_name) -- server = novaclient.servers.get(options["--uuid"]) -- if action == "status": -- return server.status -- if action == "on": -- server.start() -- if action == "off": -- server.stop() -- if action == "reboot": -- server.reboot('REBOOT_HARD') - - def define_new_opts(): - all_opt["auth-url"] = { -- "getopt" : ":", -- "longopt" : "auth-url", -- "help" : "--auth-url=[authurl] Keystone Auth URL", -- "required" : "1", -- "shortdesc" : "Keystone Auth URL", -- "order": 1 -+ "getopt": ":", -+ "longopt": "auth-url", -+ "help": "--auth-url=[authurl] Keystone Auth URL", -+ "required": "0", -+ "shortdesc": "Keystone Auth URL", -+ "order": 2, - } - all_opt["project-name"] = { -- "getopt" : ":", -- "longopt" : "project-name", -- "help" : "--project-name=[project] Tenant Or Project Name", -- "required" : "1", -- "shortdesc" : "Keystone Project", -+ "getopt": ":", -+ "longopt": "project-name", -+ "help": "--project-name=[project] Tenant Or Project Name", -+ "required": "0", -+ "shortdesc": "Keystone Project", - "default": "admin", -- "order": 1 -+ "order": 3, - } - all_opt["user-domain-name"] = { -- "getopt" : ":", -- "longopt" : "user-domain-name", -- "help" : "--user-domain-name=[user-domain] Keystone User Domain Name", -- "required" : "0", -- "shortdesc" : "Keystone User Domain Name", -+ "getopt": ":", -+ "longopt": "user-domain-name", -+ "help": "--user-domain-name=[domain] Keystone User Domain Name", -+ "required": "0", -+ "shortdesc": "Keystone User Domain Name", - "default": "Default", -- "order": 1 -+ "order": 4, - } - all_opt["project-domain-name"] = { -- "getopt" : ":", -- "longopt" : "project-domain-name", -- "help" : "--project-domain-name=[project-domain] Keystone Project Domain Name", -- "required" : "0", -- "shortdesc" : "Keystone Project Domain Name", -+ "getopt": ":", -+ "longopt": "project-domain-name", -+ "help": "--project-domain-name=[domain] Keystone Project Domain Name", -+ "required": "0", -+ "shortdesc": "Keystone Project Domain Name", - "default": "Default", -- "order": 1 -+ "order": 5, -+ } -+ all_opt["cloud"] = { -+ "getopt": ":", -+ "longopt": "cloud", -+ "help": "--cloud=[cloud] Openstack cloud (from ~/.config/openstack/clouds.yaml or /etc/openstack/clouds.yaml).", -+ "required": "0", -+ "shortdesc": "Cloud from clouds.yaml", -+ "order": 6, -+ } -+ all_opt["openrc"] = { -+ "getopt": ":", -+ "longopt": "openrc", -+ "help": "--openrc=[openrc] Path to the openrc config file", -+ "required": "0", -+ "shortdesc": "openrc config file", -+ "order": 7, - } - all_opt["uuid"] = { -- "getopt" : ":", -- "longopt" : "uuid", -- "help" : "--uuid=[uuid] UUID of the nova instance", -- "required" : "1", -- "shortdesc" : "UUID of the nova instance", -- "order": 1 -+ "getopt": ":", -+ "longopt": "uuid", -+ "help": "--uuid=[uuid] Replaced by -n, --plug", -+ "required": "0", -+ "shortdesc": "Replaced by port/-n/--plug", -+ "order": 8, -+ } -+ all_opt["cacert"] = { -+ "getopt": ":", -+ "longopt": "cacert", -+ "help": "--cacert=[cacert] Path to the PEM file with trusted authority certificates (override global CA trust)", -+ "required": "0", -+ "shortdesc": "SSL X.509 certificates file", -+ "default": "", -+ "order": 9, -+ } -+ all_opt["apitimeout"] = { -+ "getopt": ":", -+ "type": "second", -+ "longopt": "apitimeout", -+ "help": "--apitimeout=[seconds] Timeout to use for API calls", -+ "shortdesc": "Timeout in seconds to use for API calls, default is 60.", -+ "required": "0", -+ "default": 60, -+ "order": 10, - } - -+ - def main(): -+ conn = None -+ -+ device_opt = [ -+ "login", -+ "no_login", -+ "passwd", -+ "no_password", -+ "auth-url", -+ "project-name", -+ "user-domain-name", -+ "project-domain-name", -+ "cloud", -+ "openrc", -+ "port", -+ "no_port", -+ "uuid", -+ "ssl_insecure", -+ "cacert", -+ "apitimeout", -+ ] -+ - atexit.register(atexit_handler) - -- device_opt = ["login", "passwd", "auth-url", "project-name", "user-domain-name", "project-domain-name", "uuid"] - define_new_opts() - -+ all_opt["port"]["required"] = "0" -+ all_opt["port"]["help"] = "-n, --plug=[UUID] UUID of the node to be fenced" -+ all_opt["port"]["shortdesc"] = "UUID of the node to be fenced." -+ all_opt["power_timeout"]["default"] = "60" -+ - options = check_input(device_opt, process_input(device_opt)) - -+ # workaround to avoid regressions -+ if "--uuid" in options: -+ options["--plug"] = options["--uuid"] -+ del options["--uuid"] -+ elif ("--help" not in options -+ and options["--action"] in ["off", "on", "reboot", "status", "validate-all"] -+ and "--plug" not in options): -+ stop_after_error = False if options["--action"] == "validate-all" else True -+ fail_usage( -+ "Failed: You have to enter plug number or machine identification", -+ stop_after_error, -+ ) -+ - docs = {} - docs["shortdesc"] = "Fence agent for OpenStack's Nova service" - docs["longdesc"] = "fence_openstack is a Fencing agent \ -@@ -116,9 +309,73 @@ - - run_delay(options) - -- result = fence_action(None, options, set_power_status, get_power_status,None) -+ if options.get("--cloud"): -+ cloud = get_cloud(options) -+ username = cloud.get("auth").get("username") -+ password = cloud.get("auth").get("password") -+ projectname = cloud.get("auth").get("project_name") -+ auth_url = None -+ try: -+ auth_url = cloud.get("auth").get("auth_url") -+ except KeyError: -+ fail_usage("Failed: You have to set the Keystone service endpoint for authorization") -+ user_domain_name = cloud.get("auth").get("user_domain_name") -+ project_domain_name = cloud.get("auth").get("project_domain_name") -+ caverify = cloud.get("verify") -+ if caverify in [True, False]: -+ options["--ssl-insecure"] = caverify -+ else: -+ options["--cacert"] = caverify -+ elif options.get("--openrc"): -+ if not os.path.exists(os.path.expanduser(options["--openrc"])): -+ fail_usage("Failed: {} does not exist".format(options.get("--openrc"))) -+ source_env(options["--openrc"]) -+ env = os.environ -+ username = env.get("OS_USERNAME") -+ password = env.get("OS_PASSWORD") -+ projectname = env.get("OS_PROJECT_NAME") -+ auth_url = None -+ try: -+ auth_url = env["OS_AUTH_URL"] -+ except KeyError: -+ fail_usage("Failed: You have to set the Keystone service endpoint for authorization") -+ user_domain_name = env.get("OS_USER_DOMAIN_NAME") -+ project_domain_name = env.get("OS_PROJECT_DOMAIN_NAME") -+ else: -+ username = options["--username"] -+ password = options["--password"] -+ projectname = options["--project-name"] -+ auth_url = None -+ try: -+ auth_url = options["--auth-url"] -+ except KeyError: -+ fail_usage("Failed: You have to set the Keystone service endpoint for authorization") -+ user_domain_name = options["--user-domain-name"] -+ project_domain_name = options["--project-domain-name"] -+ -+ ssl_insecure = "--ssl-insecure" in options -+ cacert = options["--cacert"] -+ apitimeout = options["--apitimeout"] -+ -+ try: -+ conn = nova_login( -+ username, -+ password, -+ projectname, -+ auth_url, -+ user_domain_name, -+ project_domain_name, -+ ssl_insecure, -+ cacert, -+ apitimeout, -+ ) -+ except Exception as e: -+ fail_usage("Failed: Unable to connect to Nova: " + str(e)) -+ -+ # Operate the fencing device -+ result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) - sys.exit(result) - -+ - if __name__ == "__main__": - main() -- diff --git a/SOURCES/bz1886074-4-fencing-source_env-dont-process-empty-lines.patch b/SOURCES/bz1886074-4-fencing-source_env-dont-process-empty-lines.patch deleted file mode 100644 index 8803895..0000000 --- a/SOURCES/bz1886074-4-fencing-source_env-dont-process-empty-lines.patch +++ /dev/null @@ -1,22 +0,0 @@ -From fbca33a536413565108374dd4ed3237b6f7896bd Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 15 Aug 2022 10:40:19 +0200 -Subject: [PATCH] fencing: source_env(): dont process empty lines - ---- - 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 fc3679e33..940bd01d1 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -1264,7 +1264,7 @@ def source_env(env_file): - executable="/bin/sh") - # replace env - os.environ.clear() -- os.environ.update(line.partition('=')[::2] for line in output.decode("utf-8").split('\0')) -+ os.environ.update(line.partition('=')[::2] for line in output.decode("utf-8").split('\0') if not re.match("^\s*$", line)) - - # Convert array of format [[key1, value1], [key2, value2], ... [keyN, valueN]] to dict, where key is - # in format a.b.c.d...z and returned dict has key only z diff --git a/SOURCES/bz1896827-fence_aws-add-imdsv2-support.patch b/SOURCES/bz1896827-fence_aws-add-imdsv2-support.patch deleted file mode 100644 index a5bdad3..0000000 --- a/SOURCES/bz1896827-fence_aws-add-imdsv2-support.patch +++ /dev/null @@ -1,40 +0,0 @@ -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 deleted file mode 100644 index 9642832..0000000 --- a/SOURCES/bz1906978-fence_gce-default-to-onoff.patch +++ /dev/null @@ -1,36 +0,0 @@ -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 deleted file mode 100644 index ee80db1..0000000 --- a/SOURCES/bz1914313-fence_zvmip-fix-disable-timeout.patch +++ /dev/null @@ -1,23 +0,0 @@ -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/SOURCES/bz1920947-fence_redfish-1-add-diag-action.patch b/SOURCES/bz1920947-fence_redfish-1-add-diag-action.patch deleted file mode 100644 index 68d2cda..0000000 --- a/SOURCES/bz1920947-fence_redfish-1-add-diag-action.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 570e04d68c3595b137b104ba723aa2e6ceca5a3a Mon Sep 17 00:00:00 2001 -From: Reid Wahl -Date: Wed, 27 Jan 2021 01:45:43 -0800 -Subject: [PATCH] fence_redfish: Add diag action - -Sends NMI to fenced node. - -Ref: - - http://redfish.dmtf.org/schemas/DSP2046_2020.3.html#redfish.dmtf.org/schemas/v1/ComputerSystem.json|details|ResetType - -Resolves: RHBZ#1920947 - -Signed-off-by: Reid Wahl ---- - agents/redfish/fence_redfish.py | 6 ++++-- - tests/data/metadata/fence_redfish.xml | 1 + - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 1b259576..9a7d604d 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -40,7 +40,8 @@ def set_power_status(conn, options): - action = { - 'on' : "On", - 'off': "ForceOff", -- 'reboot': "ForceRestart" -+ 'reboot': "ForceRestart", -+ 'diag': "Nmi" - }[options["--action"]] - - payload = {'ResetType': action} -@@ -119,7 +120,8 @@ def define_new_opts(): - - def main(): - atexit.register(atexit_handler) -- device_opt = ["ipaddr", "login", "passwd", "redfish-uri", "systems-uri", "ssl"] -+ device_opt = ["ipaddr", "login", "passwd", "redfish-uri", "systems-uri", -+ "ssl", "diag"] - define_new_opts() - - opt = process_input(device_opt) -diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml -index 6daf2cd9..fb112781 100644 ---- a/tests/data/metadata/fence_redfish.xml -+++ b/tests/data/metadata/fence_redfish.xml -@@ -187,5 +187,6 @@ - - - -+ - - diff --git a/SOURCES/bz1920947-fence_redfish-2-add-diag-action-logic.patch b/SOURCES/bz1920947-fence_redfish-2-add-diag-action-logic.patch deleted file mode 100644 index 3b328bb..0000000 --- a/SOURCES/bz1920947-fence_redfish-2-add-diag-action-logic.patch +++ /dev/null @@ -1,49 +0,0 @@ -From b50523850e7fe1ba73d4ff0ede193c9860eff2bc Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 7 May 2021 10:35:00 +0200 -Subject: [PATCH] fence_redfish: add missing diag logic - ---- - agents/redfish/fence_redfish.py | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index 9a7d604d3..0f5af523c 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -42,7 +42,7 @@ def set_power_status(conn, options): - 'off': "ForceOff", - 'reboot': "ForceRestart", - 'diag': "Nmi" -- }[options["--action"]] -+ }[options.get("original-action") or options["--action"]] - - payload = {'ResetType': action} - -@@ -56,6 +56,8 @@ def set_power_status(conn, options): - response = send_post_request(options, action_uri, payload) - if response['ret'] is False: - fail_usage("Error sending power command") -+ if options.get("original-action") == "diag": -+ return True - return - - def send_get_request(options, uri): -@@ -159,7 +161,16 @@ def main(): - else: - options["--systems-uri"] = sysresult["uri"] - -- result = fence_action(None, options, set_power_status, get_power_status, None) -+ reboot_fn = None -+ if options["--action"] == "diag": -+ # Diag is a special action that can't be verified so we will reuse reboot functionality -+ # to minimize impact on generic library -+ options["original-action"] = options["--action"] -+ options["--action"] = "reboot" -+ options["--method"] = "cycle" -+ reboot_fn = set_power_status -+ -+ result = fence_action(None, options, set_power_status, get_power_status, None, reboot_fn) - sys.exit(result) - - if __name__ == "__main__": diff --git a/SOURCES/bz1920947-fence_redfish-3-fix-typo.patch b/SOURCES/bz1920947-fence_redfish-3-fix-typo.patch deleted file mode 100644 index 24f49f3..0000000 --- a/SOURCES/bz1920947-fence_redfish-3-fix-typo.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 753e126d0b642159b3e936de76a814f753f0d918 Mon Sep 17 00:00:00 2001 -From: Jeffrey Cutter -Date: Mon, 16 Nov 2020 14:29:30 -0500 -Subject: [PATCH] fence_redfish: Fix typo in help. - ---- - agents/redfish/fence_redfish.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py -index c7c6492c6..1b259576e 100644 ---- a/agents/redfish/fence_redfish.py -+++ b/agents/redfish/fence_redfish.py -@@ -102,7 +102,7 @@ def define_new_opts(): - all_opt["redfish-uri"] = { - "getopt" : ":", - "longopt" : "redfish-uri", -- "help" : "--redfish-uri=[uri] Base or starting Redifsh URI", -+ "help" : "--redfish-uri=[uri] Base or starting Redfish URI", - "required" : "0", - "default" : "/redfish/v1", - "shortdesc" : "Base or starting Redfish URI", diff --git a/SOURCES/bz1922437-fence_mpath-watchdog-retry-support.patch b/SOURCES/bz1922437-fence_mpath-watchdog-retry-support.patch deleted file mode 100644 index 41d0c3d..0000000 --- a/SOURCES/bz1922437-fence_mpath-watchdog-retry-support.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 2c9ce6a7667e09010d498ca9d9bcf6e476123bbb Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 20 May 2021 12:51:12 +0200 -Subject: [PATCH] fence_mpath: watchdog retries support - -Added options to be able to be able to set number of retries and sleep between retries. ---- - agents/mpath/fence_mpath.py | 44 +++++++++++++++++++++-------- - tests/data/metadata/fence_mpath.xml | 4 ++- - 2 files changed, 35 insertions(+), 13 deletions(-) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index 08dab6536..61ab1f205 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -4,6 +4,7 @@ - import stat - import re - import os -+import time - import logging - import atexit - import ctypes -@@ -167,14 +168,20 @@ def dev_read(options, fail=True): - store_fh.close() - return dev_key - --def mpath_check_get_verbose(): -+def mpath_check_get_options(options): - try: -- f = open("/etc/sysconfig/watchdog", "r") -+ f = open("/etc/sysconfig/stonith", "r") - except IOError: -- return False -- match = re.search(r"^\s*verbose=yes", "".join(f.readlines()), re.MULTILINE) -+ return options -+ -+ match = re.findall(r"^\s*(\S*)\s*=\s*(\S*)\s*", "".join(f.readlines()), re.MULTILINE) -+ -+ for m in match: -+ options[m[0].lower()] = m[1].lower() -+ - f.close() -- return bool(match) -+ -+ return options - - def mpath_check(hardreboot=False): - if len(sys.argv) >= 3 and sys.argv[1] == "repair": -@@ -183,18 +190,27 @@ def mpath_check(hardreboot=False): - options["--mpathpersist-path"] = "/usr/sbin/mpathpersist" - options["--store-path"] = "/var/run/cluster" - options["--power-timeout"] = "5" -- if mpath_check_get_verbose(): -+ options["retry"] = "0" -+ options["retry-sleep"] = "1" -+ options = mpath_check_get_options(options) -+ if "verbose" in options and options["verbose"] == "yes": - logging.getLogger().setLevel(logging.DEBUG) - devs = dev_read(options, fail=False) - if not devs: - logging.error("No devices found") - return 0 - for dev, key in list(devs.items()): -- if key in get_registration_keys(options, dev, fail=False): -- logging.debug("key " + key + " registered with device " + dev) -- return 0 -- else: -- logging.debug("key " + key + " not registered with device " + dev) -+ for n in range(int(options["retry"]) + 1): -+ if n > 0: -+ logging.debug("retry: " + str(n) + " of " + options["retry"]) -+ if key in get_registration_keys(options, dev, fail=False): -+ logging.debug("key " + key + " registered with device " + dev) -+ return 0 -+ else: -+ logging.debug("key " + key + " not registered with device " + dev) -+ -+ if n < int(options["retry"]): -+ time.sleep(float(options["retry-sleep"])) - logging.debug("key " + key + " registered with any devices") - - if hardreboot == True: -@@ -289,7 +305,11 @@ def main(): - device(s). The result is that only registered nodes may write to the \ - device(s). When a node failure occurs, the fence_mpath agent will remove the \ - key belonging to the failed node from the device(s). The failed node will no \ --longer be able to write to the device(s). A manual reboot is required." -+longer be able to write to the device(s). A manual reboot is required.\ -+\n.P\n\ -+When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and \ -+verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it \ -+failing." - docs["vendorurl"] = "https://www.sourceware.org/dm/" - show_docs(options, docs) - -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index 524776aa0..0255d4b4e 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -1,7 +1,9 @@ - - - fence_mpath is an I/O fencing agent that uses SCSI-3 persistent reservations to control access multipath devices. Underlying devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. --The fence_mpath agent works by having a unique key for each node that has to be set in /etc/multipath.conf. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_mpath agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. -+The fence_mpath agent works by having a unique key for each node that has to be set in /etc/multipath.conf. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_mpath agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. -+ -+When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it failing. - https://www.sourceware.org/dm/ - - diff --git a/SOURCES/bz1925015-fence_ipmilan-add-fence_ipmilanplus.patch b/SOURCES/bz1925015-fence_ipmilan-add-fence_ipmilanplus.patch deleted file mode 100644 index c642704..0000000 --- a/SOURCES/bz1925015-fence_ipmilan-add-fence_ipmilanplus.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 08a4521f9361c7ca4877e691fa82cc0e8f51d707 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Wed, 3 Feb 2021 11:20:14 +0100 -Subject: [PATCH] Add fence_ipmilanplus as fence_ipmilan wrapper always - enabling lanplus - -Lanplus (IPMI protocol version 2) is the up-to-date protocol to -connect to all recent IPMI driven BMCs. -Using fence_ipmilan without lanplus=1 will fail on these. - -To get around compatibility issues (old HW might still exist), -a new fence_agent is introduced via link and basename check. ---- - agents/ipmilan/fence_ipmilan.py | 3 + - 9 files changed, 240 insertions(+) - create mode 100644 tests/data/metadata/fence_ipmilanplus.xml - -diff --git a/agents/ipmilan/fence_ipmilan.py b/agents/ipmilan/fence_ipmilan.py -index ee014e79..f751de69 100644 ---- a/agents/ipmilan/fence_ipmilan.py -+++ b/agents/ipmilan/fence_ipmilan.py -@@ -187,6 +187,8 @@ def main(): - all_opt["lanplus"]["default"] = "1" - elif os.path.basename(sys.argv[0]) == "fence_ilo5": - all_opt["lanplus"]["default"] = "1" -+ elif os.path.basename(sys.argv[0]) == "fence_ipmilanplus": -+ all_opt["lanplus"]["default"] = "1" - - all_opt["ipport"]["default"] = "623" - all_opt["method"]["help"] = "-m, --method=[method] Method to fence (onoff|cycle) (Default: onoff)\n" \ -@@ -206,6 +208,7 @@ def main(): - docs["symlink"] = [("fence_ilo3", "Fence agent for HP iLO3"), - ("fence_ilo4", "Fence agent for HP iLO4"), - ("fence_ilo5", "Fence agent for HP iLO5"), -+ ("fence_ipmilanplus", "Fence agent for IPMIv2 lanplus"), - ("fence_imm", "Fence agent for IBM Integrated Management Module"), - ("fence_idrac", "Fence agent for Dell iDRAC")] - show_docs(options, docs) diff --git a/SOURCES/bz1941989-fence_aws-add-filter-parameter.patch b/SOURCES/bz1941989-fence_aws-add-filter-parameter.patch deleted file mode 100644 index 18d457b..0000000 --- a/SOURCES/bz1941989-fence_aws-add-filter-parameter.patch +++ /dev/null @@ -1,91 +0,0 @@ -From d920421ccb3abb42ecb9ea3ba56948db00fe1c80 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 23 Mar 2021 12:14:11 +0100 -Subject: [PATCH] fence_aws: add filter parameter to be able to limit which - nodes are listed - ---- - agents/aws/fence_aws.py | 27 +++++++++++++++++++++------ - tests/data/metadata/fence_aws.xml | 5 +++++ - 2 files changed, 26 insertions(+), 6 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 8322df9ed..c947bf29c 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -38,8 +38,15 @@ def get_nodes_list(conn, options): - logger.info("Starting monitor operation") - result = {} - try: -- for instance in conn.instances.all(): -- result[instance.id] = ("", None) -+ if "--filter" in options: -+ filter_key = options["--filter"].split("=")[0].strip() -+ filter_value = options["--filter"].split("=")[1].strip() -+ filter = [{ "Name": filter_key, "Values": [filter_value] }] -+ for instance in conn.instances.filter(Filters=filter): -+ result[instance.id] = ("", None) -+ else: -+ for instance in conn.instances.all(): -+ result[instance.id] = ("", None) - except ClientError: - fail_usage("Failed: Incorrect Access Key or Secret Key.") - except EndpointConnectionError: -@@ -111,7 +118,7 @@ def define_new_opts(): - all_opt["region"] = { - "getopt" : "r:", - "longopt" : "region", -- "help" : "-r, --region=[region] Region, e.g. us-east-1", -+ "help" : "-r, --region=[region] Region, e.g. us-east-1", - "shortdesc" : "Region.", - "required" : "0", - "order" : 2 -@@ -132,21 +139,29 @@ def define_new_opts(): - "required" : "0", - "order" : 4 - } -+ all_opt["filter"] = { -+ "getopt" : ":", -+ "longopt" : "filter", -+ "help" : "--filter=[key=value] Filter (e.g. vpc-id=[vpc-XXYYZZAA]", -+ "shortdesc": "Filter for list-action", -+ "required": "0", -+ "order": 5 -+ } - all_opt["boto3_debug"] = { - "getopt" : "b:", - "longopt" : "boto3_debug", -- "help" : "-b, --boto3_debug=[option] Boto3 and Botocore library debug logging", -+ "help" : "-b, --boto3_debug=[option] Boto3 and Botocore library debug logging", - "shortdesc": "Boto Lib debug", - "required": "0", - "default": "False", -- "order": 5 -+ "order": 6 - } - - # Main agent method - def main(): - conn = None - -- device_opt = ["port", "no_password", "region", "access_key", "secret_key", "boto3_debug"] -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug"] - - atexit.register(atexit_handler) - -diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml -index 1f3ab3b97..a767e93c2 100644 ---- a/tests/data/metadata/fence_aws.xml -+++ b/tests/data/metadata/fence_aws.xml -@@ -36,6 +36,11 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht - - Secret Key. - -+ -+ -+ -+ Filter for list-action -+ - - - diff --git a/SOURCES/bz1942363-fence_gce-default-to-cycle.patch b/SOURCES/bz1942363-fence_gce-default-to-cycle.patch deleted file mode 100644 index 3034deb..0000000 --- a/SOURCES/bz1942363-fence_gce-default-to-cycle.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b8793b7cdacf0eb13e86581fcba1f78bb7a4bc13 Mon Sep 17 00:00:00 2001 -From: Tim Megela -Date: Thu, 11 Mar 2021 06:41:59 -0500 -Subject: [PATCH] Default method moved back to powercycle - -Moving back to powercycle as the default method for GCE. This is the recommended approach from Google. Using on/off as the default will have unintended consequences on google cloud platforms. ---- - agents/gce/fence_gce.py | 2 ++ - tests/data/metadata/fence_gce.xml | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 1784e1b70..d59ce2bad 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -358,6 +358,8 @@ 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 f09c771f3..bb5137878 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/bz1963163-fence_zvmip-add-ssl-tls-support.patch b/SOURCES/bz1963163-fence_zvmip-add-ssl-tls-support.patch deleted file mode 100644 index 1e43aa3..0000000 --- a/SOURCES/bz1963163-fence_zvmip-add-ssl-tls-support.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 81be3c529ec1165f3135b4f14fbec2a19403cfbe Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 27 Aug 2021 08:53:36 +0200 -Subject: [PATCH] fence_zvmip: add ssl/tls support - ---- - agents/zvm/fence_zvmip.py | 20 ++++++++++++++++---- - tests/data/metadata/fence_zvmip.xml | 19 +++++++++++++++++++ - 2 files changed, 35 insertions(+), 4 deletions(-) - -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index 001106a44..874eb699f 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -26,12 +26,22 @@ def open_socket(options): - except socket.gaierror: - fail(EC_LOGIN_DENIED) - -- conn = socket.socket() -+ if "--ssl" in options: -+ import ssl -+ sock = socket.socket() -+ sslcx = ssl.create_default_context() -+ if "--ssl-insecure" in options: -+ sslcx.check_hostname = False -+ sslcx.verify_mode = ssl.CERT_NONE -+ conn = sslcx.wrap_socket(sock, server_hostname=options["--ip"]) -+ else: -+ conn = socket.socket() - conn.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - conn.settimeout(float(options["--shell-timeout"]) or None) - try: - conn.connect(addr) -- except socket.error: -+ except socket.error as e: -+ logging.debug(e) - fail(EC_LOGIN_DENIED) - - return conn -@@ -122,11 +132,12 @@ def get_list_of_images(options, command, data_as_plug): - images = set() - - if output_len > 3*INT4: -+ recvflag = socket.MSG_WAITALL if "--ssl" not in options else 0 - array_len = struct.unpack("!i", conn.recv(INT4))[0] - data = "" - - while True: -- read_data = conn.recv(1024, socket.MSG_WAITALL).decode("UTF-8") -+ read_data = conn.recv(1024, recvflag).decode("UTF-8") - data += read_data - if array_len == len(data): - break -@@ -146,7 +157,8 @@ def get_list_of_images(options, command, data_as_plug): - return (return_code, reason_code, images) - - def main(): -- device_opt = ["ipaddr", "login", "passwd", "port", "method", "missing_as_off", "inet4_only", "inet6_only"] -+ device_opt = ["ipaddr", "login", "passwd", "port", "method", "missing_as_off", -+ "inet4_only", "inet6_only", "ssl"] - - atexit.register(atexit_handler) - -diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml -index f84115c08..d91192946 100644 ---- a/tests/data/metadata/fence_zvmip.xml -+++ b/tests/data/metadata/fence_zvmip.xml -@@ -91,6 +91,21 @@ to access the system's directory manager. - - Physical plug number on device, UUID or identification of machine - -+ -+ -+ -+ Use SSL connection with verifying certificate -+ -+ -+ -+ -+ Use SSL connection without verifying certificate -+ -+ -+ -+ -+ Use SSL connection with verifying certificate -+ - - - -@@ -181,6 +196,10 @@ to access the system's directory manager. - - Count of attempts to retry power on - -+ -+ -+ Path to gnutls-cli binary -+ - - - diff --git a/SOURCES/bz1969953-fence_gce-1-add-proxy-support.patch b/SOURCES/bz1969953-fence_gce-1-add-proxy-support.patch deleted file mode 100644 index 55dbc5b..0000000 --- a/SOURCES/bz1969953-fence_gce-1-add-proxy-support.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --color -uNr a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py ---- a/agents/gce/fence_gce.py 2021-06-11 14:57:01.138390529 +0200 -+++ b/agents/gce/fence_gce.py 2021-06-11 15:12:45.829855806 +0200 -@@ -1,6 +1,7 @@ - #!@PYTHON@ -tt - - import atexit -+import httplib2 - import logging - import os - import sys -@@ -18,6 +19,7 @@ - from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action - try: - import googleapiclient.discovery -+ import socks - try: - from google.oauth2.credentials import Credentials as GoogleCredentials - except: -@@ -189,13 +191,30 @@ - "required" : "0", - "order" : 9 - } -+ all_opt["proxyhost"] = { -+ "getopt" : ":", -+ "longopt" : "proxyhost", -+ "help" : "--proxyhost=[proxy_host] The proxy host to use, if one is needed to access the internet (Example: 10.122.0.33)", -+ "shortdesc" : "If a proxy is used for internet access, the proxy host should be specified.", -+ "required" : "0", -+ "order" : 10 -+ } -+ all_opt["proxyport"] = { -+ "getopt" : ":", -+ "type" : "integer", -+ "longopt" : "proxyport", -+ "help" : "--proxyport=[proxy_port] The proxy port to use, if one is needed to access the internet (Example: 3127)", -+ "shortdesc" : "If a proxy is used for internet access, the proxy port should be specified.", -+ "required" : "0", -+ "order" : 11 -+ } - - - def main(): - conn = None - - device_opt = ["port", "no_password", "zone", "project", "stackdriver-logging", -- "method", "serviceaccount"] -+ "method", "serviceaccount", "proxyhost", "proxyport"] - - atexit.register(atexit_handler) - -@@ -259,7 +278,17 @@ - credentials = GoogleCredentials.get_application_default() - logging.debug("using application default credentials") - -- conn = googleapiclient.discovery.build('compute', 'v1', credentials=credentials) -+ if options.get("--proxyhost") and options.get("--proxyport"): -+ proxy_info = httplib2.ProxyInfo( -+ proxy_type=socks.PROXY_TYPE_HTTP, -+ proxy_host=options.get("--proxyhost"), -+ proxy_port=int(options.get("--proxyport"))) -+ http = credentials.authorize(httplib2.Http(proxy_info=proxy_info)) -+ conn = googleapiclient.discovery.build( -+ 'compute', 'v1', http=http, cache_discovery=False) -+ else: -+ conn = googleapiclient.discovery.build( -+ 'compute', 'v1', credentials=credentials, cache_discovery=False) - except Exception as err: - fail_usage("Failed: Create GCE compute v1 connection: {}".format(str(err))) - diff --git a/SOURCES/bz1969953-fence_gce-2-bundled.patch b/SOURCES/bz1969953-fence_gce-2-bundled.patch deleted file mode 100644 index 5d857e7..0000000 --- a/SOURCES/bz1969953-fence_gce-2-bundled.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/agents/gce/fence_gce.py 2021-09-07 11:39:36.718667514 +0200 -+++ b/agents/gce/fence_gce.py 2021-09-07 11:39:30.423648309 +0200 -@@ -17,6 +17,7 @@ - - from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action - try: -+ sys.path.insert(0, '/usr/lib/fence-agents/bundled/google') - import googleapiclient.discovery - try: - from google.oauth2.credentials import Credentials as GoogleCredentials diff --git a/SOURCES/bz1969953-fence_gce-3-fix-httplib2-import.patch b/SOURCES/bz1969953-fence_gce-3-fix-httplib2-import.patch deleted file mode 100644 index a915239..0000000 --- a/SOURCES/bz1969953-fence_gce-3-fix-httplib2-import.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/agents/gce/fence_gce.py 2021-10-19 10:29:17.000000000 +0000 -+++ b/agents/gce/fence_gce.py 2021-10-26 15:26:11.348781027 +0000 -@@ -1,7 +1,6 @@ - #!@PYTHON@ -tt - - import atexit --import httplib2 - import logging - import os - import sys -@@ -19,6 +18,7 @@ - from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action - try: - sys.path.insert(0, '/usr/lib/fence-agents/bundled/google') -+ import httplib2 - import googleapiclient.discovery - import socks - try: diff --git a/SOURCES/bz1971683-fence_sbd-dont-spam-logs-disable-timeout.patch b/SOURCES/bz1971683-fence_sbd-dont-spam-logs-disable-timeout.patch deleted file mode 100644 index 393ca78..0000000 --- a/SOURCES/bz1971683-fence_sbd-dont-spam-logs-disable-timeout.patch +++ /dev/null @@ -1,23 +0,0 @@ -From b220f963934f69044a39109fa065a95cd0972183 Mon Sep 17 00:00:00 2001 -From: Hideo Yamauchi -Date: Fri, 2 Jul 2021 09:09:49 +0900 -Subject: [PATCH] Mid: fence_sbd: A warning message is output when - disable-timeout is enabled. - ---- - agents/sbd/fence_sbd.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/sbd/fence_sbd.py b/agents/sbd/fence_sbd.py -index 3ae8df6e3..0c876b16e 100644 ---- a/agents/sbd/fence_sbd.py -+++ b/agents/sbd/fence_sbd.py -@@ -398,7 +398,7 @@ def main(): - # then that defined within sbd we should report this. - power_timeout = int(options["--power-timeout"]) - sbd_msg_timeout = get_msg_timeout(options) -- if power_timeout <= sbd_msg_timeout: -+ if 0 < power_timeout <= sbd_msg_timeout: - logging.warn("power timeout needs to be \ - greater then sbd message timeout") - diff --git a/SOURCES/bz1977588-1-fencing-add-EC_FETCH_VM_UUID.patch b/SOURCES/bz1977588-1-fencing-add-EC_FETCH_VM_UUID.patch deleted file mode 100644 index e598bdf..0000000 --- a/SOURCES/bz1977588-1-fencing-add-EC_FETCH_VM_UUID.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --color -uNr a/lib/fencing.py.py b/lib/fencing.py.py ---- a/lib/fencing.py.py 2021-11-01 10:14:04.045398051 +0100 -+++ b/lib/fencing.py.py 2021-11-01 10:24:47.111235305 +0100 -@@ -29,6 +29,7 @@ - EC_STATUS_HMC = 9 - EC_PASSWORD_MISSING = 10 - EC_INVALID_PRIVILEGES = 11 -+EC_FETCH_VM_UUID = 12 - - LOG_FORMAT = "%(asctime)-15s %(levelname)s: %(message)s" - -@@ -574,7 +575,9 @@ - EC_STATUS_HMC : "Failed: Either unable to obtain correct plug status, " - "partition is not available or incorrect HMC version used", - EC_PASSWORD_MISSING : "Failed: You have to set login password", -- EC_INVALID_PRIVILEGES : "Failed: The user does not have the correct privileges to do the requested action." -+ EC_INVALID_PRIVILEGES : "Failed: The user does not have the correct privileges to do the requested action.", -+ EC_FETCH_VM_UUID : "Failed: Can not find VM UUID by its VM name given in the parameter." -+ - }[error_code] + "\n" - logging.error("%s\n", message) - if stop: diff --git a/SOURCES/bz1977588-2-fence_kubevirt.patch b/SOURCES/bz1977588-2-fence_kubevirt.patch deleted file mode 100644 index 9ac8927..0000000 --- a/SOURCES/bz1977588-2-fence_kubevirt.patch +++ /dev/null @@ -1,144 +0,0 @@ -diff --color -uNr a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_kubevirt.py ---- a/agents/kubevirt/fence_kubevirt.py 1970-01-01 01:00:00.000000000 +0100 -+++ b/agents/kubevirt/fence_kubevirt.py 2021-10-25 13:25:59.904501348 +0200 -@@ -0,0 +1,140 @@ -+#!@PYTHON@ -tt -+ -+import sys -+import logging -+sys.path.append("@FENCEAGENTSLIBDIR@") -+from fencing import * -+from fencing import fail, fail_usage, run_delay, EC_STATUS -+ -+try: -+ sys.path.insert(0, '/usr/lib/fence-agents/bundled/kubevirt') -+ from kubernetes.client.exceptions import ApiException -+except ImportError: -+ logging.error("Couldn\'t import kubernetes.client.exceptions.ApiException - not found or not accessible") -+ -+def get_nodes_list(conn, options): -+ logging.debug("Starting list/monitor operation") -+ result = {} -+ try: -+ apiversion = options.get("--apiversion") -+ namespace = options.get("--namespace") -+ include_uninitialized = True -+ vm_api = conn.resources.get(api_version=apiversion, kind='VirtualMachine') -+ vm_list = vm_api.get(namespace=namespace) -+ for vm in vm_list.items: -+ result[vm.metadata.name] = ("", None) -+ except Exception as e: -+ logging.error("Exception when calling VirtualMachine list: %s", e) -+ return result -+ -+def get_power_status(conn, options): -+ logging.debug("Starting get status operation") -+ try: -+ apiversion = options.get("--apiversion") -+ namespace = options.get("--namespace") -+ name = options.get("--plug") -+ vmi_api = conn.resources.get(api_version=apiversion, -+ kind='VirtualMachineInstance') -+ vmi = vmi_api.get(name=name, namespace=namespace) -+ if vmi is not None: -+ phase = vmi.status.phase -+ if phase == "Running": -+ return "on" -+ return "off" -+ except ApiException as e: -+ if e.status == 404: -+ return "off" -+ logging.error("Failed to get power status, with API Exception: %s", e) -+ fail(EC_STATUS) -+ except Exception as e: -+ logging.error("Failed to get power status, with Exception: %s", e) -+ fail(EC_STATUS) -+ -+def set_power_status(conn, options): -+ logging.debug("Starting set status operation") -+ try: -+ apiversion= options.get("--apiversion") -+ namespace = options.get("--namespace") -+ name = options.get("--plug") -+ action = 'start' if options["--action"] == "on" else 'stop' -+ virtctl_vm_action(conn, action, namespace, name, apiversion) -+ except Exception as e: -+ logging.error("Failed to set power status, with Exception: %s", e) -+ fail(EC_STATUS) -+ -+def define_new_opts(): -+ all_opt["namespace"] = { -+ "getopt" : ":", -+ "longopt" : "namespace", -+ "help" : "--namespace=[namespace] Namespace of the KubeVirt machine", -+ "shortdesc" : "Namespace of the KubeVirt machine.", -+ "required" : "1", -+ "order" : 2 -+ } -+ all_opt["kubeconfig"] = { -+ "getopt" : ":", -+ "longopt" : "kubeconfig", -+ "help" : "--kubeconfig=[kubeconfig] Kubeconfig file path", -+ "shortdesc": "Kubeconfig file path", -+ "required": "0", -+ "order": 4 -+ } -+ all_opt["apiversion"] = { -+ "getopt" : ":", -+ "longopt" : "apiversion", -+ "help" : "--apiversion=[apiversion] Version of the KubeVirt API", -+ "shortdesc" : "Version of the KubeVirt API.", -+ "required" : "0", -+ "default" : "kubevirt.io/v1", -+ "order" : 5 -+ } -+ -+def virtctl_vm_action(conn, action, namespace, name, apiversion): -+ path = '/apis/subresources.{api_version}/namespaces/{namespace}/virtualmachines/{name}/{action}' -+ path = path.format(api_version=apiversion, namespace=namespace, name=name, action=action) -+ return conn.request('put', path, header_params={'accept': '*/*'}) -+ -+def validate_options(required_options_list, options): -+ for required_option in required_options_list: -+ if required_option not in options: -+ fail_usage("Failed: %s option must be provided" % required_option) -+ -+# Main agent method -+def main(): -+ conn = None -+ -+ device_opt = ["port", "namespace", "kubeconfig", "ssl_insecure", "no_password", "apiversion"] -+ define_new_opts() -+ options = check_input(device_opt, process_input(device_opt)) -+ -+ docs = {} -+ docs["shortdesc"] = "Fence agent for KubeVirt" -+ docs["longdesc"] = "fence_kubevirt is an I/O Fencing agent for KubeVirt." -+ docs["vendorurl"] = "https://kubevirt.io/" -+ show_docs(options, docs) -+ -+ run_delay(options) -+ -+ validate_options(['--namespace'], options) -+ -+ # Disable insecure-certificate-warning message -+ if "--ssl-insecure" in options: -+ import urllib3 -+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) -+ -+ try: -+ from kubernetes import config -+ from openshift.dynamic import DynamicClient -+ kubeconfig = options.get('--kubeconfig') -+ k8s_client = config.new_client_from_config(config_file=kubeconfig) -+ conn = DynamicClient(k8s_client) -+ except ImportError: -+ logging.error("Couldn\'t import kubernetes.config or " -+ "openshift.dynamic.DynamicClient - not found or not accessible") -+ -+ # Operate the fencing device -+ result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) -+ sys.exit(result) -+ -+if __name__ == "__main__": -+ main() diff --git a/SOURCES/bz1977588-3-fence_kubevirt-fix-status.patch b/SOURCES/bz1977588-3-fence_kubevirt-fix-status.patch deleted file mode 100644 index fb62dd2..0000000 --- a/SOURCES/bz1977588-3-fence_kubevirt-fix-status.patch +++ /dev/null @@ -1,55 +0,0 @@ -From c23bfc3b9fc6e1dc7b1350e340171f3827fb6fb7 Mon Sep 17 00:00:00 2001 -From: Nir Argaman -Date: Mon, 1 Nov 2021 08:34:00 +0200 -Subject: [PATCH] fence_kubevirt: Fix kubevirt VM status - ---- - agents/kubevirt/fence_kubevirt.py | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_kubevirt.py -index 70c14d89a..61ffcaa09 100755 ---- a/agents/kubevirt/fence_kubevirt.py -+++ b/agents/kubevirt/fence_kubevirt.py -@@ -4,7 +4,7 @@ - import logging - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * --from fencing import fail, fail_usage, run_delay, EC_STATUS -+from fencing import fail, fail_usage, run_delay, EC_STATUS, EC_FETCH_VM_UUID - - try: - from kubernetes.client.exceptions import ApiException -@@ -35,13 +35,15 @@ def get_power_status(conn, options): - vmi_api = conn.resources.get(api_version=apiversion, - kind='VirtualMachineInstance') - vmi = vmi_api.get(name=name, namespace=namespace) -- if vmi is not None: -- phase = vmi.status.phase -- if phase == "Running": -- return "on" -- return "off" -+ return translate_status(vmi.status.phase) - except ApiException as e: - if e.status == 404: -+ try: -+ vm_api = conn.resources.get(api_version=apiversion, kind='VirtualMachine') -+ vm = vm_api.get(name=name, namespace=namespace) -+ except ApiException as e: -+ logging.error("VM %s doesn't exist", name) -+ fail(EC_FETCH_VM_UUID) - return "off" - logging.error("Failed to get power status, with API Exception: %s", e) - fail(EC_STATUS) -@@ -49,6 +51,11 @@ def get_power_status(conn, options): - logging.error("Failed to get power status, with Exception: %s", e) - fail(EC_STATUS) - -+def translate_status(instance_status): -+ if instance_status == "Running": -+ return "on" -+ return "unknown" -+ - def set_power_status(conn, options): - logging.debug("Starting set status operation") - try: diff --git a/SOURCES/bz1977588-4-fence_kubevirt-power-timeout-40s.patch b/SOURCES/bz1977588-4-fence_kubevirt-power-timeout-40s.patch deleted file mode 100644 index 684a46c..0000000 --- a/SOURCES/bz1977588-4-fence_kubevirt-power-timeout-40s.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a3d8ce78ed5687954847560f77daafe6474de33f Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 2 Nov 2021 09:44:33 +0100 -Subject: [PATCH] fence_kubevirt: set default power-timeout to 40s - ---- - agents/kubevirt/fence_kubevirt.py | 6 ++++++ - tests/data/metadata/fence_kubevirt.xml | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_kubevirt.py -index 61ffcaa09..8392b75a0 100755 ---- a/agents/kubevirt/fence_kubevirt.py -+++ b/agents/kubevirt/fence_kubevirt.py -@@ -2,6 +2,7 @@ - - import sys - import logging -+import atexit - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * - from fencing import fail, fail_usage, run_delay, EC_STATUS, EC_FETCH_VM_UUID -@@ -110,7 +111,12 @@ def main(): - conn = None - - device_opt = ["port", "namespace", "kubeconfig", "ssl_insecure", "no_password", "apiversion"] -+ -+ atexit.register(atexit_handler) - define_new_opts() -+ -+ all_opt["power_timeout"]["default"] = "40" -+ - options = check_input(device_opt, process_input(device_opt)) - - docs = {} diff --git a/SOURCES/bz1977588-5-fence_kubevirt-get-namespace-from-context.patch b/SOURCES/bz1977588-5-fence_kubevirt-get-namespace-from-context.patch deleted file mode 100644 index aa394e0..0000000 --- a/SOURCES/bz1977588-5-fence_kubevirt-get-namespace-from-context.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 647841dea9d93922779a4aa7d0b5f52f5bc2b4e9 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Thu, 13 Jan 2022 14:57:26 +0200 -Subject: [PATCH] fence_kubevirt: take default namespace from context - -If --namespace is not provided to kubectl, a default one is taken from -kubeconfig context. Let fence_kubevirt behave similarly. - -Signed-off-by: Dan Kenigsberg ---- - agents/kubevirt/fence_kubevirt.py | 24 +++++++++++++----------- - 2 files changed, 14 insertions(+), 12 deletions(-) - -diff --git a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_kubevirt.py -index 8392b75a0..8c27a0334 100755 ---- a/agents/kubevirt/fence_kubevirt.py -+++ b/agents/kubevirt/fence_kubevirt.py -@@ -12,12 +12,21 @@ - except ImportError: - logging.error("Couldn\'t import kubernetes.client.exceptions.ApiException - not found or not accessible") - -+def _get_namespace(options): -+ from kubernetes import config -+ -+ ns = options.get("--namespace") -+ if ns is None: -+ ns = config.kube_config.list_kube_config_contexts()[1]['context']['namespace'] -+ -+ return ns -+ - def get_nodes_list(conn, options): - logging.debug("Starting list/monitor operation") - result = {} - try: - apiversion = options.get("--apiversion") -- namespace = options.get("--namespace") -+ namespace = _get_namespace(options) - include_uninitialized = True - vm_api = conn.resources.get(api_version=apiversion, kind='VirtualMachine') - vm_list = vm_api.get(namespace=namespace) -@@ -31,7 +40,7 @@ def get_power_status(conn, options): - logging.debug("Starting get status operation") - try: - apiversion = options.get("--apiversion") -- namespace = options.get("--namespace") -+ namespace = _get_namespace(options) - name = options.get("--plug") - vmi_api = conn.resources.get(api_version=apiversion, - kind='VirtualMachineInstance') -@@ -61,7 +70,7 @@ def set_power_status(conn, options): - logging.debug("Starting set status operation") - try: - apiversion= options.get("--apiversion") -- namespace = options.get("--namespace") -+ namespace = _get_namespace(options) - name = options.get("--plug") - action = 'start' if options["--action"] == "on" else 'stop' - virtctl_vm_action(conn, action, namespace, name, apiversion) -@@ -75,7 +84,7 @@ def define_new_opts(): - "longopt" : "namespace", - "help" : "--namespace=[namespace] Namespace of the KubeVirt machine", - "shortdesc" : "Namespace of the KubeVirt machine.", -- "required" : "1", -+ "required" : "0", - "order" : 2 - } - all_opt["kubeconfig"] = { -@@ -101,11 +110,6 @@ def virtctl_vm_action(conn, action, namespace, name, apiversion): - path = path.format(api_version=apiversion, namespace=namespace, name=name, action=action) - return conn.request('put', path, header_params={'accept': '*/*'}) - --def validate_options(required_options_list, options): -- for required_option in required_options_list: -- if required_option not in options: -- fail_usage("Failed: %s option must be provided" % required_option) -- - # Main agent method - def main(): - conn = None -@@ -127,8 +131,6 @@ def main(): - - run_delay(options) - -- validate_options(['--namespace'], options) -- - # Disable insecure-certificate-warning message - if "--ssl-insecure" in options: - import urllib3 diff --git a/SOURCES/bz2010710-1-fence_amt_ws-fix-or-dead-code.patch b/SOURCES/bz2010710-1-fence_amt_ws-fix-or-dead-code.patch deleted file mode 100644 index bdbeab0..0000000 --- a/SOURCES/bz2010710-1-fence_amt_ws-fix-or-dead-code.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 06855a8227fa91f6216119daa3d32d5858c62837 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 27 Sep 2021 12:05:41 +0200 -Subject: [PATCH] fence_amt_ws: fix "or" causing dead code - ---- - agents/amt_ws/fence_amt_ws.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/amt_ws/fence_amt_ws.py b/agents/amt_ws/fence_amt_ws.py -index 23c8a61a4..122cec309 100755 ---- a/agents/amt_ws/fence_amt_ws.py -+++ b/agents/amt_ws/fence_amt_ws.py -@@ -148,7 +148,7 @@ def set_boot_order(_, client, options): - - if options["--boot-option"] == "pxe": - device = "Intel(r) AMT: Force PXE Boot" -- elif options["--boot-option"] == "hd" or "hdsafe": -+ elif options["--boot-option"] in ["hd", "hdsafe"]: - device = "Intel(r) AMT: Force Hard-drive Boot" - elif options["--boot-option"] == "cd": - device = "Intel(r) AMT: Force CD/DVD Boot" diff --git a/SOURCES/bz2010710-2-fence_amt_ws-boot-option.patch b/SOURCES/bz2010710-2-fence_amt_ws-boot-option.patch deleted file mode 100644 index dd37fef..0000000 --- a/SOURCES/bz2010710-2-fence_amt_ws-boot-option.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9812473270e9a404c632358c1debfa4a1fb440fe Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 20 Oct 2021 15:46:42 +0200 -Subject: [PATCH] fence_amt_ws: fix --boot-option (choices are uppercased while - getting parsed) - ---- - agents/amt_ws/fence_amt_ws.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/agents/amt_ws/fence_amt_ws.py b/agents/amt_ws/fence_amt_ws.py -index 122cec309..5e7452a97 100755 ---- a/agents/amt_ws/fence_amt_ws.py -+++ b/agents/amt_ws/fence_amt_ws.py -@@ -146,13 +146,13 @@ def set_boot_order(_, client, options): - wsman = 'http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd' - namespace = CIM_BootConfigSetting - -- if options["--boot-option"] == "pxe": -+ if options["--boot-option"] == "PXE": - device = "Intel(r) AMT: Force PXE Boot" -- elif options["--boot-option"] in ["hd", "hdsafe"]: -+ elif options["--boot-option"] in ["HD", "HDSAFE"]: - device = "Intel(r) AMT: Force Hard-drive Boot" -- elif options["--boot-option"] == "cd": -+ elif options["--boot-option"] == "CD": - device = "Intel(r) AMT: Force CD/DVD Boot" -- elif options["--boot-option"] == "diag": -+ elif options["--boot-option"] == "DIAG": - device = "Intel(r) AMT: Force Diagnostic Boot" - else: - logging.error('Boot device: %s not supported.', \ diff --git a/SOURCES/bz2048857-fence_aws-botocore-bundled.patch b/SOURCES/bz2048857-fence_aws-botocore-bundled.patch deleted file mode 100644 index 7e31da1..0000000 --- a/SOURCES/bz2048857-fence_aws-botocore-bundled.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/agents/aws/fence_aws.py 2022-02-09 10:51:19.579385154 +0100 -+++ b/agents/aws/fence_aws.py 2022-02-09 10:51:47.148478185 +0100 -@@ -7,6 +7,8 @@ - from fencing import * - from fencing import fail, fail_usage, run_delay, EC_STATUS, SyslogLibHandler - -+sys.path.insert(0, '/usr/lib/fence-agents/bundled/aws') -+ - import requests - import boto3 - from requests import HTTPError diff --git a/SOURCES/bz2072421-1-all-agents-unify-ssl-parameters.patch b/SOURCES/bz2072421-1-all-agents-unify-ssl-parameters.patch deleted file mode 100644 index d783a47..0000000 --- a/SOURCES/bz2072421-1-all-agents-unify-ssl-parameters.patch +++ /dev/null @@ -1,243 +0,0 @@ -From 999f2f8b4dc7d258679daf8c3f13d9b317ff4435 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 7 Apr 2022 13:11:12 +0200 -Subject: [PATCH] all agents: unify ssl parameters to avoid having to use --ssl - when using --ssl-secure/--ssl-insecure for some agents - -THIS MIGHT BREAK SETUPS USING fence_docker or fence_pve! ---- - agents/cisco_ucs/fence_cisco_ucs.py | 9 +++++---- - agents/docker/fence_docker.py | 9 ++++++--- - agents/rhevm/fence_rhevm.py | 8 ++++---- - agents/vmware_rest/fence_vmware_rest.py | 8 ++++---- - agents/vmware_soap/fence_vmware_soap.py | 2 +- - agents/vmware_vcloud/fence_vmware_vcloud.py | 4 ++-- - agents/zvm/fence_zvmip.py | 8 +++++--- - lib/fencing.py.py | 6 ++++++ - tests/data/metadata/fence_docker.xml | 4 ++-- - 13 files changed, 64 insertions(+), 31 deletions(-) - -diff --git a/agents/cisco_ucs/fence_cisco_ucs.py b/agents/cisco_ucs/fence_cisco_ucs.py -index 2280dbbc7..b85379a73 100644 ---- a/agents/cisco_ucs/fence_cisco_ucs.py -+++ b/agents/cisco_ucs/fence_cisco_ucs.py -@@ -99,7 +99,7 @@ def get_list(conn, options): - - def send_command(opt, command, timeout): - ## setup correct URL -- if "--ssl" in opt or "--ssl-secure" in opt or "--ssl-insecure" in opt: -+ if "--ssl-secure" in opt or "--ssl-insecure" in opt: - url = "https:" - else: - url = "http:" -@@ -114,13 +114,14 @@ def send_command(opt, command, timeout): - conn.setopt(pycurl.POSTFIELDS, command.encode("ascii")) - conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) - conn.setopt(pycurl.TIMEOUT, timeout) -- if "--ssl" in opt or "--ssl-secure" in opt: -+ -+ if "--ssl-secure" in opt: - conn.setopt(pycurl.SSL_VERIFYPEER, 1) - conn.setopt(pycurl.SSL_VERIFYHOST, 2) -- -- if "--ssl-insecure" in opt: -+ elif "--ssl-insecure" in opt: - conn.setopt(pycurl.SSL_VERIFYPEER, 0) - conn.setopt(pycurl.SSL_VERIFYHOST, 0) -+ - conn.perform() - result = web_buffer.getvalue().decode() - -diff --git a/agents/docker/fence_docker.py b/agents/docker/fence_docker.py -index fef87da86..004402518 100644 ---- a/agents/docker/fence_docker.py -+++ b/agents/docker/fence_docker.py -@@ -43,7 +43,7 @@ def get_list(conn, options): - - - def send_cmd(options, cmd, post = False): -- url = "http%s://%s:%s/v%s/%s" % ("s" if "--ssl" in options else "", options["--ip"], options["--ipport"], options["--api-version"], cmd) -+ url = "http%s://%s:%s/v%s/%s" % ("s" if "--ssl-secure" in options or "--ssl-insecure" in options else "", options["--ip"], options["--ipport"], options["--api-version"], cmd) - conn = pycurl.Curl() - output_buffer = io.BytesIO() - if logging.getLogger().getEffectiveLevel() < logging.WARNING: -@@ -55,7 +55,8 @@ def send_cmd(options, cmd, post = False): - conn.setopt(pycurl.POSTFIELDSIZE, 0) - conn.setopt(pycurl.WRITEFUNCTION, output_buffer.write) - conn.setopt(pycurl.TIMEOUT, int(options["--shell-timeout"])) -- if "--ssl" in options: -+ -+ if "--ssl-secure" in options: - if not (set(("--tlscert", "--tlskey", "--tlscacert")) <= set(options)): - fail_usage("Failed. If --ssl option is used, You have to also \ - specify: --tlscert, --tlskey and --tlscacert") -@@ -63,7 +64,7 @@ def send_cmd(options, cmd, post = False): - conn.setopt(pycurl.SSLCERT, options["--tlscert"]) - conn.setopt(pycurl.SSLKEY, options["--tlskey"]) - conn.setopt(pycurl.CAINFO, options["--tlscacert"]) -- else: -+ elif "--ssl-insecure" in options: - conn.setopt(pycurl.SSL_VERIFYPEER, 0) - conn.setopt(pycurl.SSL_VERIFYHOST, 0) - -@@ -136,6 +137,8 @@ def main(): - - device_opt = ["ipaddr", "no_password", "no_login", "port", "method", "web", "tlscert", "tlskey", "tlscacert", "ssl", "api_version"] - -+ all_opt["ssl"]["default"] = "1" -+ - options = check_input(device_opt, process_input(device_opt)) - - docs = { } -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index 25aecbe58..5f74d06f6 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -85,7 +85,7 @@ def send_command(opt, command, method="GET"): - logging.debug("auto-detected API version: " + opt["--api-version"]) - - ## setup correct URL -- if "--ssl" in opt or "--ssl-secure" in opt or "--ssl-insecure" in opt: -+ if "--ssl-secure" in opt or "--ssl-insecure" in opt: - url = "https:" - else: - url = "http:" -@@ -126,11 +126,11 @@ def send_command(opt, command, method="GET"): - conn.setopt(pycurl.COOKIEJAR, cookie_file) - - conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) -- if "--ssl" in opt or "--ssl-secure" in opt: -+ -+ if "--ssl-secure" in opt: - conn.setopt(pycurl.SSL_VERIFYPEER, 1) - conn.setopt(pycurl.SSL_VERIFYHOST, 2) -- -- if "--ssl-insecure" in opt: -+ elif "--ssl-insecure" in opt: - conn.setopt(pycurl.SSL_VERIFYPEER, 0) - conn.setopt(pycurl.SSL_VERIFYHOST, 0) - -diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py -index e49fd5663..4b884fc62 100644 ---- a/agents/vmware_rest/fence_vmware_rest.py -+++ b/agents/vmware_rest/fence_vmware_rest.py -@@ -69,7 +69,7 @@ def connect(opt): - conn = pycurl.Curl() - - ## setup correct URL -- if "--ssl" in opt or "--ssl-secure" in opt or "--ssl-insecure" in opt: -+ if "--ssl-secure" in opt or "--ssl-insecure" in opt: - conn.base_url = "https:" - else: - conn.base_url = "http:" -@@ -89,11 +89,11 @@ def connect(opt): - conn.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"]) - - conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) -- if "--ssl" in opt or "--ssl-secure" in opt: -+ -+ if "--ssl-secure" in opt: - conn.setopt(pycurl.SSL_VERIFYPEER, 1) - conn.setopt(pycurl.SSL_VERIFYHOST, 2) -- -- if "--ssl-insecure" in opt: -+ elif "--ssl-insecure" in opt: - conn.setopt(pycurl.SSL_VERIFYPEER, 0) - conn.setopt(pycurl.SSL_VERIFYHOST, 0) - -diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py -index 2cd45e0b3..51fb0f147 100644 ---- a/agents/vmware_soap/fence_vmware_soap.py -+++ b/agents/vmware_soap/fence_vmware_soap.py -@@ -34,7 +34,7 @@ def send(self, request): - def soap_login(options): - run_delay(options) - -- if "--ssl" in options or "--ssl-secure" in options or "--ssl-insecure" in options: -+ if "--ssl-secure" in options or "--ssl-insecure" in options: - if "--ssl-insecure" in options: - import ssl - import urllib3 -diff --git a/agents/vmware_vcloud/fence_vmware_vcloud.py b/agents/vmware_vcloud/fence_vmware_vcloud.py -index 42372a83d..7626b82bb 100644 ---- a/agents/vmware_vcloud/fence_vmware_vcloud.py -+++ b/agents/vmware_vcloud/fence_vmware_vcloud.py -@@ -60,7 +60,7 @@ def connect(opt): - conn = pycurl.Curl() - - ## setup correct URL -- if "--ssl" in opt or "--ssl-secure" in opt or "--ssl-insecure" in opt: -+ if "--ssl-secure" in opt or "--ssl-insecure" in opt: - conn.base_url = "https:" - else: - conn.base_url = "http:" -@@ -76,7 +76,7 @@ def connect(opt): - conn.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"]) - - conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) -- if "--ssl" in opt or "--ssl-secure" in opt: -+ if "--ssl-secure" in opt: - conn.setopt(pycurl.SSL_VERIFYPEER, 1) - conn.setopt(pycurl.SSL_VERIFYHOST, 2) - elif "--ssl-insecure" in opt: -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index e8f849eda..90ca95d45 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -26,7 +26,7 @@ def open_socket(options): - except socket.gaierror: - fail(EC_LOGIN_DENIED) - -- if "--ssl" in options: -+ if "--ssl-secure" in options or "--ssl-insecure" in options: - import ssl - sock = socket.socket() - sslcx = ssl.create_default_context() -@@ -132,7 +132,7 @@ def get_list_of_images(options, command, data_as_plug): - images = set() - - if output_len > 3*INT4: -- recvflag = socket.MSG_WAITALL if "--ssl" not in options else 0 -+ recvflag = socket.MSG_WAITALL if "--ssl-secure" not in options and "--ssl-insecure" not in options else 0 - array_len = struct.unpack("!i", conn.recv(INT4))[0] - data = "" - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 696388d55..b746ede8b 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -789,6 +789,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 "--ssl-secure" in options or "--ssl-insecure" in options: -+ options["--ssl"] = "" -+ -+ if "--ssl" in options and "--ssl-insecure" not in options: -+ options["--ssl-secure"] = "" -+ - if os.environ.get("PCMK_service") == "pacemaker-fenced" and "--disable-timeout" not in options: - options["--disable-timeout"] = "1" - -diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml -index 723e72280..51c7c470a 100644 ---- a/tests/data/metadata/fence_docker.xml -+++ b/tests/data/metadata/fence_docker.xml -@@ -20,7 +20,7 @@ - - - -- -+ - TCP/UDP port to use for connection with device - - -@@ -43,7 +43,7 @@ - - - -- -+ - Use SSL connection with verifying certificate - - diff --git a/SOURCES/bz2072421-2-fence_zvmip-connect-error.patch b/SOURCES/bz2072421-2-fence_zvmip-connect-error.patch deleted file mode 100644 index 1a1bd97..0000000 --- a/SOURCES/bz2072421-2-fence_zvmip-connect-error.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6430104318b4bf349425b08636183bf839812e04 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 31 May 2022 08:55:25 +0200 -Subject: [PATCH] fence_zvmip: show unable to connect error instead of full - stacktrace, e.g. when not using --ssl for SSL devices - ---- - agents/zvm/fence_zvmip.py | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/agents/zvm/fence_zvmip.py b/agents/zvm/fence_zvmip.py -index 90ca95d45..4f538e10d 100644 ---- a/agents/zvm/fence_zvmip.py -+++ b/agents/zvm/fence_zvmip.py -@@ -127,8 +127,13 @@ def get_list_of_images(options, command, data_as_plug): - - conn.send(packet) - -- request_id = struct.unpack("!i", conn.recv(INT4))[0] -- (output_len, request_id, return_code, reason_code) = struct.unpack("!iiii", conn.recv(INT4 * 4)) -+ try: -+ request_id = struct.unpack("!i", conn.recv(INT4))[0] -+ (output_len, request_id, return_code, reason_code) = struct.unpack("!iiii", conn.recv(INT4 * 4)) -+ except struct.error: -+ logging.debug(sys.exc_info()) -+ fail_usage("Failed: Unable to connect to {} port: {} SSL: {} \n".format(options["--ip"], options["--ipport"], bool("--ssl" in options))) -+ - images = set() - - if output_len > 3*INT4: diff --git a/SOURCES/bz2078244-fence_gce-update.patch b/SOURCES/bz2078244-fence_gce-update.patch deleted file mode 100644 index 444daf3..0000000 --- a/SOURCES/bz2078244-fence_gce-update.patch +++ /dev/null @@ -1,563 +0,0 @@ ---- fence-agents-4.2.1/agents/gce/fence_gce.py 2022-04-28 15:58:42.949723547 +0200 -+++ fence-agents-4.2.1/agents/gce/fence_gce.py2 2022-04-28 15:59:21.054915265 +0200 -@@ -1,10 +1,22 @@ - #!@PYTHON@ -tt - -+# -+# Requires the googleapiclient and oauth2client -+# RHEL 7.x: google-api-python-client==1.6.7 python-gflags==2.0 pyasn1==0.4.8 rsa==3.4.2 pysocks==1.7.1 httplib2==0.19.0 -+# RHEL 8.x: pysocks==1.7.1 httplib2==0.19.0 -+# SLES 12.x: python-google-api-python-client python-oauth2client python-oauth2client-gce pysocks==1.7.1 httplib2==0.19.0 -+# SLES 15.x: python3-google-api-python-client python3-oauth2client pysocks==1.7.1 httplib2==0.19.0 -+# -+ - import atexit - import logging -+import json -+import re - import os -+import socket - import sys - import time -+ - if sys.version_info >= (3, 0): - # Python 3 imports. - import urllib.parse as urlparse -@@ -15,7 +27,7 @@ - import urllib2 as urlrequest - sys.path.append("@FENCEAGENTSLIBDIR@") - --from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action -+from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action, run_command - try: - sys.path.insert(0, '/usr/lib/fence-agents/bundled/google') - import httplib2 -@@ -30,6 +42,85 @@ - - METADATA_SERVER = 'http://metadata.google.internal/computeMetadata/v1/' - METADATA_HEADERS = {'Metadata-Flavor': 'Google'} -+INSTANCE_LINK = 'https://www.googleapis.com/compute/v1/projects/{}/zones/{}/instances/{}' -+ -+def run_on_fail(options): -+ if "--runonfail" in options: -+ run_command(options, options["--runonfail"]) -+ -+def fail_fence_agent(options, message): -+ run_on_fail(options) -+ fail_usage(message) -+ -+def raise_fence_agent(options, message): -+ run_on_fail(options) -+ raise Exception(message) -+ -+# -+# Will use baremetalsolution setting or the environment variable -+# FENCE_GCE_URI_REPLACEMENTS to replace the uri for calls to *.googleapis.com. -+# -+def replace_api_uri(options, http_request): -+ uri_replacements = [] -+ # put any env var replacements first, then baremetalsolution if in options -+ if "FENCE_GCE_URI_REPLACEMENTS" in os.environ: -+ logging.debug("FENCE_GCE_URI_REPLACEMENTS environment variable exists") -+ env_uri_replacements = os.environ["FENCE_GCE_URI_REPLACEMENTS"] -+ try: -+ uri_replacements_json = json.loads(env_uri_replacements) -+ if isinstance(uri_replacements_json, list): -+ uri_replacements = uri_replacements_json -+ else: -+ logging.warning("FENCE_GCE_URI_REPLACEMENTS exists, but is not a JSON List") -+ except ValueError as e: -+ logging.warning("FENCE_GCE_URI_REPLACEMENTS exists but is not valid JSON") -+ if "--baremetalsolution" in options: -+ uri_replacements.append( -+ { -+ "matchlength": 4, -+ "match": "https://compute.googleapis.com/compute/v1/projects/(.*)/zones/(.*)/instances/(.*)/reset(.*)", -+ "replace": "https://baremetalsolution.googleapis.com/v1/projects/\\1/locations/\\2/instances/\\3:resetInstance\\4" -+ }) -+ for uri_replacement in uri_replacements: -+ # each uri_replacement should have matchlength, match, and replace -+ if "matchlength" not in uri_replacement or "match" not in uri_replacement or "replace" not in uri_replacement: -+ logging.warning("FENCE_GCE_URI_REPLACEMENTS missing matchlength, match, or replace in %s" % uri_replacement) -+ continue -+ match = re.match(uri_replacement["match"], http_request.uri) -+ if match is None or len(match.groups()) != uri_replacement["matchlength"]: -+ continue -+ replaced_uri = re.sub(uri_replacement["match"], uri_replacement["replace"], http_request.uri) -+ match = re.match("https:\/\/.*.googleapis.com", replaced_uri) -+ if match is None or match.start() != 0: -+ logging.warning("FENCE_GCE_URI_REPLACEMENTS replace is not " -+ "targeting googleapis.com, ignoring it: %s" % replaced_uri) -+ continue -+ logging.debug("Replacing googleapis uri %s with %s" % (http_request.uri, replaced_uri)) -+ http_request.uri = replaced_uri -+ break -+ return http_request -+ -+def retry_api_execute(options, http_request): -+ replaced_http_request = replace_api_uri(options, http_request) -+ retries = 3 -+ if options.get("--retries"): -+ retries = int(options.get("--retries")) -+ retry_sleep = 5 -+ if options.get("--retrysleep"): -+ retry_sleep = int(options.get("--retrysleep")) -+ retry = 0 -+ current_err = None -+ while retry <= retries: -+ if retry > 0: -+ time.sleep(retry_sleep) -+ try: -+ return replaced_http_request.execute() -+ except Exception as err: -+ current_err = err -+ logging.warning("Could not execute api call to: %s, retry: %s, " -+ "err: %s" % (replaced_http_request.uri, retry, str(err))) -+ retry += 1 -+ raise current_err - - - def translate_status(instance_status): -@@ -43,86 +134,174 @@ - - def get_nodes_list(conn, options): - result = {} -+ if "--zone" not in options: -+ fail_fence_agent(options, "Failed: get_nodes_list: Please specify the --zone in the command") - try: -- instanceList = conn.instances().list(project=options["--project"], zone=options["--zone"]).execute() -- for instance in instanceList["items"]: -- result[instance["id"]] = (instance["name"], translate_status(instance["status"])) -+ for zone in options["--zone"].split(","): -+ instanceList = retry_api_execute(options, conn.instances().list( -+ project=options["--project"], -+ zone=zone)) -+ for instance in instanceList["items"]: -+ result[instance["id"]] = (instance["name"], translate_status(instance["status"])) - except Exception as err: -- fail_usage("Failed: get_nodes_list: {}".format(str(err))) -+ fail_fence_agent(options, "Failed: get_nodes_list: {}".format(str(err))) - - return result - - - def get_power_status(conn, options): -+ logging.debug("get_power_status") -+ # if this is bare metal we need to just send back the opposite of the -+ # requested action: if on send off, if off send on -+ if "--baremetalsolution" in options: -+ if options.get("--action") == "on": -+ return "off" -+ else: -+ return "on" -+ # If zone is not listed for an entry we attempt to get it automatically -+ instance = options["--plug"] -+ zone = get_zone(conn, options, instance) if "--plugzonemap" not in options else options["--plugzonemap"][instance] -+ instance_status = get_instance_power_status(conn, options, instance, zone) -+ # If any of the instances do not match the intended status we return the -+ # the opposite status so that the fence agent can change it. -+ if instance_status != options.get("--action"): -+ return instance_status -+ -+ return options.get("--action") -+ -+ -+def get_instance_power_status(conn, options, instance, zone): - try: -- instance = conn.instances().get( -- project=options["--project"], -- zone=options["--zone"], -- instance=options["--plug"]).execute() -+ instance = retry_api_execute( -+ options, -+ conn.instances().get(project=options["--project"], zone=zone, instance=instance)) - return translate_status(instance["status"]) - except Exception as err: -- fail_usage("Failed: get_power_status: {}".format(str(err))) -+ fail_fence_agent(options, "Failed: get_instance_power_status: {}".format(str(err))) - - --def wait_for_operation(conn, project, zone, operation): -+def check_for_existing_operation(conn, options, instance, zone, operation_type): -+ logging.debug("check_for_existing_operation") -+ if "--baremetalsolution" in options: -+ # There is no API for checking in progress operations -+ return False -+ -+ project = options["--project"] -+ target_link = INSTANCE_LINK.format(project, zone, instance) -+ query_filter = '(targetLink = "{}") AND (operationType = "{}") AND (status = "RUNNING")'.format(target_link, operation_type) -+ result = retry_api_execute( -+ options, -+ conn.zoneOperations().list(project=project, zone=zone, filter=query_filter, maxResults=1)) -+ -+ if "items" in result and result["items"]: -+ logging.info("Existing %s operation found", operation_type) -+ return result["items"][0] -+ -+ -+def wait_for_operation(conn, options, zone, operation): -+ if 'name' not in operation: -+ logging.warning('Cannot wait for operation to complete, the' -+ ' requested operation will continue asynchronously') -+ return False -+ -+ wait_time = 0 -+ project = options["--project"] - while True: -- result = conn.zoneOperations().get( -+ result = retry_api_execute(options, conn.zoneOperations().get( - project=project, - zone=zone, -- operation=operation['name']).execute() -+ operation=operation['name'])) - if result['status'] == 'DONE': - if 'error' in result: -- raise Exception(result['error']) -- return -+ raise_fence_agent(options, result['error']) -+ return True -+ -+ if "--errortimeout" in options and wait_time > int(options["--errortimeout"]): -+ raise_fence_agent(options, "Operation did not complete before the timeout.") -+ -+ if "--warntimeout" in options and wait_time > int(options["--warntimeout"]): -+ logging.warning("Operation did not complete before the timeout.") -+ if "--runonwarn" in options: -+ run_command(options, options["--runonwarn"]) -+ return False -+ -+ wait_time = wait_time + 1 - time.sleep(1) - - - def set_power_status(conn, options): -+ logging.debug("set_power_status") -+ instance = options["--plug"] -+ # If zone is not listed for an entry we attempt to get it automatically -+ zone = get_zone(conn, options, instance) if "--plugzonemap" not in options else options["--plugzonemap"][instance] -+ set_instance_power_status(conn, options, instance, zone, options["--action"]) -+ -+ -+def set_instance_power_status(conn, options, instance, zone, action): -+ logging.info("Setting power status of %s in zone %s", instance, zone) -+ project = options["--project"] -+ - try: -- if options["--action"] == "off": -- logging.info("Issuing poweroff of %s in zone %s" % (options["--plug"], options["--zone"])) -- operation = conn.instances().stop( -- project=options["--project"], -- zone=options["--zone"], -- instance=options["--plug"]).execute() -- wait_for_operation(conn, options["--project"], options["--zone"], operation) -- logging.info("Poweroff of %s in zone %s complete" % (options["--plug"], options["--zone"])) -- elif options["--action"] == "on": -- logging.info("Issuing poweron of %s in zone %s" % (options["--plug"], options["--zone"])) -- operation = conn.instances().start( -- project=options["--project"], -- zone=options["--zone"], -- instance=options["--plug"]).execute() -- wait_for_operation(conn, options["--project"], options["--zone"], operation) -- logging.info("Poweron of %s in zone %s complete" % (options["--plug"], options["--zone"])) -+ if action == "off": -+ logging.info("Issuing poweroff of %s in zone %s", instance, zone) -+ operation = check_for_existing_operation(conn, options, instance, zone, "stop") -+ if operation and "--earlyexit" in options: -+ return -+ if not operation: -+ operation = retry_api_execute( -+ options, -+ conn.instances().stop(project=project, zone=zone, instance=instance)) -+ logging.info("Poweroff command completed, waiting for the operation to complete") -+ if wait_for_operation(conn, options, zone, operation): -+ logging.info("Poweroff of %s in zone %s complete", instance, zone) -+ elif action == "on": -+ logging.info("Issuing poweron of %s in zone %s", instance, zone) -+ operation = check_for_existing_operation(conn, options, instance, zone, "start") -+ if operation and "--earlyexit" in options: -+ return -+ if not operation: -+ operation = retry_api_execute( -+ options, -+ conn.instances().start(project=project, zone=zone, instance=instance)) -+ if wait_for_operation(conn, options, zone, operation): -+ logging.info("Poweron of %s in zone %s complete", instance, zone) - except Exception as err: -- fail_usage("Failed: set_power_status: {}".format(str(err))) -- -+ fail_fence_agent(options, "Failed: set_instance_power_status: {}".format(str(err))) - - def power_cycle(conn, options): -+ logging.debug("power_cycle") -+ instance = options["--plug"] -+ # If zone is not listed for an entry we attempt to get it automatically -+ zone = get_zone(conn, options, instance) if "--plugzonemap" not in options else options["--plugzonemap"][instance] -+ return power_cycle_instance(conn, options, instance, zone) -+ -+ -+def power_cycle_instance(conn, options, instance, zone): -+ logging.info("Issuing reset of %s in zone %s", instance, zone) -+ project = options["--project"] -+ - try: -- logging.info('Issuing reset of %s in zone %s' % (options["--plug"], options["--zone"])) -- operation = conn.instances().reset( -- project=options["--project"], -- zone=options["--zone"], -- instance=options["--plug"]).execute() -- wait_for_operation(conn, options["--project"], options["--zone"], operation) -- logging.info('Reset of %s in zone %s complete' % (options["--plug"], options["--zone"])) -+ operation = check_for_existing_operation(conn, options, instance, zone, "reset") -+ if operation and "--earlyexit" in options: -+ return True -+ if not operation: -+ operation = retry_api_execute( -+ options, -+ conn.instances().reset(project=project, zone=zone, instance=instance)) -+ logging.info("Reset command sent, waiting for the operation to complete") -+ if wait_for_operation(conn, options, zone, operation): -+ logging.info("Reset of %s in zone %s complete", instance, zone) - return True - except Exception as err: -- logging.error("Failed: power_cycle: {}".format(str(err))) -- return False -- -- --def get_instance(conn, project, zone, instance): -- request = conn.instances().get( -- project=project, zone=zone, instance=instance) -- return request.execute() -+ logging.exception("Failed: power_cycle") -+ raise err - - --def get_zone(conn, project, instance): -+def get_zone(conn, options, instance): -+ logging.debug("get_zone"); -+ project = options['--project'] - fl = 'name="%s"' % instance -- request = conn.instances().aggregatedList(project=project, filter=fl) -+ request = replace_api_uri(options, conn.instances().aggregatedList(project=project, filter=fl)) - while request is not None: - response = request.execute() - zones = response.get('items', {}) -@@ -130,9 +309,9 @@ - for inst in zone.get('instances', []): - if inst['name'] == instance: - return inst['zone'].split("/")[-1] -- request = conn.instances().aggregatedList_next( -- previous_request=request, previous_response=response) -- raise Exception("Unable to find instance %s" % (instance)) -+ request = replace_api_uri(options, conn.instances().aggregatedList_next( -+ previous_request=request, previous_response=response)) -+ raise_fence_agent(options, "Unable to find instance %s" % (instance)) - - - def get_metadata(metadata_key, params=None, timeout=None): -@@ -149,6 +328,7 @@ - Raises: - urlerror.HTTPError: raises when the GET request fails. - """ -+ logging.debug("get_metadata"); - timeout = timeout or 60 - metadata_url = os.path.join(METADATA_SERVER, metadata_key) - params = urlparse.urlencode(params or {}) -@@ -178,12 +358,50 @@ - all_opt["stackdriver-logging"] = { - "getopt" : "", - "longopt" : "stackdriver-logging", -- "help" : "--stackdriver-logging Enable Logging to Stackdriver. Using stackdriver logging requires additional libraries (google-cloud-logging).", -- "shortdesc" : "Stackdriver-logging support. Requires additional libraries (google-cloud-logging).", -- "longdesc" : "If enabled IP failover logs will be posted to stackdriver logging. Using stackdriver logging requires additional libraries (google-cloud-logging).", -+ "help" : "--stackdriver-logging Enable Logging to Stackdriver", -+ "shortdesc" : "Stackdriver-logging support.", -+ "longdesc" : "If enabled IP failover logs will be posted to stackdriver logging.", - "required" : "0", - "order" : 4 - } -+ all_opt["baremetalsolution"] = { -+ "getopt" : "", -+ "longopt" : "baremetalsolution", -+ "help" : "--baremetalsolution Enable on bare metal", -+ "shortdesc" : "If enabled this is a bare metal offering from google.", -+ "required" : "0", -+ "order" : 5 -+ } -+ all_opt["apitimeout"] = { -+ "getopt" : ":", -+ "type" : "second", -+ "longopt" : "apitimeout", -+ "help" : "--apitimeout=[seconds] Timeout to use for API calls", -+ "shortdesc" : "Timeout in seconds to use for API calls, default is 60.", -+ "required" : "0", -+ "default" : 60, -+ "order" : 6 -+ } -+ all_opt["retries"] = { -+ "getopt" : ":", -+ "type" : "integer", -+ "longopt" : "retries", -+ "help" : "--retries=[retries] Number of retries on failure for API calls", -+ "shortdesc" : "Number of retries on failure for API calls, default is 3.", -+ "required" : "0", -+ "default" : 3, -+ "order" : 7 -+ } -+ all_opt["retrysleep"] = { -+ "getopt" : ":", -+ "type" : "second", -+ "longopt" : "retrysleep", -+ "help" : "--retrysleep=[seconds] Time to sleep between API retries", -+ "shortdesc" : "Time to sleep in seconds between API retries, default is 5.", -+ "required" : "0", -+ "default" : 5, -+ "order" : 8 -+ } - all_opt["serviceaccount"] = { - "getopt" : ":", - "longopt" : "serviceaccount", -@@ -192,13 +410,21 @@ - "required" : "0", - "order" : 9 - } -+ all_opt["plugzonemap"] = { -+ "getopt" : ":", -+ "longopt" : "plugzonemap", -+ "help" : "--plugzonemap=[plugzonemap] Comma separated zone map when fencing multiple plugs", -+ "shortdesc" : "Comma separated zone map when fencing multiple plugs.", -+ "required" : "0", -+ "order" : 10 -+ } - all_opt["proxyhost"] = { - "getopt" : ":", - "longopt" : "proxyhost", - "help" : "--proxyhost=[proxy_host] The proxy host to use, if one is needed to access the internet (Example: 10.122.0.33)", - "shortdesc" : "If a proxy is used for internet access, the proxy host should be specified.", - "required" : "0", -- "order" : 10 -+ "order" : 11 - } - all_opt["proxyport"] = { - "getopt" : ":", -@@ -207,7 +433,49 @@ - "help" : "--proxyport=[proxy_port] The proxy port to use, if one is needed to access the internet (Example: 3127)", - "shortdesc" : "If a proxy is used for internet access, the proxy port should be specified.", - "required" : "0", -- "order" : 11 -+ "order" : 12 -+ } -+ all_opt["earlyexit"] = { -+ "getopt" : "", -+ "longopt" : "earlyexit", -+ "help" : "--earlyexit Return early if reset is already in progress", -+ "shortdesc" : "If an existing reset operation is detected, the fence agent will return before the operation completes with a 0 return code.", -+ "required" : "0", -+ "order" : 13 -+ } -+ all_opt["warntimeout"] = { -+ "getopt" : ":", -+ "type" : "second", -+ "longopt" : "warntimeout", -+ "help" : "--warntimeout=[warn_timeout] Timeout seconds before logging a warning and returning a 0 status code", -+ "shortdesc" : "If the operation is not completed within the timeout, the cluster operations are allowed to continue.", -+ "required" : "0", -+ "order" : 14 -+ } -+ all_opt["errortimeout"] = { -+ "getopt" : ":", -+ "type" : "second", -+ "longopt" : "errortimeout", -+ "help" : "--errortimeout=[error_timeout] Timeout seconds before failing and returning a non-zero status code", -+ "shortdesc" : "If the operation is not completed within the timeout, cluster is notified of the operation failure.", -+ "required" : "0", -+ "order" : 15 -+ } -+ all_opt["runonwarn"] = { -+ "getopt" : ":", -+ "longopt" : "runonwarn", -+ "help" : "--runonwarn=[run_on_warn] If a timeout occurs and warning is generated, run the supplied command", -+ "shortdesc" : "If a timeout would occur while running the agent, then the supplied command is run.", -+ "required" : "0", -+ "order" : 16 -+ } -+ all_opt["runonfail"] = { -+ "getopt" : ":", -+ "longopt" : "runonfail", -+ "help" : "--runonfail=[run_on_fail] If a failure occurs, run the supplied command", -+ "shortdesc" : "If a failure would occur while running the agent, then the supplied command is run.", -+ "required" : "0", -+ "order" : 17 - } - - -@@ -215,7 +483,9 @@ - conn = None - - device_opt = ["port", "no_password", "zone", "project", "stackdriver-logging", -- "method", "serviceaccount", "proxyhost", "proxyport"] -+ "method", "baremetalsolution", "apitimeout", "retries", "retrysleep", -+ "serviceaccount", "plugzonemap", "proxyhost", "proxyport", "earlyexit", -+ "warntimeout", "errortimeout", "runonwarn", "runonfail"] - - atexit.register(atexit_handler) - -@@ -259,6 +529,11 @@ - logging.error('Couldn\'t import google.cloud.logging, ' - 'disabling Stackdriver-logging support') - -+ # if apitimeout is defined we set the socket timeout, if not we keep the -+ # socket default which is 60s -+ if options.get("--apitimeout"): -+ socket.setdefaulttimeout(options["--apitimeout"]) -+ - # Prepare cli - try: - serviceaccount = options.get("--serviceaccount") -@@ -291,20 +566,39 @@ - conn = googleapiclient.discovery.build( - 'compute', 'v1', credentials=credentials, cache_discovery=False) - except Exception as err: -- fail_usage("Failed: Create GCE compute v1 connection: {}".format(str(err))) -+ fail_fence_agent(options, "Failed: Create GCE compute v1 connection: {}".format(str(err))) - - # Get project and zone - if not options.get("--project"): - try: - options["--project"] = get_metadata('project/project-id') - except Exception as err: -- fail_usage("Failed retrieving GCE project. Please provide --project option: {}".format(str(err))) -+ fail_fence_agent(options, "Failed retrieving GCE project. Please provide --project option: {}".format(str(err))) - -- if not options.get("--zone"): -- try: -- options["--zone"] = get_zone(conn, options['--project'], options['--plug']) -- except Exception as err: -- fail_usage("Failed retrieving GCE zone. Please provide --zone option: {}".format(str(err))) -+ if "--baremetalsolution" in options: -+ options["--zone"] = "none" -+ -+ # Populates zone automatically if missing from the command -+ zones = [] if not "--zone" in options else options["--zone"].split(",") -+ options["--plugzonemap"] = {} -+ if "--plug" in options: -+ for i, instance in enumerate(options["--plug"].split(",")): -+ if len(zones) == 1: -+ # If only one zone is specified, use it across all plugs -+ options["--plugzonemap"][instance] = zones[0] -+ continue -+ -+ if len(zones) - 1 >= i: -+ # If we have enough zones specified with the --zone flag use the zone at -+ # the same index as the plug -+ options["--plugzonemap"][instance] = zones[i] -+ continue -+ -+ try: -+ # In this case we do not have a zone specified so we attempt to detect it -+ options["--plugzonemap"][instance] = get_zone(conn, options, instance) -+ except Exception as err: -+ fail_fence_agent(options, "Failed retrieving GCE zone. Please provide --zone option: {}".format(str(err))) - - # Operate the fencing device - result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list, power_cycle) diff --git a/SOURCES/bz2080729-1-fence_apc-fence_ilo_moonshot-import-logging.patch b/SOURCES/bz2080729-1-fence_apc-fence_ilo_moonshot-import-logging.patch deleted file mode 100644 index dbbde08..0000000 --- a/SOURCES/bz2080729-1-fence_apc-fence_ilo_moonshot-import-logging.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6ea2c6b5d1cc51e93fa7084d76d9272512461e58 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 16 May 2022 11:01:21 +0200 -Subject: [PATCH] fence_apc/fence_ilo_moonshot: add missing "import logging" - ---- - agents/apc/fence_apc.py | 1 + - agents/ilo_moonshot/fence_ilo_moonshot.py | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/agents/apc/fence_apc.py b/agents/apc/fence_apc.py -index 901aad25e..3ea0f37d6 100644 ---- a/agents/apc/fence_apc.py -+++ b/agents/apc/fence_apc.py -@@ -15,6 +15,7 @@ - ##### - - import sys, re, time -+import logging - import atexit - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * -diff --git a/agents/ilo_moonshot/fence_ilo_moonshot.py b/agents/ilo_moonshot/fence_ilo_moonshot.py -index 6f5cca320..1923eeb1c 100644 ---- a/agents/ilo_moonshot/fence_ilo_moonshot.py -+++ b/agents/ilo_moonshot/fence_ilo_moonshot.py -@@ -1,6 +1,7 @@ - #!@PYTHON@ -tt - - import sys -+import logging - import atexit - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * diff --git a/SOURCES/bz2080729-2-fence_lpar-fix-import-fail_usage.patch b/SOURCES/bz2080729-2-fence_lpar-fix-import-fail_usage.patch deleted file mode 100644 index 599a22c..0000000 --- a/SOURCES/bz2080729-2-fence_lpar-fix-import-fail_usage.patch +++ /dev/null @@ -1,65 +0,0 @@ -From e3dff8570b70f0c19eca84cf02f0aadd68e16599 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Fri, 25 Feb 2022 14:05:42 +0100 -Subject: [PATCH] fence_lpar: fix missing import logging, use fail_usage - -and slightly re-factor code to avoid duplicate code lines. -Should be cleanup only, no functional change. ---- - agents/lpar/fence_lpar.py | 39 ++++++++++++++++++--------------------- - 1 file changed, 18 insertions(+), 21 deletions(-) - -diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py -index ad18c6191..2046b0e4e 100644 ---- a/agents/lpar/fence_lpar.py -+++ b/agents/lpar/fence_lpar.py -@@ -28,31 +28,28 @@ def _normalize_status(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") -- -- # First line (command) may cause parsing issues if long -- conn.readline() -- conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) -- -- try: -- status = re.compile("^" + options["--plug"] + ",(.*?),.*$", -- re.IGNORECASE | re.MULTILINE).search(conn.before).group(1) -- except AttributeError as e: -- logging.error("Failed: {}".format(str(e))) -- fail(EC_STATUS_HMC) -+ command = "lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--plug"] + " -F name,state\n" - elif options["--hmc-version"] in ["4", "IVM"]: -- conn.send("lssyscfg -r lpar -m "+ options["--managed"] + -- " --filter 'lpar_names=" + options["--plug"] + "'\n") -+ command = "lssyscfg -r lpar -m "+ options["--managed"] + \ -+ " --filter 'lpar_names=" + options["--plug"] + "'\n" -+ else: -+ # Bad HMC Version cannot be reached -+ fail(EC_STATUS_HMC) - -- # First line (command) may cause parsing issues if long -- conn.readline() -- conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) -+ conn.send(command) -+ # First line (command) may cause parsing issues if long -+ conn.readline() -+ conn.log_expect(options["--command-prompt"], int(options["--power-timeout"])) - -- try: -+ try: -+ if options["--hmc-version"] == "3": -+ status = re.compile("^" + options["--plug"] + ",(.*?),.*$", -+ re.IGNORECASE | re.MULTILINE).search(conn.before).group(1) -+ elif options["--hmc-version"] in ["4", "IVM"]: - status = re.compile(",state=(.*?),", re.IGNORECASE).search(conn.before).group(1) -- except AttributeError as e: -- logging.error("Failed: {}".format(str(e))) -- fail(EC_STATUS_HMC) -+ except AttributeError as e: -+ fail_usage("Command on HMC failed: {}\n{}".format(command, str(e)), False) -+ fail(EC_STATUS_HMC) - - return _normalize_status(status) - diff --git a/SOURCES/bz2080994-fence_ibm_vpc-fix-parameters.patch b/SOURCES/bz2080994-fence_ibm_vpc-fix-parameters.patch deleted file mode 100644 index 5e031ad..0000000 --- a/SOURCES/bz2080994-fence_ibm_vpc-fix-parameters.patch +++ /dev/null @@ -1,65 +0,0 @@ -From d0254345472c9415af1e06e9e8df2fe0ce464db0 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 2 May 2022 11:14:42 +0200 -Subject: [PATCH] fence_ibm_vpc: remove unused instance parameter and make - limit optional - ---- - agents/ibm_vpc/fence_ibm_vpc.py | 11 +---------- - tests/data/metadata/fence_ibm_vpc.xml | 7 +------ - 2 files changed, 2 insertions(+), 16 deletions(-) - -diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py -index 9f84f7b2d..9e38e8301 100755 ---- a/agents/ibm_vpc/fence_ibm_vpc.py -+++ b/agents/ibm_vpc/fence_ibm_vpc.py -@@ -161,14 +161,6 @@ def define_new_opts(): - "shortdesc" : "API Key", - "order" : 0 - } -- all_opt["instance"] = { -- "getopt" : ":", -- "longopt" : "instance", -- "help" : "--instance=[instance] Cloud Instance", -- "required" : "1", -- "shortdesc" : "Cloud Instance", -- "order" : 0 -- } - all_opt["region"] = { - "getopt" : ":", - "longopt" : "region", -@@ -181,7 +173,7 @@ def define_new_opts(): - "getopt" : ":", - "longopt" : "limit", - "help" : "--limit=[number] Limit number of nodes returned by API", -- "required" : "1", -+ "required" : "0", - "default": 50, - "shortdesc" : "Number of nodes returned by API", - "order" : 0 -@@ -191,7 +183,6 @@ def define_new_opts(): - def main(): - device_opt = [ - "apikey", -- "instance", - "region", - "limit", - "port", -diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml -index 926efcaa0..ee7151673 100644 ---- a/tests/data/metadata/fence_ibm_vpc.xml -+++ b/tests/data/metadata/fence_ibm_vpc.xml -@@ -8,12 +8,7 @@ - - API Key - -- -- -- -- Cloud Instance -- -- -+ - - - Number of nodes returned by API diff --git a/SOURCES/bz2091826-fence_ibm_vpc-add-proxy-support.patch b/SOURCES/bz2091826-fence_ibm_vpc-add-proxy-support.patch deleted file mode 100644 index 39a2e2e..0000000 --- a/SOURCES/bz2091826-fence_ibm_vpc-add-proxy-support.patch +++ /dev/null @@ -1,62 +0,0 @@ -From be409554bbc99df2bba22cb01e8a6df634af896d Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 31 May 2022 15:46:40 +0200 -Subject: [PATCH] fence_ibm_vpc: add proxy support - ---- - agents/ibm_vpc/fence_ibm_vpc.py | 11 +++++++++++ - tests/data/metadata/fence_ibm_vpc.xml | 5 +++++ - 2 files changed, 16 insertions(+) - -diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py -index 9e38e8301..3da3ce056 100755 ---- a/agents/ibm_vpc/fence_ibm_vpc.py -+++ b/agents/ibm_vpc/fence_ibm_vpc.py -@@ -88,6 +88,7 @@ def connect(opt): - conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) - conn.setopt(pycurl.SSL_VERIFYPEER, 1) - conn.setopt(pycurl.SSL_VERIFYHOST, 2) -+ conn.setopt(pycurl.PROXY, "{}".format(opt["--proxy"])) - - # get bearer token - bearer_token = get_bearer_token(conn, opt) -@@ -169,6 +170,15 @@ def define_new_opts(): - "shortdesc" : "Region", - "order" : 0 - } -+ all_opt["proxy"] = { -+ "getopt" : ":", -+ "longopt" : "proxy", -+ "help" : "--proxy=[http://:] Proxy: 'http://:'", -+ "required" : "0", -+ "default": "", -+ "shortdesc" : "Network proxy", -+ "order" : 0 -+ } - all_opt["limit"] = { - "getopt" : ":", - "longopt" : "limit", -@@ -185,6 +195,7 @@ def main(): - "apikey", - "region", - "limit", -+ "proxy", - "port", - "no_password", - ] -diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml -index ee7151673..09da0e303 100644 ---- a/tests/data/metadata/fence_ibm_vpc.xml -+++ b/tests/data/metadata/fence_ibm_vpc.xml -@@ -13,6 +13,11 @@ - - Number of nodes returned by API - -+ -+ -+ -+ Network proxy -+ - - - diff --git a/SOURCES/bz2092921-fence_ibm_powervs-proxy-private-api-servers.patch b/SOURCES/bz2092921-fence_ibm_powervs-proxy-private-api-servers.patch deleted file mode 100644 index 36f07fc..0000000 --- a/SOURCES/bz2092921-fence_ibm_powervs-proxy-private-api-servers.patch +++ /dev/null @@ -1,455 +0,0 @@ -From 98fec5c6d55369ad681abc0cde0d8677835957ab Mon Sep 17 00:00:00 2001 -From: Arnold Beilmann -Date: Thu, 5 May 2022 15:26:22 +0200 -Subject: [PATCH 1/2] modified for PowerVS - ---- - agents/ibm_powervs/fence_ibm_powervs.py | 108 +++++++++++++++++++----- - 1 file changed, 89 insertions(+), 19 deletions(-) - -diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py -index 6649771ea..727009220 100755 ---- a/agents/ibm_powervs/fence_ibm_powervs.py -+++ b/agents/ibm_powervs/fence_ibm_powervs.py -@@ -1,10 +1,11 @@ --#!@PYTHON@ -tt -+#!/usr/libexec/platform-python -tt - - import sys - import pycurl, io, json - import logging - import atexit --sys.path.append("@FENCEAGENTSLIBDIR@") -+import time -+sys.path.append("/usr/share/fence") - from fencing import * - from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS - -@@ -14,16 +15,30 @@ - "ERROR": "unknown" - } - -+def get_token(conn, options): -+ -+ try: -+ command = "identity/token" -+ action = "grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey={}".format(options["--token"]) -+ res = send_command(conn, command, "POST", action, printResult=False) -+ except Exception as e: -+ logging.debug("Failed: {}".format(e)) -+ return "TOKEN_IS_MISSING_OR_WRONG" -+ -+ #if "--verbose" in options: -+ # logging.debug(json.dumps(res, indent=2)) -+ -+ return res["access_token"] -+ - def get_list(conn, options): - outlets = {} -- -+ - try: - command = "cloud-instances/{}/pvm-instances".format(options["--instance"]) - res = send_command(conn, command) - except Exception as e: - logging.debug("Failed: {}".format(e)) - return outlets -- - for r in res["pvmInstances"]: - if "--verbose" in options: - logging.debug(json.dumps(r, indent=2)) -@@ -32,6 +47,7 @@ def get_list(conn, options): - return outlets - - def get_power_status(conn, options): -+ - try: - command = "cloud-instances/{}/pvm-instances/{}".format( - options["--instance"], options["--plug"]) -@@ -40,10 +56,11 @@ def get_power_status(conn, options): - except KeyError as e: - logging.debug("Failed: Unable to get status for {}".format(e)) - fail(EC_STATUS) -- -+ - return result - - def set_power_status(conn, options): -+ - action = { - "on" : '{"action" : "start"}', - "off" : '{"action" : "immediate-shutdown"}', -@@ -56,35 +73,63 @@ def set_power_status(conn, options): - logging.debug("Failed: Unable to set power to {} for {}".format(options["--action"], e)) - fail(EC_STATUS) - --def connect(opt): -+def connect(opt, token): - conn = pycurl.Curl() - - ## setup correct URL -- conn.base_url = "https://" + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" -+ conn.base_url = "https://private." + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" -+ if opt["--api-type"] == "public": -+ conn.base_url = "https://" + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" - - if opt["--verbose-level"] > 1: -- conn.setopt(pycurl.VERBOSE, 1) -+ conn.setopt(pycurl.VERBOSE, 0) - -+ conn.setopt(pycurl.CONNECTTIMEOUT,int(opt["--shell-timeout"])) - conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) - conn.setopt(pycurl.SSL_VERIFYPEER, 1) - conn.setopt(pycurl.SSL_VERIFYHOST, 2) -+ conn.setopt(pycurl.PROXY, "{}".format(opt["--proxy"])) - - # set auth token for later requests - conn.setopt(pycurl.HTTPHEADER, [ - "Content-Type: application/json", -- "Authorization: Bearer {}".format(opt["--token"]), -+ "Authorization: Bearer {}".format(token), - "CRN: {}".format(opt["--crn"]), - "User-Agent: curl", - ]) -+ -+ return conn -+ -+def auth_connect(opt): -+ conn = pycurl.Curl() -+ -+ # setup correct URL -+ conn.base_url = "https://iam.cloud.ibm.com/" -+ -+ if opt["--verbose-level"] > 1: -+ conn.setopt(pycurl.VERBOSE, 1) -+ -+ conn.setopt(pycurl.CONNECTTIMEOUT,int(opt["--shell-timeout"])) -+ conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"])) -+ conn.setopt(pycurl.SSL_VERIFYPEER, 1) -+ conn.setopt(pycurl.SSL_VERIFYHOST, 2) -+ conn.setopt(pycurl.PROXY, "{}".format(opt["--proxy"])) -+ -+ # set auth token for later requests -+ conn.setopt(pycurl.HTTPHEADER, [ -+ "Content-type: application/x-www-form-urlencoded", -+ "Accept: application/json", -+ "User-Agent: curl", -+ ]) - - return conn - - def disconnect(conn): - conn.close() - --def send_command(conn, command, method="GET", action=None): -+def send_command(conn, command, method="GET", action=None, printResult=True): - url = conn.base_url + command -- -+ - conn.setopt(pycurl.URL, url.encode("ascii")) - - web_buffer = io.BytesIO() -@@ -99,8 +144,10 @@ def send_command(conn, command, method="GET", action=None): - conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) - - try: -+ time.sleep(3) - conn.perform() - except Exception as e: -+ logging.error("ADD_DEBUG: {}".format(e)) - raise(e) - - rc = conn.getinfo(pycurl.HTTP_CODE) -@@ -110,8 +157,7 @@ def send_command(conn, command, method="GET", action=None): - - if rc != 200: - if len(result) > 0: -- raise Exception("{}: {}".format(rc, -- result["value"]["messages"][0]["default_message"])) -+ raise Exception("{}: {}".format(rc,result)) - else: - raise Exception("Remote returned {} for request to {}".format(rc, url)) - -@@ -121,7 +167,8 @@ def send_command(conn, command, method="GET", action=None): - logging.debug("url: {}".format(url)) - logging.debug("method: {}".format(method)) - logging.debug("response code: {}".format(rc)) -- logging.debug("result: {}\n".format(result)) -+ if printResult: -+ logging.debug("result: {}\n".format(result)) - - return result - -@@ -129,9 +176,9 @@ def define_new_opts(): - all_opt["token"] = { - "getopt" : ":", - "longopt" : "token", -- "help" : "--token=[token] Bearer Token", -+ "help" : "--token=[token] API Token", - "required" : "1", -- "shortdesc" : "Bearer Token", -+ "shortdesc" : "API Token", - "order" : 0 - } - all_opt["crn"] = { -@@ -158,6 +205,22 @@ def define_new_opts(): - "shortdesc" : "Region", - "order" : 0 - } -+ all_opt["api-type"] = { -+ "getopt" : ":", -+ "longopt" : "api-type", -+ "help" : "--api-type=[private|public] API-type: 'private' (default) or 'public'", -+ "required" : "0", -+ "shortdesc" : "API-type (private|public)", -+ "order" : 0 -+ } -+ all_opt["proxy"] = { -+ "getopt" : ":", -+ "longopt" : "proxy", -+ "help" : "--proxy=[http://:] Proxy: 'http://:'", -+ "required" : "0", -+ "shortdesc" : "Network proxy", -+ "order" : 0 -+ } - - - def main(): -@@ -166,6 +229,8 @@ def main(): - "crn", - "instance", - "region", -+ "api-type", -+ "proxy", - "port", - "no_password", - ] -@@ -173,9 +238,11 @@ def main(): - atexit.register(atexit_handler) - define_new_opts() - -- all_opt["shell_timeout"]["default"] = "15" -+ all_opt["shell_timeout"]["default"] = "500" - all_opt["power_timeout"]["default"] = "30" - all_opt["power_wait"]["default"] = "1" -+ all_opt["api-type"]["default"] = "private" -+ all_opt["proxy"]["default"] = "" - - options = check_input(device_opt, process_input(device_opt)) - -@@ -190,8 +257,11 @@ def main(): - ## Fence operations - #### - run_delay(options) -- -- conn = connect(options) -+ -+ auth_conn = auth_connect(options) -+ token = get_token(auth_conn, options) -+ disconnect(auth_conn) -+ conn = connect(options, token) - atexit.register(disconnect, conn) - - result = fence_action(conn, options, set_power_status, get_power_status, get_list) - -From fbe9a539ac8f40686a8027b7e768d9f7b799e485 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 6 May 2022 11:22:47 +0200 -Subject: [PATCH 2/2] fence_ibm_powervs: cleanup and fixes - ---- - agents/ibm_powervs/fence_ibm_powervs.py | 37 ++++++++++------------- - tests/data/metadata/fence_ibm_powervs.xml | 19 ++++++++++-- - 2 files changed, 33 insertions(+), 23 deletions(-) - -diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py -index 727009220..819ab8896 100755 ---- a/agents/ibm_powervs/fence_ibm_powervs.py -+++ b/agents/ibm_powervs/fence_ibm_powervs.py -@@ -1,11 +1,11 @@ --#!/usr/libexec/platform-python -tt -+#!@PYTHON@ -tt - - import sys - import pycurl, io, json - import logging - import atexit - import time --sys.path.append("/usr/share/fence") -+sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * - from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS - -@@ -16,7 +16,6 @@ - } - - def get_token(conn, options): -- - try: - command = "identity/token" - action = "grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey={}".format(options["--token"]) -@@ -25,20 +24,18 @@ def get_token(conn, options): - logging.debug("Failed: {}".format(e)) - return "TOKEN_IS_MISSING_OR_WRONG" - -- #if "--verbose" in options: -- # logging.debug(json.dumps(res, indent=2)) -- - return res["access_token"] - - def get_list(conn, options): - outlets = {} -- -+ - try: - command = "cloud-instances/{}/pvm-instances".format(options["--instance"]) - res = send_command(conn, command) - except Exception as e: - logging.debug("Failed: {}".format(e)) - return outlets -+ - for r in res["pvmInstances"]: - if "--verbose" in options: - logging.debug(json.dumps(r, indent=2)) -@@ -47,7 +44,6 @@ def get_list(conn, options): - return outlets - - def get_power_status(conn, options): -- - try: - command = "cloud-instances/{}/pvm-instances/{}".format( - options["--instance"], options["--plug"]) -@@ -56,11 +52,10 @@ def get_power_status(conn, options): - except KeyError as e: - logging.debug("Failed: Unable to get status for {}".format(e)) - fail(EC_STATUS) -- -+ - return result - - def set_power_status(conn, options): -- - action = { - "on" : '{"action" : "start"}', - "off" : '{"action" : "immediate-shutdown"}', -@@ -77,11 +72,11 @@ def connect(opt, token): - conn = pycurl.Curl() - - ## setup correct URL -- conn.base_url = "https://private." + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" -- if opt["--api-type"] == "public": -- conn.base_url = "https://" + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" -+ conn.base_url = "https://" + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" -+ if opt["--api-type"] == "private": -+ conn.base_url = "https://private." + opt["--region"] + ".power-iaas.cloud.ibm.com/pcloud/v1/" - -- if opt["--verbose-level"] > 1: -+ if opt["--verbose-level"] < 3: - conn.setopt(pycurl.VERBOSE, 0) - - conn.setopt(pycurl.CONNECTTIMEOUT,int(opt["--shell-timeout"])) -@@ -129,7 +124,7 @@ def disconnect(conn): - - def send_command(conn, command, method="GET", action=None, printResult=True): - url = conn.base_url + command -- -+ - conn.setopt(pycurl.URL, url.encode("ascii")) - - web_buffer = io.BytesIO() -@@ -144,10 +139,9 @@ def send_command(conn, command, method="GET", action=None, printResult=True): - conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) - - try: -- time.sleep(3) - conn.perform() - except Exception as e: -- logging.error("ADD_DEBUG: {}".format(e)) -+ logging.error("send_command(): {}".format(e)) - raise(e) - - rc = conn.getinfo(pycurl.HTTP_CODE) -@@ -208,9 +202,9 @@ def define_new_opts(): - all_opt["api-type"] = { - "getopt" : ":", - "longopt" : "api-type", -- "help" : "--api-type=[private|public] API-type: 'private' (default) or 'public'", -+ "help" : "--api-type=[public|private] API-type: 'public' (default) or 'private'", - "required" : "0", -- "shortdesc" : "API-type (private|public)", -+ "shortdesc" : "API-type (public|private)", - "order" : 0 - } - all_opt["proxy"] = { -@@ -238,9 +232,10 @@ def main(): - atexit.register(atexit_handler) - define_new_opts() - -- all_opt["shell_timeout"]["default"] = "500" -+ all_opt["shell_timeout"]["default"] = "15" - all_opt["power_timeout"]["default"] = "30" - all_opt["power_wait"]["default"] = "1" -+ all_opt["stonith_status_sleep"]["default"] = "3" - all_opt["api-type"]["default"] = "private" - all_opt["proxy"]["default"] = "" - -@@ -257,7 +252,7 @@ def main(): - ## Fence operations - #### - run_delay(options) -- -+ - auth_conn = auth_connect(options) - token = get_token(auth_conn, options) - disconnect(auth_conn) -diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml -index fe86331bd..81cea4379 100644 ---- a/tests/data/metadata/fence_ibm_powervs.xml -+++ b/tests/data/metadata/fence_ibm_powervs.xml -@@ -3,6 +3,16 @@ - fence_ibm_powervs is an I/O Fencing agent which can be used with IBM PowerVS to fence virtual machines. - https://www.ibm.com - -+ -+ -+ -+ API-type (public|private) -+ -+ -+ -+ -+ API-type (public|private) -+ - - - -@@ -13,6 +23,11 @@ - - PowerVS Instance - -+ -+ -+ -+ Network proxy -+ - - - -@@ -21,7 +36,7 @@ - - - -- Bearer Token -+ API Token - - - -@@ -110,7 +125,7 @@ - - - -- -+ - Sleep X seconds between status calls during a STONITH action - - diff --git a/SOURCES/bz2102024-fence_ibm_vpc-add-token-cache-support.patch b/SOURCES/bz2102024-fence_ibm_vpc-add-token-cache-support.patch deleted file mode 100644 index 801034f..0000000 --- a/SOURCES/bz2102024-fence_ibm_vpc-add-token-cache-support.patch +++ /dev/null @@ -1,431 +0,0 @@ -From bccac64a5135815ada30d385ab573409f1176905 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 7 Jul 2022 14:18:21 +0200 -Subject: [PATCH 1/3] build: make xml-check: ignore detected paths in *_file - parameters not matching saved metadata - ---- - make/agentpycheck.mk | 2 +- - 83 files changed, 1 insertion(+), 108 deletions(-) - -diff --git a/make/agentpycheck.mk b/make/agentpycheck.mk -index f686c4c89..4044dbad3 100644 ---- a/make/agentpycheck.mk -+++ b/make/agentpycheck.mk -@@ -1,5 +1,5 @@ - DATADIR:=$(abs_top_srcdir)/tests/data/metadata --AWK_VAL='BEGIN {store=-1} /name=".*_path"/ {store=2} {if (store!=0) {print}; store--}' -+AWK_VAL='BEGIN {store=-1} /name=".*_path"/ || /name=".*_file"/ {store=2} {if (store!=0) {print}; store--}' - - TEST_TARGET=$(filter-out $(TEST_TARGET_SKIP),$(TARGET)) - -From 1b7f3cc431ca53962506e6d96e7a4938c4388416 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 1 Jul 2022 13:29:16 +0200 -Subject: [PATCH 2/3] build: add FENCETMPDIR for state files - ---- - Makefile.am | 3 ++- - configure.ac | 30 ++++++++++++++++++++++++++++++ - m4/PKG_CHECK_VAR.m4 | 24 ++++++++++++++++++++++++ - make/fencebuild.mk | 1 + - systemd/Makefile.am | 24 ++++++++++++++++++++++++ - systemd/fence-agents.conf.in | 1 + - 7 files changed, 97 insertions(+), 2 deletions(-) - create mode 100644 m4/PKG_CHECK_VAR.m4 - create mode 100644 systemd/Makefile.am - create mode 100644 systemd/fence-agents.conf.in - -diff --git a/Makefile.am b/Makefile.am -index c1091b93a..1d115e5aa 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -23,7 +23,7 @@ TARFILES = $(PACKAGE_NAME)-$(VERSION).tar.bz2 \ - - ACLOCAL_AMFLAGS = -I m4 - --SUBDIRS = lib agents doc -+SUBDIRS = lib agents doc systemd - - .PHONY: $(SUBDIRS) - -@@ -34,6 +34,7 @@ doc: agents - install-exec-local: - $(INSTALL) -d $(DESTDIR)/$(LOGDIR) - $(INSTALL) -d $(DESTDIR)/$(CLUSTERVARRUN) -+ $(INSTALL) -d -m 1755 $(DESTDIR)$(FENCETMPDIR) - - uninstall-local: - rmdir $(DESTDIR)/$(LOGDIR) || :; -diff --git a/configure.ac b/configure.ac -index 1bad8e3b0..d7afb8dbe 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -135,10 +135,38 @@ AC_ARG_WITH([agents], - [ AGENTS_LIST="$withval" ], - [ AGENTS_LIST="all" ]) - -+FENCETMPDIR=${localstatedir}/run/fence-agents -+AC_ARG_WITH(fencetmpdir, -+ [ --with-fencetmpdir=DIR directory for fence agents state files [${FENCETMPDIR}]], -+ [ FENCETMPDIR="$withval" ]) -+ -+# Expand $prefix -+eval FENCETMPDIR="`eval echo ${FENCETMPDIR}`" -+AC_DEFINE_UNQUOTED(FENCETMPDIR,"$FENCETMPDIR", Where Fence agents keep state files) -+AC_SUBST(FENCETMPDIR) -+ -+ - if test "x$AGENTS_LIST" = x; then - AC_ERROR([No agents selected]) - fi - -+# PKG_CHECK_MODULES will fail if systemd is not found by default, so make sure -+# we set the proper vars and deal with it -+PKG_CHECK_MODULES([systemd], [systemd], [HAS_SYSTEMD=yes], [HAS_SYSTEMD=no]) -+if test "x$HAS_SYSTEMD" == "xyes"; then -+ PKG_CHECK_VAR([SYSTEMD_TMPFILES_DIR], [systemd], [tmpfilesdir]) -+ if test "x$SYSTEMD_TMPFILES_DIR" == "x"; then -+ AC_MSG_ERROR([Unable to detect systemd tmpfiles directory automatically]) -+ fi -+ -+ # sanitize systed vars when using non standard prefix -+ if test "$prefix" != "/usr"; then -+ SYSTEMD_TMPFILES_DIR="$prefix/$SYSTEMD_TMPFILES_DIR" -+ AC_SUBST([SYSTEMD_TMPFILES_DIR]) -+ fi -+fi -+AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$HAS_SYSTEMD" == xyes ]) -+ - FENCE_KDUMP=0 - if echo "$AGENTS_LIST" | grep -q -E "all|kdump"; then - case "$host_os" in -@@ -552,6 +580,8 @@ AM_EXTRA_RECURSIVE_TARGETS([xml-check xml-upload]) - AC_CONFIG_FILES([Makefile - agents/Makefile - lib/Makefile -+ systemd/Makefile -+ systemd/fence-agents.conf - doc/Makefile]) - - AC_OUTPUT -diff --git a/m4/PKG_CHECK_VAR.m4 b/m4/PKG_CHECK_VAR.m4 -new file mode 100644 -index 000000000..2221a69eb ---- /dev/null -+++ b/m4/PKG_CHECK_VAR.m4 -@@ -0,0 +1,24 @@ -+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -+dnl ------------------------------------------- -+dnl Since: 0.28 -+dnl -+dnl Retrieves the value of the pkg-config variable for the given module. -+dnl -+dnl Origin (declared license: GPLv2+ with less restrictive exception): -+dnl https://cgit.freedesktop.org/pkg-config/tree/pkg.m4.in?h=pkg-config-0.29.1#n261 -+dnl (AS_VAR_COPY replaced with backward-compatible equivalent and guard -+dnl to prefer system-wide variant by Jan Pokorny ) -+ -+m4_ifndef([PKG_CHECK_VAR],[ -+AC_DEFUN([PKG_CHECK_VAR], -+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl -+ -+_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -+dnl AS_VAR_COPY([$1], [pkg_cv_][$1]) -+$1=AS_VAR_GET([pkg_cv_][$1]) -+ -+AS_VAR_IF([$1], [""], [$5], [$4])dnl -+])dnl PKG_CHECK_VAR -+])dnl m4_ifndef -diff --git a/make/fencebuild.mk b/make/fencebuild.mk -index 762db62c4..9a3c6d6dd 100644 ---- a/make/fencebuild.mk -+++ b/make/fencebuild.mk -@@ -8,6 +8,7 @@ define gen_agent_from_py - -e 's#@''LOGDIR@#${LOGDIR}#g' \ - -e 's#@''SBINDIR@#${sbindir}#g' \ - -e 's#@''LIBEXECDIR@#${libexecdir}#g' \ -+ -e 's#@''FENCETMPDIR@#${FENCETMPDIR}#g' \ - -e 's#@''IPMITOOL_PATH@#${IPMITOOL_PATH}#g' \ - -e 's#@''OPENSTACK_PATH@#${OPENSTACK_PATH}#g' \ - -e 's#@''AMTTOOL_PATH@#${AMTTOOL_PATH}#g' \ -diff --git a/systemd/Makefile.am b/systemd/Makefile.am -new file mode 100644 -index 000000000..aa3a01679 ---- /dev/null -+++ b/systemd/Makefile.am -@@ -0,0 +1,24 @@ -+# -+# Copyright (C) 2017 Oyvind Albrigtsen -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License -+# as published by the Free Software Foundation; either version 2 -+# of the License, or (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# -+ -+MAINTAINERCLEANFILES = Makefile.in -+ -+if HAVE_SYSTEMD -+tmpfilesdir = $(SYSTEMD_TMPFILES_DIR) -+tmpfiles_DATA = fence-agents.conf -+endif -diff --git a/systemd/fence-agents.conf.in b/systemd/fence-agents.conf.in -new file mode 100644 -index 000000000..4181287da ---- /dev/null -+++ b/systemd/fence-agents.conf.in -@@ -0,0 +1 @@ -+d @FENCETMPDIR@ 1755 root root - -From d5a12d9c30b66eb8720e037c4dce5fe0f3ad7dbb Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 30 Jun 2022 13:20:37 +0200 -Subject: [PATCH 3/3] fence_ibm_vpc: add token cache support - ---- - agents/ibm_vpc/fence_ibm_vpc.py | 126 ++++++++++++++++++++---- - tests/data/metadata/fence_ibm_vpc.xml | 4 + - 3 files changed, 110 insertions(+), 22 deletions(-) - -diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py -index 3da3ce056..847010584 100755 ---- a/agents/ibm_vpc/fence_ibm_vpc.py -+++ b/agents/ibm_vpc/fence_ibm_vpc.py -@@ -4,9 +4,10 @@ - import pycurl, io, json - import logging - import atexit -+import hashlib - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * --from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS -+from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS, EC_GENERIC_ERROR - - state = { - "running": "on", -@@ -22,7 +23,7 @@ def get_list(conn, options): - - try: - command = "instances?version=2021-05-25&generation=2&limit={}".format(options["--limit"]) -- res = send_command(conn, command) -+ res = send_command(conn, options, command) - except Exception as e: - logging.debug("Failed: Unable to get list: {}".format(e)) - return outlets -@@ -38,7 +39,7 @@ def get_list(conn, options): - def get_power_status(conn, options): - try: - command = "instances/{}?version=2021-05-25&generation=2".format(options["--plug"]) -- res = send_command(conn, command) -+ res = send_command(conn, options, command) - result = state[res["status"]] - if options["--verbose-level"] > 1: - logging.debug("Result:\n{}".format(json.dumps(res, indent=2))) -@@ -57,27 +58,71 @@ def set_power_status(conn, options): - - try: - command = "instances/{}/actions?version=2021-05-25&generation=2".format(options["--plug"]) -- send_command(conn, command, "POST", action, 201) -+ send_command(conn, options, command, "POST", action, 201) - except Exception as e: - logging.debug("Failed: Unable to set power to {} for {}".format(options["--action"], e)) - fail(EC_STATUS) - - def get_bearer_token(conn, options): -+ import os, errno -+ -+ try: -+ # FIPS requires usedforsecurity=False and might not be -+ # available on all distros: https://bugs.python.org/issue9216 -+ hash = hashlib.sha256(options["--apikey"].encode("utf-8"), usedforsecurity=False).hexdigest() -+ except (AttributeError, TypeError): -+ hash = hashlib.sha256(options["--apikey"].encode("utf-8")).hexdigest() -+ file_path = options["--token-file"].replace("[hash]", hash) - token = None -+ -+ if not os.path.isdir(os.path.dirname(file_path)): -+ os.makedirs(os.path.dirname(file_path)) -+ -+ # For security, remove file with potentially elevated mode - try: -- conn.setopt(pycurl.HTTPHEADER, [ -- "Content-Type: application/x-www-form-urlencoded", -- "User-Agent: curl", -- ]) -- token = send_command(conn, "https://iam.cloud.ibm.com/identity/token", "POST", "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey={}".format(options["--apikey"]))["access_token"] -- except Exception: -- logging.error("Failed: Unable to authenticate") -- fail(EC_LOGIN_DENIED) -+ os.remove(file_path) -+ except OSError: -+ pass -+ -+ try: -+ oldumask = os.umask(0) -+ file_handle = os.open(file_path, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o600) -+ except OSError as e: -+ if e.errno == errno.EEXIST: # Failed as the file already exists. -+ logging.error("Failed: File already exists: {}".format(e)) -+ sys.exit(EC_GENERIC_ERROR) -+ else: # Something unexpected went wrong -+ logging.error("Failed: Unable to open file: {}".format(e)) -+ sys.exit(EC_GENERIC_ERROR) -+ else: # No exception, so the file must have been created successfully. -+ with os.fdopen(file_handle, 'w') as file_obj: -+ try: -+ conn.setopt(pycurl.HTTPHEADER, [ -+ "Content-Type: application/x-www-form-urlencoded", -+ "User-Agent: curl", -+ ]) -+ token = send_command(conn, options, "https://iam.cloud.ibm.com/identity/token", "POST", "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey={}".format(options["--apikey"]))["access_token"] -+ except Exception as e: -+ logging.error("Failed: Unable to authenticate: {}".format(e)) -+ fail(EC_LOGIN_DENIED) -+ file_obj.write(token) -+ finally: -+ os.umask(oldumask) - - return token - -+def set_bearer_token(conn, bearer_token): -+ conn.setopt(pycurl.HTTPHEADER, [ -+ "Content-Type: application/json", -+ "Authorization: Bearer {}".format(bearer_token), -+ "User-Agent: curl", -+ ]) -+ -+ return conn -+ - def connect(opt): - conn = pycurl.Curl() -+ bearer_token = "" - - ## setup correct URL - conn.base_url = "https://" + opt["--region"] + ".iaas.cloud.ibm.com/v1/" -@@ -91,21 +136,28 @@ def connect(opt): - conn.setopt(pycurl.PROXY, "{}".format(opt["--proxy"])) - - # get bearer token -- bearer_token = get_bearer_token(conn, opt) -+ try: -+ try: -+ # FIPS requires usedforsecurity=False and might not be -+ # available on all distros: https://bugs.python.org/issue9216 -+ hash = hashlib.sha256(opt["--apikey"].encode("utf-8"), usedforsecurity=False).hexdigest() -+ except (AttributeError, TypeError): -+ hash = hashlib.sha256(opt["--apikey"].encode("utf-8")).hexdigest() -+ f = open(opt["--token-file"].replace("[hash]", hash)) -+ bearer_token = f.read() -+ f.close() -+ except IOError: -+ bearer_token = get_bearer_token(conn, opt) - - # set auth token for later requests -- conn.setopt(pycurl.HTTPHEADER, [ -- "Content-Type: application/json", -- "Authorization: Bearer {}".format(bearer_token), -- "User-Agent: curl", -- ]) -+ conn = set_bearer_token(conn, bearer_token) - - return conn - - def disconnect(conn): - conn.close() - --def send_command(conn, command, method="GET", action=None, expected_rc=200): -+def send_command(conn, options, command, method="GET", action=None, expected_rc=200): - if not command.startswith("https"): - url = conn.base_url + command - else: -@@ -130,6 +182,26 @@ def send_command(conn, command, method="GET", action=None, expected_rc=200): - raise(e) - - rc = conn.getinfo(pycurl.HTTP_CODE) -+ -+ # auth if token has expired -+ if rc in [400, 401, 415]: -+ tokenconn = pycurl.Curl() -+ token = get_bearer_token(tokenconn, options) -+ tokenconn.close() -+ conn = set_bearer_token(conn, token) -+ -+ # flush web_buffer -+ web_buffer.close() -+ web_buffer = io.BytesIO() -+ conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) -+ -+ try: -+ conn.perform() -+ except Exception as e: -+ raise(e) -+ -+ rc = conn.getinfo(pycurl.HTTP_CODE) -+ - result = web_buffer.getvalue().decode("UTF-8") - - web_buffer.close() -@@ -173,7 +245,7 @@ def define_new_opts(): - all_opt["proxy"] = { - "getopt" : ":", - "longopt" : "proxy", -- "help" : "--proxy=[http://:] Proxy: 'http://:'", -+ "help" : "--proxy=[http://:] Proxy: 'http://:'", - "required" : "0", - "default": "", - "shortdesc" : "Network proxy", -@@ -188,14 +260,26 @@ def define_new_opts(): - "shortdesc" : "Number of nodes returned by API", - "order" : 0 - } -+ all_opt["token_file"] = { -+ "getopt" : ":", -+ "longopt" : "token-file", -+ "help" : "--token-file=[path] Path to the token cache file\n" -+ "\t\t\t\t (Default: @FENCETMPDIR@/fence_ibm_vpc/[hash].token)\n" -+ "\t\t\t\t [hash] will be replaced by a hashed value", -+ "required" : "0", -+ "default": "@FENCETMPDIR@/fence_ibm_vpc/[hash].token", -+ "shortdesc" : "Path to the token cache file", -+ "order" : 0 -+ } - - - def main(): - device_opt = [ - "apikey", - "region", -- "limit", - "proxy", -+ "limit", -+ "token_file", - "port", - "no_password", - ] -diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml -index acf4925fc..c35bc4619 100644 ---- a/tests/data/metadata/fence_ibm_vpc.xml -+++ b/tests/data/metadata/fence_ibm_vpc.xml -@@ -23,6 +23,10 @@ - - Region - -+ -+ -+ Path to the token cache file -+ - - - diff --git a/SOURCES/bz2134017-fence_lpar-only-output-additional-info-on-debug.patch b/SOURCES/bz2134017-fence_lpar-only-output-additional-info-on-debug.patch deleted file mode 100644 index 8d29594..0000000 --- a/SOURCES/bz2134017-fence_lpar-only-output-additional-info-on-debug.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 46f94d4dbad868afc70b96bd612323221991d06e Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 11 Oct 2022 09:51:24 +0200 -Subject: [PATCH] fence_lpar: only output additional error output on DEBUG - level - -Without this patch we get ERROR logged with trace info when doing -status-action for nodes that doesnt exist. ---- - agents/lpar/fence_lpar.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py -index 2046b0e4e..975971a57 100644 ---- a/agents/lpar/fence_lpar.py -+++ b/agents/lpar/fence_lpar.py -@@ -12,6 +12,7 @@ - - import sys, re - import atexit -+import logging - sys.path.append("@FENCEAGENTSLIBDIR@") - from fencing import * - from fencing import fail, fail_usage, EC_STATUS_HMC -@@ -48,7 +49,7 @@ def get_power_status(conn, options): - elif options["--hmc-version"] in ["4", "IVM"]: - status = re.compile(",state=(.*?),", re.IGNORECASE).search(conn.before).group(1) - except AttributeError as e: -- fail_usage("Command on HMC failed: {}\n{}".format(command, str(e)), False) -+ logging.debug("Command on HMC failed: {}\n{}".format(command, str(e))) - fail(EC_STATUS_HMC) - - return _normalize_status(status) diff --git a/SOURCES/bz2136076-fence_ibm_powervs-improve-defaults.patch b/SOURCES/bz2136076-fence_ibm_powervs-improve-defaults.patch deleted file mode 100644 index 7f5e578..0000000 --- a/SOURCES/bz2136076-fence_ibm_powervs-improve-defaults.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 3373431dc49d6e429bbf613765385cb33a56e917 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 25 Oct 2022 10:39:29 +0200 -Subject: [PATCH] fence_ibm_powervs: improve defaults based on testing - ---- - agents/ibm_powervs/fence_ibm_powervs.py | 4 ++-- - tests/data/metadata/fence_ibm_powervs.xml | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py -index b0caed7c5..183893616 100755 ---- a/agents/ibm_powervs/fence_ibm_powervs.py -+++ b/agents/ibm_powervs/fence_ibm_powervs.py -@@ -232,10 +232,10 @@ def main(): - atexit.register(atexit_handler) - define_new_opts() - -- all_opt["shell_timeout"]["default"] = "15" -+ all_opt["shell_timeout"]["default"] = "500" - all_opt["power_timeout"]["default"] = "30" - all_opt["power_wait"]["default"] = "1" -- all_opt["stonith_status_sleep"]["default"] = "3" -+ all_opt["stonith_status_sleep"]["default"] = "2" - all_opt["api-type"]["default"] = "private" - all_opt["proxy"]["default"] = "" - -diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml -index 40c494110..326bc2378 100644 ---- a/tests/data/metadata/fence_ibm_powervs.xml -+++ b/tests/data/metadata/fence_ibm_powervs.xml -@@ -119,12 +119,12 @@ - - - -- -+ - Wait X seconds for cmd prompt after issuing command - - - -- -+ - Sleep X seconds between status calls during a STONITH action - - diff --git a/SOURCES/bz2152105-fencing-1-add-plug_separator.patch b/SOURCES/bz2152105-fencing-1-add-plug_separator.patch deleted file mode 100644 index e0a8f08..0000000 --- a/SOURCES/bz2152105-fencing-1-add-plug_separator.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 90ea995038e560222f9345310f31a79b595a5219 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 24 Nov 2022 10:19:29 +0100 -Subject: [PATCH 1/2] fencing: add plug_separator parameter to be able to - specify one that isnt part of the plug name(s) - ---- - lib/fencing.py.py | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 940bd01d1..cf1c48e78 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -322,6 +322,13 @@ - "help" : "-6, --inet6-only Forces agent to use IPv6 addresses only", - "required" : "0", - "order" : 1}, -+ "plug_separator" : { -+ "getopt" : ":", -+ "longopt" : "plug-separator", -+ "help" : "--plug-separator=[char] Separator for plug parameter when specifying more than 1 plug", -+ "default" : ",", -+ "required" : "0", -+ "order" : 100}, - "separator" : { - "getopt" : "C:", - "longopt" : "separator", -@@ -934,7 +941,7 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis - - try: - if "--plug" in options: -- options["--plugs"] = options["--plug"].split(",") -+ options["--plugs"] = options["--plug"].split(options["--plug-separator"]) - - ## Process options that manipulate fencing device - ##### - -From 55e2a56b81ed2188dedfce07cc3155e2175183cd Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 28 Nov 2022 12:40:00 +0100 -Subject: [PATCH 2/2] fence_wti: increase login timeout to avoid random - timeouts - ---- - agents/wti/fence_wti.py | 1 + - tests/data/metadata/fence_wti.xml | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/agents/wti/fence_wti.py b/agents/wti/fence_wti.py -index 68640ae65..97cc66de2 100644 ---- a/agents/wti/fence_wti.py -+++ b/agents/wti/fence_wti.py -@@ -178,6 +178,7 @@ def main(): - atexit.register(atexit_handler) - - all_opt["cmd_prompt"]["default"] = ["RSM>", "MPC>", "IPS>", "TPS>", "NBB>", "NPS>", "VMR>"] -+ all_opt["login_timeout"]["default"] = "10" - - options = check_input(device_opt, process_input(device_opt)) - -diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml -index 6bdccd2dc..8e15f4852 100644 ---- a/tests/data/metadata/fence_wti.xml -+++ b/tests/data/metadata/fence_wti.xml -@@ -153,7 +153,7 @@ - - - -- -+ - Wait X seconds for cmd prompt after login - - diff --git a/SOURCES/bz2152105-fencing-2-update-DEPENDENCY_OPT.patch b/SOURCES/bz2152105-fencing-2-update-DEPENDENCY_OPT.patch deleted file mode 100644 index b3c7a35..0000000 --- a/SOURCES/bz2152105-fencing-2-update-DEPENDENCY_OPT.patch +++ /dev/null @@ -1,1212 +0,0 @@ -From 0f280ea4a299037a7d4e99d80b0193fd6fcdbd79 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 24 Jan 2023 12:19:41 +0100 -Subject: [PATCH] fencing: add plug_separator to default DEPENDENCY_OPT - ---- - lib/fencing.py.py | 2 +- - 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_ibm_powervs.xml | 5 +++++ - tests/data/metadata/fence_ibm_vpc.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_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 +++++ - 84 files changed, 416 insertions(+), 1 deletion(-) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index cf1c48e78..c5b5e94a1 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -494,7 +494,7 @@ - "version", "action", "agent", "power_timeout", - "shell_timeout", "login_timeout", "disable_timeout", - "power_wait", "stonith_status_sleep", "retry_on", "delay", -- "quiet"], -+ "plug_separator", "quiet"], - "passwd" : ["passwd_script"], - "sudo" : ["sudo_path"], - "secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"], -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -index 35112eb68..56d792048 100644 ---- a/tests/data/metadata/fence_aliyun.xml -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -72,6 +72,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml -index 939b3a56e..6532ad6dd 100644 ---- a/tests/data/metadata/fence_alom.xml -+++ b/tests/data/metadata/fence_alom.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml -index 98b5ceeb4..809c2dfea 100644 ---- a/tests/data/metadata/fence_amt.xml -+++ b/tests/data/metadata/fence_amt.xml -@@ -106,6 +106,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - Path to amttool binary -diff --git a/tests/data/metadata/fence_amt_ws.xml b/tests/data/metadata/fence_amt_ws.xml -index af7c433f0..97a222526 100644 ---- a/tests/data/metadata/fence_amt_ws.xml -+++ b/tests/data/metadata/fence_amt_ws.xml -@@ -106,6 +106,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_apc.xml b/tests/data/metadata/fence_apc.xml -index da029bbb0..6081b1ff5 100644 ---- a/tests/data/metadata/fence_apc.xml -+++ b/tests/data/metadata/fence_apc.xml -@@ -141,6 +141,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_apc_snmp.xml b/tests/data/metadata/fence_apc_snmp.xml -index 5f5a33398..02efbb0b0 100644 ---- a/tests/data/metadata/fence_apc_snmp.xml -+++ b/tests/data/metadata/fence_apc_snmp.xml -@@ -147,6 +147,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml -index 682b9f0de..76995ecf2 100644 ---- a/tests/data/metadata/fence_aws.xml -+++ b/tests/data/metadata/fence_aws.xml -@@ -80,6 +80,11 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml -index f7882fa23..c6e1f203b 100644 ---- a/tests/data/metadata/fence_azure_arm.xml -+++ b/tests/data/metadata/fence_azure_arm.xml -@@ -132,6 +132,11 @@ When using network fencing the reboot-action will cause a quick-return once the - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_bladecenter.xml b/tests/data/metadata/fence_bladecenter.xml -index 656d12b8b..3cc415355 100644 ---- a/tests/data/metadata/fence_bladecenter.xml -+++ b/tests/data/metadata/fence_bladecenter.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_brocade.xml b/tests/data/metadata/fence_brocade.xml -index e6265b68f..a78738d96 100644 ---- a/tests/data/metadata/fence_brocade.xml -+++ b/tests/data/metadata/fence_brocade.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml -index e2f5c5b6a..829c9dcbe 100644 ---- a/tests/data/metadata/fence_cisco_mds.xml -+++ b/tests/data/metadata/fence_cisco_mds.xml -@@ -146,6 +146,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml -index e232f33bc..76d15e9f4 100644 ---- a/tests/data/metadata/fence_cisco_ucs.xml -+++ b/tests/data/metadata/fence_cisco_ucs.xml -@@ -122,6 +122,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml -index 1b25910f5..f6aa1920b 100644 ---- a/tests/data/metadata/fence_compute.xml -+++ b/tests/data/metadata/fence_compute.xml -@@ -157,6 +157,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml -index 12725b95a..f685b1162 100644 ---- a/tests/data/metadata/fence_docker.xml -+++ b/tests/data/metadata/fence_docker.xml -@@ -110,6 +110,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml -index bb83f5860..a99126132 100644 ---- a/tests/data/metadata/fence_drac.xml -+++ b/tests/data/metadata/fence_drac.xml -@@ -107,6 +107,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_drac5.xml b/tests/data/metadata/fence_drac5.xml -index c539923c0..a0c73ebf8 100644 ---- a/tests/data/metadata/fence_drac5.xml -+++ b/tests/data/metadata/fence_drac5.xml -@@ -145,6 +145,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_dummy.xml b/tests/data/metadata/fence_dummy.xml -index a711d3869..0651f5ae0 100644 ---- a/tests/data/metadata/fence_dummy.xml -+++ b/tests/data/metadata/fence_dummy.xml -@@ -56,6 +56,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_eaton_snmp.xml b/tests/data/metadata/fence_eaton_snmp.xml -index b3e870b95..1d89b5272 100644 ---- a/tests/data/metadata/fence_eaton_snmp.xml -+++ b/tests/data/metadata/fence_eaton_snmp.xml -@@ -146,6 +146,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml -index b46ef8293..1ed792e2b 100644 ---- a/tests/data/metadata/fence_emerson.xml -+++ b/tests/data/metadata/fence_emerson.xml -@@ -146,6 +146,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml -index 6cf772895..a8cf8ad41 100644 ---- a/tests/data/metadata/fence_eps.xml -+++ b/tests/data/metadata/fence_eps.xml -@@ -109,6 +109,11 @@ Agent basically works by connecting to hidden page and pass appropriate argument - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_evacuate.xml b/tests/data/metadata/fence_evacuate.xml -index 10b84abca..df2181eb6 100644 ---- a/tests/data/metadata/fence_evacuate.xml -+++ b/tests/data/metadata/fence_evacuate.xml -@@ -152,6 +152,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml -index c7d400e10..2a89b16c2 100644 ---- a/tests/data/metadata/fence_gce.xml -+++ b/tests/data/metadata/fence_gce.xml -@@ -147,6 +147,11 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_hds_cb.xml b/tests/data/metadata/fence_hds_cb.xml -index 90f4d2809..e25d889e3 100644 ---- a/tests/data/metadata/fence_hds_cb.xml -+++ b/tests/data/metadata/fence_hds_cb.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_heuristics_ping.xml b/tests/data/metadata/fence_heuristics_ping.xml -index 3832e3c9d..b10189b91 100644 ---- a/tests/data/metadata/fence_heuristics_ping.xml -+++ b/tests/data/metadata/fence_heuristics_ping.xml -@@ -82,6 +82,11 @@ This is not a fence agent by itself! Its only purpose is to enable/disable anoth - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_hpblade.xml b/tests/data/metadata/fence_hpblade.xml -index 6f190f3f3..0957fcdd4 100644 ---- a/tests/data/metadata/fence_hpblade.xml -+++ b/tests/data/metadata/fence_hpblade.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml -index 326bc2378..79878a9a7 100644 ---- a/tests/data/metadata/fence_ibm_powervs.xml -+++ b/tests/data/metadata/fence_ibm_powervs.xml -@@ -87,6 +87,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml -index c35bc4619..fe29ffb89 100644 ---- a/tests/data/metadata/fence_ibm_vpc.xml -+++ b/tests/data/metadata/fence_ibm_vpc.xml -@@ -76,6 +76,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ibmblade.xml b/tests/data/metadata/fence_ibmblade.xml -index 9598abf6f..3286ca6de 100644 ---- a/tests/data/metadata/fence_ibmblade.xml -+++ b/tests/data/metadata/fence_ibmblade.xml -@@ -146,6 +146,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml -index a38345629..2d4876493 100644 ---- a/tests/data/metadata/fence_idrac.xml -+++ b/tests/data/metadata/fence_idrac.xml -@@ -150,6 +150,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ifmib.xml b/tests/data/metadata/fence_ifmib.xml -index c9328797e..4b56e2335 100644 ---- a/tests/data/metadata/fence_ifmib.xml -+++ b/tests/data/metadata/fence_ifmib.xml -@@ -148,6 +148,11 @@ It was written with managed ethernet switches in mind, in order to fence iSCSI S - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml -index 384b40dc6..0bac03c83 100644 ---- a/tests/data/metadata/fence_ilo.xml -+++ b/tests/data/metadata/fence_ilo.xml -@@ -133,6 +133,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml -index 3c98719d9..3d954a345 100644 ---- a/tests/data/metadata/fence_ilo2.xml -+++ b/tests/data/metadata/fence_ilo2.xml -@@ -133,6 +133,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml -index b0183ecee..0567b539c 100644 ---- a/tests/data/metadata/fence_ilo3.xml -+++ b/tests/data/metadata/fence_ilo3.xml -@@ -150,6 +150,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo3_ssh.xml b/tests/data/metadata/fence_ilo3_ssh.xml -index 1a9e56c50..e2a25661d 100644 ---- a/tests/data/metadata/fence_ilo3_ssh.xml -+++ b/tests/data/metadata/fence_ilo3_ssh.xml -@@ -149,6 +149,11 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml -index 22df71375..647bb1021 100644 ---- a/tests/data/metadata/fence_ilo4.xml -+++ b/tests/data/metadata/fence_ilo4.xml -@@ -150,6 +150,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo4_ssh.xml b/tests/data/metadata/fence_ilo4_ssh.xml -index 78aed1c4e..4fd6b2ef1 100644 ---- a/tests/data/metadata/fence_ilo4_ssh.xml -+++ b/tests/data/metadata/fence_ilo4_ssh.xml -@@ -149,6 +149,11 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo_moonshot.xml b/tests/data/metadata/fence_ilo_moonshot.xml -index b38be58f3..c88c5922f 100644 ---- a/tests/data/metadata/fence_ilo_moonshot.xml -+++ b/tests/data/metadata/fence_ilo_moonshot.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml -index ea0a8e69c..7d4fd22d5 100644 ---- a/tests/data/metadata/fence_ilo_mp.xml -+++ b/tests/data/metadata/fence_ilo_mp.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ilo_ssh.xml b/tests/data/metadata/fence_ilo_ssh.xml -index b8ffe3c6d..2e1cb84b2 100644 ---- a/tests/data/metadata/fence_ilo_ssh.xml -+++ b/tests/data/metadata/fence_ilo_ssh.xml -@@ -149,6 +149,11 @@ WARNING: The monitor-action is prone to timeouts. Use the fence_ilo-equivalent t - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml -index 5ed4e8c30..5c5bf910f 100644 ---- a/tests/data/metadata/fence_imm.xml -+++ b/tests/data/metadata/fence_imm.xml -@@ -150,6 +150,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_intelmodular.xml b/tests/data/metadata/fence_intelmodular.xml -index 03c7c55d8..5dad0d0bd 100644 ---- a/tests/data/metadata/fence_intelmodular.xml -+++ b/tests/data/metadata/fence_intelmodular.xml -@@ -148,6 +148,11 @@ Note: Since firmware update version 2.7, SNMP v2 write support is removed, and r - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ipdu.xml b/tests/data/metadata/fence_ipdu.xml -index d9a44dd0f..22024a7a1 100644 ---- a/tests/data/metadata/fence_ipdu.xml -+++ b/tests/data/metadata/fence_ipdu.xml -@@ -146,6 +146,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml -index f8ede91cd..a31afcfd4 100644 ---- a/tests/data/metadata/fence_ipmilan.xml -+++ b/tests/data/metadata/fence_ipmilan.xml -@@ -150,6 +150,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ironic.xml b/tests/data/metadata/fence_ironic.xml -index 4da784826..813b03732 100644 ---- a/tests/data/metadata/fence_ironic.xml -+++ b/tests/data/metadata/fence_ironic.xml -@@ -102,6 +102,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ldom.xml b/tests/data/metadata/fence_ldom.xml -index 0c8c45e24..59facad6f 100644 ---- a/tests/data/metadata/fence_ldom.xml -+++ b/tests/data/metadata/fence_ldom.xml -@@ -138,6 +138,11 @@ Very useful parameter is -c (or cmd_prompt in stdin mode). This must be set to s - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_lpar.xml b/tests/data/metadata/fence_lpar.xml -index e2adbc334..22f12dc23 100644 ---- a/tests/data/metadata/fence_lpar.xml -+++ b/tests/data/metadata/fence_lpar.xml -@@ -150,6 +150,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index d656013bb..e22d3a1f9 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -75,6 +75,11 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_netio.xml b/tests/data/metadata/fence_netio.xml -index 7d8a4c723..95f3cf34a 100644 ---- a/tests/data/metadata/fence_netio.xml -+++ b/tests/data/metadata/fence_netio.xml -@@ -97,6 +97,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_ovh.xml b/tests/data/metadata/fence_ovh.xml -index 5913e49ad..79d5eda94 100644 ---- a/tests/data/metadata/fence_ovh.xml -+++ b/tests/data/metadata/fence_ovh.xml -@@ -87,6 +87,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_powerman.xml b/tests/data/metadata/fence_powerman.xml -index eb2509452..10514fd3c 100644 ---- a/tests/data/metadata/fence_powerman.xml -+++ b/tests/data/metadata/fence_powerman.xml -@@ -67,6 +67,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_pve.xml b/tests/data/metadata/fence_pve.xml -index ec1405448..1ed3cda4f 100644 ---- a/tests/data/metadata/fence_pve.xml -+++ b/tests/data/metadata/fence_pve.xml -@@ -145,6 +145,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_raritan.xml b/tests/data/metadata/fence_raritan.xml -index 9983cc08c..5e387c784 100644 ---- a/tests/data/metadata/fence_raritan.xml -+++ b/tests/data/metadata/fence_raritan.xml -@@ -97,6 +97,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_rcd_serial.xml b/tests/data/metadata/fence_rcd_serial.xml -index 2d0a49d9f..c14d342f7 100644 ---- a/tests/data/metadata/fence_rcd_serial.xml -+++ b/tests/data/metadata/fence_rcd_serial.xml -@@ -55,6 +55,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_redfish.xml b/tests/data/metadata/fence_redfish.xml -index 5bdb32365..76a23af30 100644 ---- a/tests/data/metadata/fence_redfish.xml -+++ b/tests/data/metadata/fence_redfish.xml -@@ -132,6 +132,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml -index 372c1bbca..0b2239931 100644 ---- a/tests/data/metadata/fence_rhevm.xml -+++ b/tests/data/metadata/fence_rhevm.xml -@@ -140,6 +140,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml -index 6dfb0925c..284f9184d 100644 ---- a/tests/data/metadata/fence_rsa.xml -+++ b/tests/data/metadata/fence_rsa.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml -index 52978583c..e3d6e1096 100644 ---- a/tests/data/metadata/fence_rsb.xml -+++ b/tests/data/metadata/fence_rsb.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_sanbox2.xml b/tests/data/metadata/fence_sanbox2.xml -index 2fa3f295b..b29b8bb75 100644 ---- a/tests/data/metadata/fence_sanbox2.xml -+++ b/tests/data/metadata/fence_sanbox2.xml -@@ -107,6 +107,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_sbd.xml b/tests/data/metadata/fence_sbd.xml -index 7248b864a..d5600b7ce 100644 ---- a/tests/data/metadata/fence_sbd.xml -+++ b/tests/data/metadata/fence_sbd.xml -@@ -65,6 +65,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index 97c44cc21..4fa86189c 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -90,6 +90,11 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_tripplite_snmp.xml b/tests/data/metadata/fence_tripplite_snmp.xml -index b767597c5..c5f66d56f 100644 ---- a/tests/data/metadata/fence_tripplite_snmp.xml -+++ b/tests/data/metadata/fence_tripplite_snmp.xml -@@ -147,6 +147,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_vbox.xml b/tests/data/metadata/fence_vbox.xml -index daf8ee98a..35577a6b6 100644 ---- a/tests/data/metadata/fence_vbox.xml -+++ b/tests/data/metadata/fence_vbox.xml -@@ -138,6 +138,11 @@ By default, vbox needs to log in as a user that is a member of the vboxusers gro - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_virsh.xml b/tests/data/metadata/fence_virsh.xml -index b9b4082fe..82fe9b6d1 100644 ---- a/tests/data/metadata/fence_virsh.xml -+++ b/tests/data/metadata/fence_virsh.xml -@@ -138,6 +138,11 @@ By default, virsh needs root account to do properly work. So you must allow ssh - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_vmware.xml b/tests/data/metadata/fence_vmware.xml -index 8d6eabc6f..a46ffdb0f 100644 ---- a/tests/data/metadata/fence_vmware.xml -+++ b/tests/data/metadata/fence_vmware.xml -@@ -149,6 +149,11 @@ After you have successfully installed VI Perl Toolkit or VIX API, you should be - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_vmware_rest.xml b/tests/data/metadata/fence_vmware_rest.xml -index e46c7a993..5c69c2f21 100644 ---- a/tests/data/metadata/fence_vmware_rest.xml -+++ b/tests/data/metadata/fence_vmware_rest.xml -@@ -128,6 +128,11 @@ NOTE: If there's more than 1000 VMs there is a filter parameter to work around t - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml -index 1327abac6..72b27e351 100644 ---- a/tests/data/metadata/fence_vmware_soap.xml -+++ b/tests/data/metadata/fence_vmware_soap.xml -@@ -119,6 +119,11 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_vmware_vcloud.xml b/tests/data/metadata/fence_vmware_vcloud.xml -index 85d970e0a..3c8bb74a3 100644 ---- a/tests/data/metadata/fence_vmware_vcloud.xml -+++ b/tests/data/metadata/fence_vmware_vcloud.xml -@@ -121,6 +121,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml -index 8e15f4852..b9eb9c6bc 100644 ---- a/tests/data/metadata/fence_wti.xml -+++ b/tests/data/metadata/fence_wti.xml -@@ -136,6 +136,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_xenapi.xml b/tests/data/metadata/fence_xenapi.xml -index 83c83fff0..380ac28da 100644 ---- a/tests/data/metadata/fence_xenapi.xml -+++ b/tests/data/metadata/fence_xenapi.xml -@@ -87,6 +87,11 @@ - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - -diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml -index 192d1e76b..6996ab736 100644 ---- a/tests/data/metadata/fence_zvmip.xml -+++ b/tests/data/metadata/fence_zvmip.xml -@@ -150,6 +150,11 @@ to access the system's directory manager. - - Display help and exit - -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ - - - diff --git a/SOURCES/bz2155453-fence_ibm_powervs-performance-improvements.patch b/SOURCES/bz2155453-fence_ibm_powervs-performance-improvements.patch deleted file mode 100644 index c232a3c..0000000 --- a/SOURCES/bz2155453-fence_ibm_powervs-performance-improvements.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 22935608247816be0ccec85fc590f19b509f3614 Mon Sep 17 00:00:00 2001 -From: Andreas Schauberer <74912604+andscha@users.noreply.github.com> -Date: Thu, 15 Jun 2023 16:34:13 +0200 -Subject: [PATCH 1/3] fence_ibm_powervs: improved performance - -fence_ibm_powervs: improved performance -- improved performance using less power-iaas.cloud.ibm.com API calls -- add support for reboot_cycle, method to fence (onoff|cycle) (Default: onoff) - -Addressed comments by oalbrigt in ClusterLabs #PR542 -- you can use if options["--verbose-level"] > 1: to only print it when -vv or more or verbose_level is set to 2 or higher. -- Removed all_opt["method"] defaults ---- - agents/ibm_powervs/fence_ibm_powervs.py | 70 ++++++++++++++++++------- - 1 file changed, 51 insertions(+), 19 deletions(-) - -diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py -index 183893616..e65462cb9 100755 ---- a/agents/ibm_powervs/fence_ibm_powervs.py -+++ b/agents/ibm_powervs/fence_ibm_powervs.py -@@ -12,6 +12,8 @@ - state = { - "ACTIVE": "on", - "SHUTOFF": "off", -+ "HARD_REBOOT": "on", -+ "SOFT_REBOOT": "on", - "ERROR": "unknown" - } - -@@ -37,21 +39,30 @@ def get_list(conn, options): - return outlets - - for r in res["pvmInstances"]: -- if "--verbose" in options: -+ if options["--verbose-level"] > 1: - logging.debug(json.dumps(r, indent=2)) - outlets[r["pvmInstanceID"]] = (r["serverName"], state[r["status"]]) - - return outlets - - def get_power_status(conn, options): -+ outlets = {} -+ logging.debug("Info: getting power status for LPAR " + options["--plug"] + " instance " + options["--instance"]) - try: - command = "cloud-instances/{}/pvm-instances/{}".format( - options["--instance"], options["--plug"]) - res = send_command(conn, command) -- result = get_list(conn, options)[options["--plug"]][1] -+ outlets[res["pvmInstanceID"]] = (res["serverName"], state[res["status"]]) -+ if options["--verbose-level"] > 1: -+ logging.debug(json.dumps(res, indent=2)) -+ result = outlets[options["--plug"]][1] -+ logging.debug("Info: Status: {}".format(result)) - except KeyError as e: -- logging.debug("Failed: Unable to get status for {}".format(e)) -- fail(EC_STATUS) -+ try: -+ result = get_list(conn, options)[options["--plug"]][1] -+ except KeyError as ex: -+ logging.debug("Failed: Unable to get status for {}".format(ex)) -+ fail(EC_STATUS) - - return result - -@@ -61,6 +72,7 @@ def set_power_status(conn, options): - "off" : '{"action" : "immediate-shutdown"}', - }[options["--action"]] - -+ logging.debug("Info: set power status to " + options["--action"] + " for LPAR " + options["--plug"] + " instance " + options["--instance"]) - try: - send_command(conn, "cloud-instances/{}/pvm-instances/{}/action".format( - options["--instance"], options["--plug"]), "POST", action) -@@ -68,6 +80,25 @@ def set_power_status(conn, options): - logging.debug("Failed: Unable to set power to {} for {}".format(options["--action"], e)) - fail(EC_STATUS) - -+def reboot_cycle(conn, options): -+ action = { -+ "reboot" : '{"action" : "hard-reboot"}', -+ }[options["--action"]] -+ -+ logging.debug("Info: start reboot cycle with action " + options["--action"] + " for LPAR " + options["--plug"] + " instance " + options["--instance"]) -+ try: -+ send_command(conn, "cloud-instances/{}/pvm-instances/{}/action".format( -+ options["--instance"], options["--plug"]), "POST", action) -+ except Exception as e: -+ result = get_power_status(conn, options) -+ logging.debug("Info: Status {}".format(result)) -+ if result == "off": -+ return True -+ else: -+ logging.debug("Failed: Unable to cycle with {} for {}".format(options["--action"], e)) -+ fail(EC_STATUS) -+ return True -+ - def connect(opt, token): - conn = pycurl.Curl() - -@@ -200,21 +231,21 @@ def define_new_opts(): - "order" : 0 - } - all_opt["api-type"] = { -- "getopt" : ":", -- "longopt" : "api-type", -- "help" : "--api-type=[public|private] API-type: 'public' (default) or 'private'", -- "required" : "0", -- "shortdesc" : "API-type (public|private)", -- "order" : 0 -- } -+ "getopt" : ":", -+ "longopt" : "api-type", -+ "help" : "--api-type=[public|private] API-type: 'public' (default) or 'private'", -+ "required" : "0", -+ "shortdesc" : "API-type (public|private)", -+ "order" : 0 -+ } - all_opt["proxy"] = { -- "getopt" : ":", -- "longopt" : "proxy", -- "help" : "--proxy=[http://:] Proxy: 'http://:'", -- "required" : "0", -- "shortdesc" : "Network proxy", -- "order" : 0 -- } -+ "getopt" : ":", -+ "longopt" : "proxy", -+ "help" : "--proxy=[http://:] Proxy: 'http://:'", -+ "required" : "0", -+ "shortdesc" : "Network proxy", -+ "order" : 0 -+ } - - - def main(): -@@ -227,6 +258,7 @@ def main(): - "proxy", - "port", - "no_password", -+ "method", - ] - - atexit.register(atexit_handler) -@@ -259,7 +291,7 @@ def main(): - conn = connect(options, token) - atexit.register(disconnect, conn) - -- result = fence_action(conn, options, set_power_status, get_power_status, get_list) -+ result = fence_action(conn, options, set_power_status, get_power_status, get_list, reboot_cycle) - - sys.exit(result) diff --git a/SOURCES/bz2160478-fence_scsi-fix-validate-all.patch b/SOURCES/bz2160478-fence_scsi-fix-validate-all.patch deleted file mode 100644 index 1aadca1..0000000 --- a/SOURCES/bz2160478-fence_scsi-fix-validate-all.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a416a367a804f1e5abaf142c629fe6ab5572d3b6 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 12 Jan 2023 15:46:41 +0100 -Subject: [PATCH] fence_scsi: skip key generation during validate-all action - ---- - agents/scsi/fence_scsi.py | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index e33339614..f9e6823b2 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -566,11 +566,12 @@ def main(): - or ("--key" in options and options["--key"])): - fail_usage("Failed: nodename or key is required", stop_after_error) - -- if not ("--key" in options and options["--key"]): -- options["--key"] = generate_key(options) -+ if options["--action"] != "validate-all": -+ if not ("--key" in options and options["--key"]): -+ options["--key"] = generate_key(options) - -- if options["--key"] == "0" or not options["--key"]: -- fail_usage("Failed: key cannot be 0", stop_after_error) -+ if options["--key"] == "0" or not options["--key"]: -+ fail_usage("Failed: key cannot be 0", stop_after_error) - - if "--key-value" in options\ - and (options["--key-value"] != "id" and options["--key-value"] != "hash"): diff --git a/SOURCES/bz2183158-fence_aws-1-add-skip-race-check-parameter.patch b/SOURCES/bz2183158-fence_aws-1-add-skip-race-check-parameter.patch deleted file mode 100644 index 254e4ff..0000000 --- a/SOURCES/bz2183158-fence_aws-1-add-skip-race-check-parameter.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 73fdae1b9da5aa1ba1d371dcc47fe31a4d22bb31 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 30 Mar 2023 12:20:05 +0200 -Subject: [PATCH] fence_aws: fixes to allow running outside of AWS network - -- add --skip-race-check parameter to allow running outside of AWS - network e.g. for openshift -- fixed and improved logging logic -- use --debug-file parameter for file logging ---- - agents/aws/fence_aws.py | 50 ++++++++++++++++++++----------- - tests/data/metadata/fence_aws.xml | 5 ++++ - 2 files changed, 37 insertions(+), 18 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index c947bf29c..5d1677144 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -16,13 +16,13 @@ - except ImportError: - pass - --logger = logging.getLogger("fence_aws") -+logger = logging.getLogger() - logger.propagate = False - logger.setLevel(logging.INFO) - logger.addHandler(SyslogLibHandler()) - logging.getLogger('botocore.vendored').propagate = False - --def get_instance_id(): -+def get_instance_id(options): - try: - 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") -@@ -30,12 +30,15 @@ def get_instance_id(): - except HTTPError as http_err: - logger.error('HTTP error occurred while trying to access EC2 metadata server: %s', http_err) - except Exception as err: -- logger.error('A fatal error occurred while trying to access EC2 metadata server: %s', err) -+ if "--skip-race-check" not in options: -+ logger.error('A fatal error occurred while trying to access EC2 metadata server: %s', err) -+ else: -+ logger.debug('A fatal error occurred while trying to access EC2 metadata server: %s', err) - return None -- -+ - - def get_nodes_list(conn, options): -- logger.info("Starting monitor operation") -+ logger.debug("Starting monitor operation") - result = {} - try: - if "--filter" in options: -@@ -63,7 +66,7 @@ def get_power_status(conn, options): - try: - instance = conn.instances.filter(Filters=[{"Name": "instance-id", "Values": [options["--plug"]]}]) - state = list(instance)[0].state["Name"] -- logger.info("Status operation for EC2 instance %s returned state: %s",options["--plug"],state.upper()) -+ logger.debug("Status operation for EC2 instance %s returned state: %s",options["--plug"],state.upper()) - if state == "running": - return "on" - elif state == "stopped": -@@ -78,7 +81,7 @@ def get_power_status(conn, options): - except IndexError: - fail(EC_STATUS) - except Exception as e: -- logging.error("Failed to get power status: %s", e) -+ logger.error("Failed to get power status: %s", e) - fail(EC_STATUS) - - def get_self_power_status(conn, instance_id): -@@ -86,10 +89,10 @@ def get_self_power_status(conn, instance_id): - instance = conn.instances.filter(Filters=[{"Name": "instance-id", "Values": [instance_id]}]) - state = list(instance)[0].state["Name"] - if state == "running": -- logging.debug("Captured my (%s) state and it %s - returning OK - Proceeding with fencing",instance_id,state.upper()) -+ logger.debug("Captured my (%s) state and it %s - returning OK - Proceeding with fencing",instance_id,state.upper()) - return "ok" - else: -- logging.debug("Captured my (%s) state it is %s - returning Alert - Unable to fence other nodes",instance_id,state.upper()) -+ logger.debug("Captured my (%s) state it is %s - returning Alert - Unable to fence other nodes",instance_id,state.upper()) - return "alert" - - except ClientError: -@@ -100,18 +103,18 @@ def get_self_power_status(conn, instance_id): - return "fail" - - def set_power_status(conn, options): -- my_instance = get_instance_id() -+ my_instance = get_instance_id(options) - try: - if (options["--action"]=="off"): -- if (get_self_power_status(conn,my_instance) == "ok"): -+ if "--skip-race-check" in options or get_self_power_status(conn,my_instance) == "ok": - conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) -- logger.info("Called StopInstance API call for %s", options["--plug"]) -+ logger.debug("Called StopInstance API call for %s", options["--plug"]) - else: -- logger.info("Skipping fencing as instance is not in running status") -+ logger.debug("Skipping fencing as instance is not in running status") - elif (options["--action"]=="on"): - conn.instances.filter(InstanceIds=[options["--plug"]]).start() - except Exception as e: -- logger.error("Failed to power %s %s: %s", \ -+ logger.debug("Failed to power %s %s: %s", \ - options["--action"], options["--plug"], e) - - def define_new_opts(): -@@ -156,12 +159,20 @@ def define_new_opts(): - "default": "False", - "order": 6 - } -+ all_opt["skip_race_check"] = { -+ "getopt" : "", -+ "longopt" : "skip-race-check", -+ "help" : "--skip-race-check Skip race condition check", -+ "shortdesc": "Skip race condition check", -+ "required": "0", -+ "order": 7 -+ } - - # Main agent method - def main(): - conn = None - -- device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug"] -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug", "skip_race_check"] - - atexit.register(atexit_handler) - -@@ -183,12 +194,15 @@ def main(): - - run_delay(options) - -- if options.get("--verbose") is not None: -- lh = logging.FileHandler('/var/log/fence_aws_debug.log') -+ if "--debug-file" in options: -+ for handler in logger.handlers: -+ if isinstance(handler, logging.FileHandler): -+ logger.removeHandler(handler) -+ lh = logging.FileHandler(options["--debug-file"]) - logger.addHandler(lh) - lhf = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') - lh.setFormatter(lhf) -- logger.setLevel(logging.DEBUG) -+ lh.setLevel(logging.DEBUG) - - if options["--boto3_debug"].lower() not in ["1", "yes", "on", "true"]: - boto3.set_stream_logger('boto3',logging.INFO) -diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml -index 76995ecf2..32de4418a 100644 ---- a/tests/data/metadata/fence_aws.xml -+++ b/tests/data/metadata/fence_aws.xml -@@ -46,6 +46,11 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht - - Boto Lib debug - -+ -+ -+ -+ Skip race condition check -+ - - - diff --git a/SOURCES/bz2183158-fence_aws-2-fail-when-power-action-request-fails.patch b/SOURCES/bz2183158-fence_aws-2-fail-when-power-action-request-fails.patch deleted file mode 100644 index 63ebe1a..0000000 --- a/SOURCES/bz2183158-fence_aws-2-fail-when-power-action-request-fails.patch +++ /dev/null @@ -1,21 +0,0 @@ -From a2e2432cfec0af9a8a90f9d7fed18759da6f9b0c Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 13 Apr 2023 10:14:31 +0200 -Subject: [PATCH] fence_aws: fail when power action request fails - ---- - agents/aws/fence_aws.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 5d1677144..0a375bbec 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -116,6 +116,7 @@ def set_power_status(conn, options): - except Exception as e: - logger.debug("Failed to power %s %s: %s", \ - options["--action"], options["--plug"], e) -+ fail(EC_STATUS) - - def define_new_opts(): - all_opt["region"] = { diff --git a/SOURCES/bz2187329-fence_scsi-1-detect-devices-in-shared-vgs.patch b/SOURCES/bz2187329-fence_scsi-1-detect-devices-in-shared-vgs.patch deleted file mode 100644 index b01785c..0000000 --- a/SOURCES/bz2187329-fence_scsi-1-detect-devices-in-shared-vgs.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 4661b6f625c57a728ec58023da89ba378d4d1c27 Mon Sep 17 00:00:00 2001 -From: Arslan Ahmad -Date: Mon, 17 Apr 2023 15:59:49 +0530 -Subject: [PATCH] fence_scsi: Automatically detect devices for shared VGs - -Currently, if no devices option is given, fence_scsi automatically -builds a device list containing all LVM PVs that back VGs with the -clustered ('c') bit set. With this commit, fence_scsi will also consider -VGs with the shared ('s') bit set. - -Additionally, the existing check is too broad. We should consider a -volume group to be clustered or shared only if the 6th bit is set to 'c' -or 's'. This way, we can avoid false positives. - -Closes RHBZ#2187327 -Closes RHBZ#2187329 ---- - agents/scsi/fence_scsi.py | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 85e4f29e6..3de4ba0b2 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -314,7 +314,7 @@ def dev_read(fail=True, opt=None): - return devs - - --def get_clvm_devices(options): -+def get_shared_devices(options): - devs = [] - cmd = options["--vgs-path"] + " " +\ - "--noheadings " +\ -@@ -324,10 +324,11 @@ def get_clvm_devices(options): - "--config 'global { locking_type = 0 } devices { preferred_names = [ \"^/dev/dm\" ] }'" - out = run_cmd(options, cmd) - if out["err"]: -- fail_usage("Failed: Cannot get clvm devices") -- for line in out["out"].split("\n"): -- if 'c' in line.split(":")[0]: -- devs.append(line.split(":")[1]) -+ fail_usage("Failed: Cannot get shared devices") -+ for line in out["out"].splitlines(): -+ vg_attr, pv_name = line.strip().split(":") -+ if vg_attr[5] in "cs": -+ devs.append(pv_name) - return devs - - -@@ -612,7 +613,7 @@ def main(): - options["--key"] = options["--key"].lstrip('0') - - if not ("--devices" in options and options["--devices"].split(",")): -- options["devices"] = get_clvm_devices(options) -+ options["devices"] = get_shared_devices(options) - else: - options["devices"] = options["--devices"].split(",") - diff --git a/SOURCES/bz2187329-fence_scsi-2-support-space-separated-devices.patch b/SOURCES/bz2187329-fence_scsi-2-support-space-separated-devices.patch deleted file mode 100644 index ab33efc..0000000 --- a/SOURCES/bz2187329-fence_scsi-2-support-space-separated-devices.patch +++ /dev/null @@ -1,92 +0,0 @@ -From e363e55169a7be1cbeac5568fe2a32692867d4c6 Mon Sep 17 00:00:00 2001 -From: Arslan Ahmad -Date: Thu, 4 May 2023 12:55:41 +0530 -Subject: [PATCH] fence_scsi: Add support for space-separated devices and - update in meta-data - -Currently the devices associated with fence_scsi should be -comma-separated. With this commit, fence_scsi will also work if the -'devices' are space-separated. - -Additionally, this commit includes meta-data update: -1. For fence_scsi: - - The 'devices' parameter is optional if the cluster is configured with -clvm/lvmlock. - - The 'devices' parameter can be comma or space-separated. - -2. For fence_mpath: - - The 'devices' parameter can be comma or space-separated. ---- - agents/mpath/fence_mpath.py | 2 +- - agents/scsi/fence_scsi.py | 8 ++++---- - tests/data/metadata/fence_mpath.xml | 2 +- - tests/data/metadata/fence_scsi.xml | 2 +- - 4 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index ee81eab3a..6976fee90 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -226,7 +226,7 @@ def define_new_opts(): - "help" : "-d, --devices=[devices] List of devices to use for current operation", - "required" : "0", - "shortdesc" : "List of devices to use for current operation. Devices can \ --be comma-separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). \ -+be comma or space separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). \ - Each device must support SCSI-3 persistent reservations.", - "order": 1 - } -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 3de4ba0b2..42530ceb5 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -350,8 +350,8 @@ def define_new_opts(): - "help" : "-d, --devices=[devices] List of devices to use for current operation", - "required" : "0", - "shortdesc" : "List of devices to use for current operation. Devices can \ --be comma-separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 \ --persistent reservations.", -+be comma or space separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 \ -+persistent reservations. Optional if cluster is configured with clvm or lvmlockd.", - "order": 1 - } - all_opt["nodename"] = { -@@ -612,10 +612,10 @@ def main(): - - options["--key"] = options["--key"].lstrip('0') - -- if not ("--devices" in options and options["--devices"].split(",")): -+ if not ("--devices" in options and [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d]): - options["devices"] = get_shared_devices(options) - else: -- options["devices"] = options["--devices"].split(",") -+ options["devices"] = [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d] - - if not options["devices"]: - fail_usage("Failed: No devices found") -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index e22d3a1f9..262956dca 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -14,7 +14,7 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - - -- List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations. -+ List of devices to use for current operation. Devices can be comma or space separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations. - - - -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index 4fa86189c..facb2f52e 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -19,7 +19,7 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - - -- List of devices to use for current operation. Devices can be comma-separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 persistent reservations. -+ List of devices to use for current operation. Devices can be comma or space separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 persistent reservations. Optional if cluster is configured with clvm or lvmlockd. - - - diff --git a/SOURCES/bz2211460-fence_azure-arm-1-stack-hub-support.patch b/SOURCES/bz2211460-fence_azure-arm-1-stack-hub-support.patch deleted file mode 100644 index 86a7627..0000000 --- a/SOURCES/bz2211460-fence_azure-arm-1-stack-hub-support.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 6e0228536d30ca1bd95bfd1628c0247f094ecaa8 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 2 Mar 2022 13:49:16 +0100 -Subject: [PATCH 1/2] fence_azure_arm: add stack cloud support - ---- - agents/azure_arm/fence_azure_arm.py | 18 ++++++++++++++---- - lib/azure_fence.py.py | 10 ++++++++++ - tests/data/metadata/fence_azure_arm.xml | 10 ++++++++++ - 3 files changed, 34 insertions(+), 4 deletions(-) - -diff --git a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py -index 6908169c8..e3b7c85c7 100755 ---- a/agents/azure_arm/fence_azure_arm.py -+++ b/agents/azure_arm/fence_azure_arm.py -@@ -183,20 +183,30 @@ def define_new_opts(): - "getopt" : ":", - "longopt" : "cloud", - "help" : "--cloud=[name] Name of the cloud you want to use. Supported\n\ -- values are china, germany or usgov. Do not use\n\ -- this parameter if you want to use public\n\ -- Azure.", -+ values are china, germany, usgov, or stack. Do\n\ -+ not use this parameter if you want to use\n\ -+ public Azure.", - "shortdesc" : "Name of the cloud you want to use.", - "required" : "0", - "order" : 7 - } -+ all_opt["metadata-endpoint"] = { -+ "getopt" : ":", -+ "longopt" : "metadata-endpoint", -+ "help" : "--metadata-endpoint=[URL] URL to metadata endpoint (used when cloud=stack).", -+ "shortdesc" : "URL to metadata endpoint (used when cloud=stack).", -+ "required" : "0", -+ "order" : 8 -+ } - - # Main agent method - def main(): - compute_client = None - network_client = None - -- device_opt = ["login", "no_login", "no_password", "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", "metadata-endpoint"] - - atexit.register(atexit_handler) - -diff --git a/lib/azure_fence.py.py b/lib/azure_fence.py.py -index 5ca71eb42..6f1eee5b9 100644 ---- a/lib/azure_fence.py.py -+++ b/lib/azure_fence.py.py -@@ -251,6 +251,7 @@ def get_azure_config(options): - config.VMName = options.get("--plug") - config.SubscriptionId = options.get("--subscriptionId") - config.Cloud = options.get("--cloud") -+ config.MetadataEndpoint = options.get("--metadata-endpoint") - config.UseMSI = "--msi" in options - config.Tenantid = options.get("--tenantId") - config.ApplicationId = options.get("--username") -@@ -279,6 +280,9 @@ def get_azure_cloud_environment(config): - elif (config.Cloud.lower() == "usgov"): - from msrestazure.azure_cloud import AZURE_US_GOV_CLOUD - cloud_environment = AZURE_US_GOV_CLOUD -+ elif (config.Cloud.lower() == "stack"): -+ from msrestazure.azure_cloud import get_cloud_from_metadata_endpoint -+ cloud_environment = get_cloud_from_metadata_endpoint(config.MetadataEndpoint) - - return cloud_environment - -@@ -345,6 +349,9 @@ def get_azure_compute_client(config): - credentials = get_azure_credentials(config) - - if cloud_environment: -+ if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: -+ fail_usage("metadata-endpoint not specified") -+ - compute_client = ComputeManagementClient( - credentials, - config.SubscriptionId, -@@ -372,6 +379,9 @@ def get_azure_network_client(config): - credentials = get_azure_credentials(config) - - if cloud_environment: -+ if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: -+ fail_usage("metadata-endpoint not specified") -+ - network_client = NetworkManagementClient( - credentials, - config.SubscriptionId, -diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml -index c6e1f203b..8b7450762 100644 ---- a/tests/data/metadata/fence_azure_arm.xml -+++ b/tests/data/metadata/fence_azure_arm.xml -@@ -98,6 +98,16 @@ When using network fencing the reboot-action will cause a quick-return once the - - Name of the cloud you want to use. - -+ -+ -+ -+ URL to metadata endpoint (used when cloud=stack). -+ -+ -+ -+ -+ URL to metadata endpoint (used when cloud=stack). -+ - - - diff --git a/SOURCES/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch b/SOURCES/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch deleted file mode 100644 index d2c6956..0000000 --- a/SOURCES/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/lib/azure_fence.py.py 2023-07-03 11:40:44.083882319 +0200 -+++ b/lib/azure_fence.py.py 2023-07-03 11:40:38.178784811 +0200 -@@ -317,12 +317,11 @@ - from azure.mgmt.compute import ComputeManagementClient - - cloud_environment = get_azure_cloud_environment(config) -+ if cloud_environment and config.Cloud.lower() == "stack" and not config.MetadataEndpoint: -+ fail_usage("metadata-endpoint not specified") - credentials = get_azure_credentials(config) - - if cloud_environment: -- if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: -- fail_usage("metadata-endpoint not specified") -- - compute_client = ComputeManagementClient( - credentials, - config.SubscriptionId, -@@ -339,12 +338,11 @@ - from azure.mgmt.network import NetworkManagementClient - - cloud_environment = get_azure_cloud_environment(config) -+ if cloud_environment and config.Cloud.lower() == "stack" and not config.MetadataEndpoint: -+ fail_usage("metadata-endpoint not specified") - credentials = get_azure_credentials(config) - - if cloud_environment: -- if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: -- fail_usage("metadata-endpoint not specified") -- - network_client = NetworkManagementClient( - credentials, - config.SubscriptionId, diff --git a/SOURCES/bz2218234-1-kubevirt-fix-bundled-dateutil-CVE-2007-4559.patch b/SOURCES/bz2218234-1-kubevirt-fix-bundled-dateutil-CVE-2007-4559.patch deleted file mode 100644 index 97707a5..0000000 --- a/SOURCES/bz2218234-1-kubevirt-fix-bundled-dateutil-CVE-2007-4559.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/kubevirt/dateutil/zoneinfo/rebuild.py 2023-01-26 16:29:30.000000000 +0100 -+++ b/kubevirt/dateutil/zoneinfo/rebuild.py 2023-07-19 10:12:42.277559948 +0200 -@@ -21,7 +21,12 @@ - try: - with TarFile.open(filename) as tf: - for name in zonegroups: -- tf.extract(name, tmpdir) -+ if hasattr(tarfile, 'data_filter'): -+ # Python with CVE-2007-4559 mitigation (PEP 706) -+ tf.extract(name, tmpdir, filter='data') -+ else: -+ # Fallback to a possibly dangerous extraction (before PEP 706) -+ tf.extract(name, tmpdir) - filepaths = [os.path.join(tmpdir, n) for n in zonegroups] - - _run_zic(zonedir, filepaths) - diff --git a/SOURCES/bz2218234-2-aws-fix-bundled-dateutil-CVE-2007-4559.patch b/SOURCES/bz2218234-2-aws-fix-bundled-dateutil-CVE-2007-4559.patch deleted file mode 100644 index 07a1f11..0000000 --- a/SOURCES/bz2218234-2-aws-fix-bundled-dateutil-CVE-2007-4559.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/aws/dateutil/zoneinfo/rebuild.py 2023-01-26 16:29:30.000000000 +0100 -+++ b/aws/dateutil/zoneinfo/rebuild.py 2023-07-19 10:12:42.277559948 +0200 -@@ -21,7 +21,12 @@ - try: - with TarFile.open(filename) as tf: - for name in zonegroups: -- tf.extract(name, tmpdir) -+ if hasattr(tarfile, 'data_filter'): -+ # Python with CVE-2007-4559 mitigation (PEP 706) -+ tf.extract(name, tmpdir, filter='data') -+ else: -+ # Fallback to a possibly dangerous extraction (before PEP 706) -+ tf.extract(name, tmpdir) - filepaths = [os.path.join(tmpdir, n) for n in zonegroups] - - _run_zic(zonedir, filepaths) diff --git a/SOURCES/fence_aliyun-1.patch b/SOURCES/fence_aliyun-1.patch deleted file mode 100644 index c5f656b..0000000 --- a/SOURCES/fence_aliyun-1.patch +++ /dev/null @@ -1,344 +0,0 @@ -From 418df5845d1781e18e300cf17b2de714e4ff09d1 Mon Sep 17 00:00:00 2001 -From: "feng.changf1" -Date: Tue, 24 Jul 2018 15:56:50 +0800 -Subject: [PATCH 1/3] Add Aliyun fence agent. - ---- - agents/aliyun/fence_aliyun.py | 146 ++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 146 insertions(+) - create mode 100644 agents/aliyun/fence_aliyun.py - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -new file mode 100644 -index 00000000..ec7d2316 ---- /dev/null -+++ b/agents/aliyun/fence_aliyun.py -@@ -0,0 +1,146 @@ -+#!/usr/bin/python -tt -+ -+import sys, re -+import logging -+import atexit -+import json -+sys.path.append("@FENCEAGENTSLIBDIR@") -+from fencing import * -+from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay -+ -+from aliyunsdkcore import client -+ -+from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest -+from aliyunsdkecs.request.v20140526.StartInstanceRequest import StartInstanceRequest -+from aliyunsdkecs.request.v20140526.StopInstanceRequest import StopInstanceRequest -+from aliyunsdkecs.request.v20140526.RebootInstanceRequest import RebootInstanceRequest -+ -+def _send_request(conn, request): -+ request.set_accept_format('json') -+ try: -+ response_str = conn.do_action_with_exception(request) -+ response_detail = json.loads(response_str) -+ return response_detail -+ except Exception as e: -+ fail_usage("Failed: _send_request failed") -+ -+def start_instance(conn, instance_id): -+ request = StartInstanceRequest() -+ request.set_InstanceId(instance_id) -+ _send_request(conn, request) -+ -+def stop_instance(conn, instance_id): -+ request = StopInstanceRequest() -+ request.set_InstanceId(instance_id) -+ request.set_ForceStop('true') -+ _send_request(conn, request) -+ -+def reboot_instance(conn, instance_id): -+ request = RebootInstanceRequest() -+ request.set_InstanceId(instance_id) -+ request.set_ForceStop('true') -+ _send_request(conn, request) -+ -+def get_status(conn, instance_id): -+ request = DescribeInstancesRequest() -+ request.set_InstanceIds(json.dumps([instance_id])) -+ response = _send_request(conn, request) -+ instance_status = None -+ if response is not None: -+ instance_list = response.get('Instances').get('Instance') -+ for item in instance_list: -+ instance_status = item.get('Status') -+ return instance_status -+ -+def get_nodes_list(conn, options): -+ result = {} -+ request = DescribeInstancesRequest() -+ response = _send_request(conn, request) -+ instance_status = None -+ if response is not None: -+ instance_list = response.get('Instances').get('Instance') -+ for item in instance_list: -+ instance_id = item.get('InstanceId') -+ result[instance_id] = ("", None) -+ return result -+ -+def get_power_status(conn, options): -+ state = get_status(conn, options["--plug"]) -+ if state == "Running": -+ return "on" -+ elif state == "Stopped": -+ return "off" -+ else: -+ return "unknown" -+ -+ -+def set_power_status(conn, options): -+ if (options["--action"]=="off"): -+ stop_instance(conn, options["--plug"]) -+ elif (options["--action"]=="on"): -+ start_instance(conn, options["--plug"]) -+ elif (options["--action"]=="reboot"): -+ reboot_instance(conn, options["--plug"]) -+ -+ -+def define_new_opts(): -+ all_opt["region"] = { -+ "getopt" : "r:", -+ "longopt" : "region", -+ "help" : "-r, --region=[name] Region, e.g. cn-hangzhou", -+ "shortdesc" : "Region.", -+ "required" : "0", -+ "order" : 2 -+ } -+ all_opt["access_key"] = { -+ "getopt" : "a:", -+ "longopt" : "access-key", -+ "help" : "-a, --access-key=[name] Access Key", -+ "shortdesc" : "Access Key.", -+ "required" : "0", -+ "order" : 3 -+ } -+ all_opt["secret_key"] = { -+ "getopt" : "s:", -+ "longopt" : "secret-key", -+ "help" : "-s, --secret-key=[name] Secret Key", -+ "shortdesc" : "Secret Key.", -+ "required" : "0", -+ "order" : 4 -+ } -+ -+# Main agent method -+def main(): -+ conn = None -+ -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key"] -+ -+ atexit.register(atexit_handler) -+ -+ define_new_opts() -+ -+ all_opt["power_timeout"]["default"] = "60" -+ -+ options = check_input(device_opt, process_input(device_opt)) -+ -+ docs = {} -+ docs["shortdesc"] = "Fence agent for Aliyun (Aliyun Web Services)" -+ docs["longdesc"] = "fence_aliyun is an I/O Fencing agent for Aliyun" -+ docs["vendorurl"] = "http://www.aliyun.com" -+ show_docs(options, docs) -+ -+ run_delay(options) -+ -+ if "--region" in options and "--access-key" in options and "--secret-key" in options: -+ region = options["--region"] -+ access_key = options["--access-key"] -+ secret_key = options["--secret-key"] -+ conn = client.AcsClient(access_key, secret_key, region) -+ -+ -+ # Operate the fencing device -+ result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) -+ sys.exit(result) -+ -+if __name__ == "__main__": -+ main() - -From 28b55555abda9b6c278a7f082bb22c4f6f1e2474 Mon Sep 17 00:00:00 2001 -From: "feng.changf1" -Date: Tue, 24 Jul 2018 17:18:53 +0800 -Subject: [PATCH 2/3] Add Aliyun fence agent. - ---- - tests/data/metadata/fence_aliyun.xml | 113 +++++++++++++++++++++++++++++++++++ - 1 file changed, 113 insertions(+) - create mode 100644 tests/data/metadata/fence_aliyun.xml - -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -new file mode 100644 -index 00000000..1db692ee ---- /dev/null -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -0,0 +1,113 @@ -+ -+ -+fence_aliyun is an I/O Fencing agent for Aliyun -+http://www.aliyun.com -+ -+ -+ -+ -+ Fencing action -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Region. -+ -+ -+ -+ -+ Access Key. -+ -+ -+ -+ -+ Secret Key. -+ -+ -+ -+ -+ Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog. -+ -+ -+ -+ -+ Verbose mode -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Display version information and exit -+ -+ -+ -+ -+ Display help and exit -+ -+ -+ -+ -+ Separator for CSV created by 'list' operation -+ -+ -+ -+ -+ Wait X seconds before fencing is started -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after login -+ -+ -+ -+ -+ Test X seconds for status change after ON/OFF -+ -+ -+ -+ -+ Wait X seconds after issuing ON/OFF -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after issuing command -+ -+ -+ -+ -+ Count of attempts to retry power on -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -From 53bbd91e91c231c89ae8981238bb15d85d02207b Mon Sep 17 00:00:00 2001 -From: "feng.changf1" -Date: Tue, 24 Jul 2018 17:26:45 +0800 -Subject: [PATCH 3/3] Fix CI error. - ---- - agents/aliyun/fence_aliyun.py | 32 +++++++++++++++++--------------- - 1 file changed, 17 insertions(+), 15 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index ec7d2316..0f24b83e 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -1,20 +1,22 @@ - #!/usr/bin/python -tt - --import sys, re --import logging --import atexit --import json --sys.path.append("@FENCEAGENTSLIBDIR@") --from fencing import * --from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay -- --from aliyunsdkcore import client -- --from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest --from aliyunsdkecs.request.v20140526.StartInstanceRequest import StartInstanceRequest --from aliyunsdkecs.request.v20140526.StopInstanceRequest import StopInstanceRequest --from aliyunsdkecs.request.v20140526.RebootInstanceRequest import RebootInstanceRequest -- -+try: -+ import sys, re -+ import logging -+ import atexit -+ import json -+ sys.path.append("@FENCEAGENTSLIBDIR@") -+ from fencing import * -+ from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay -+ -+ from aliyunsdkcore import client -+ -+ from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest -+ from aliyunsdkecs.request.v20140526.StartInstanceRequest import StartInstanceRequest -+ from aliyunsdkecs.request.v20140526.StopInstanceRequest import StopInstanceRequest -+ from aliyunsdkecs.request.v20140526.RebootInstanceRequest import RebootInstanceRequest -+except ImportError: -+ pass - def _send_request(conn, request): - request.set_accept_format('json') - try: diff --git a/SOURCES/fence_aliyun-2.patch b/SOURCES/fence_aliyun-2.patch deleted file mode 100644 index eb4c735..0000000 --- a/SOURCES/fence_aliyun-2.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8db45537fb470624a754ea1243cc4f349a9b413d Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 24 Jul 2018 13:10:41 +0200 -Subject: [PATCH] fence_aliyun: fix CI and add Python detection - ---- - agents/aliyun/fence_aliyun.py | 19 ++++++++++--------- - tests/data/metadata/fence_aliyun.xml | 1 + - 2 files changed, 11 insertions(+), 9 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index 0f24b83e..aa6c0acf 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -1,14 +1,14 @@ --#!/usr/bin/python -tt -+#!@PYTHON@ -tt - --try: -- import sys, re -- import logging -- import atexit -- import json -- sys.path.append("@FENCEAGENTSLIBDIR@") -- from fencing import * -- from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay -+import sys, re -+import logging -+import atexit -+import json -+sys.path.append("@FENCEAGENTSLIBDIR@") -+from fencing import * -+from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay - -+try: - from aliyunsdkcore import client - - from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest -@@ -17,6 +17,7 @@ - from aliyunsdkecs.request.v20140526.RebootInstanceRequest import RebootInstanceRequest - except ImportError: - pass -+ - def _send_request(conn, request): - request.set_accept_format('json') - try: -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -index 1db692ee..b41d82bf 100644 ---- a/tests/data/metadata/fence_aliyun.xml -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -108,6 +108,7 @@ - - - -+ - - - diff --git a/SOURCES/fence_aliyun-3-logging.patch b/SOURCES/fence_aliyun-3-logging.patch deleted file mode 100644 index 52c2dca..0000000 --- a/SOURCES/fence_aliyun-3-logging.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 790cbaa66f3927a84739af4a1f0e8bba295cdc36 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 30 Jul 2018 10:43:04 +0200 -Subject: [PATCH] fence_aliyun: add logging - ---- - agents/aliyun/fence_aliyun.py | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index aa6c0acf..2cda6b7f 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -23,9 +23,10 @@ def _send_request(conn, request): - try: - response_str = conn.do_action_with_exception(request) - response_detail = json.loads(response_str) -+ logging.debug("_send_request reponse: %s" % response_detail) - return response_detail - except Exception as e: -- fail_usage("Failed: _send_request failed") -+ fail_usage("Failed: _send_request failed: %s" % e) - - def start_instance(conn, instance_id): - request = StartInstanceRequest() -@@ -69,15 +70,22 @@ def get_nodes_list(conn, options): - - def get_power_status(conn, options): - state = get_status(conn, options["--plug"]) -+ - if state == "Running": -- return "on" -+ status = "on" - elif state == "Stopped": -- return "off" -+ status = "off" - else: -- return "unknown" -+ status = "unknown" -+ -+ logging.info("get_power_status: %s" % status) -+ -+ return status - - - def set_power_status(conn, options): -+ logging.info("set_power_status: %s" % options["--action"]) -+ - if (options["--action"]=="off"): - stop_instance(conn, options["--plug"]) - elif (options["--action"]=="on"): diff --git a/SOURCES/fence_aliyun-4-bundled.patch b/SOURCES/fence_aliyun-4-bundled.patch deleted file mode 100644 index 99a0b50..0000000 --- a/SOURCES/fence_aliyun-4-bundled.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uNr a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py ---- a/agents/aliyun/fence_aliyun.py 2018-07-24 14:30:29.030311806 +0200 -+++ b/agents/aliyun/fence_aliyun.py 2018-07-24 14:31:10.023884949 +0200 -@@ -9,6 +9,7 @@ - from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay - - try: -+ sys.path.insert(0, '/usr/lib/fence-agents/bundled/aliyun') - from aliyunsdkcore import client - - from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest diff --git a/SOURCES/fence_aliyun-5-list-instance-names.patch b/SOURCES/fence_aliyun-5-list-instance-names.patch deleted file mode 100644 index 40bebac..0000000 --- a/SOURCES/fence_aliyun-5-list-instance-names.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c21d60fbcf0b11dcbf4f70006c8ffaeac4ca7dbd Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 28 Aug 2018 15:20:10 +0200 -Subject: [PATCH] fence_aliyun: list instance names and show up to 100 - instances - ---- - agents/aliyun/fence_aliyun.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index 2cda6b7f..b3aca12f 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -59,13 +59,15 @@ def get_status(conn, instance_id): - def get_nodes_list(conn, options): - result = {} - request = DescribeInstancesRequest() -+ request.set_PageSize(100) - response = _send_request(conn, request) - instance_status = None - if response is not None: - instance_list = response.get('Instances').get('Instance') - for item in instance_list: - instance_id = item.get('InstanceId') -- result[instance_id] = ("", None) -+ instance_name = item.get('InstanceName') -+ result[instance_id] = (instance_name, None) - return result - - def get_power_status(conn, options): diff --git a/SOURCES/fence_aliyun-6-correct-help-indentation.patch b/SOURCES/fence_aliyun-6-correct-help-indentation.patch deleted file mode 100644 index 39b1551..0000000 --- a/SOURCES/fence_aliyun-6-correct-help-indentation.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 588f935b1f79c8355d461fe9f8597151fbcd7fa2 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 30 Aug 2018 09:11:58 +0200 -Subject: [PATCH] fence_aliyun: correct indentation for *key in help - ---- - agents/aliyun/fence_aliyun.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index 2cda6b7f..7d04c5bb 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -106,7 +106,7 @@ def define_new_opts(): - all_opt["access_key"] = { - "getopt" : "a:", - "longopt" : "access-key", -- "help" : "-a, --access-key=[name] Access Key", -+ "help" : "-a, --access-key=[name] Access Key", - "shortdesc" : "Access Key.", - "required" : "0", - "order" : 3 -@@ -114,7 +114,7 @@ def define_new_opts(): - all_opt["secret_key"] = { - "getopt" : "s:", - "longopt" : "secret-key", -- "help" : "-s, --secret-key=[name] Secret Key", -+ "help" : "-s, --secret-key=[name] Secret Key", - "shortdesc" : "Secret Key.", - "required" : "0", - "order" : 4 diff --git a/SOURCES/fence_cisco_ucs-encode-POSTFIELDS.patch b/SOURCES/fence_cisco_ucs-encode-POSTFIELDS.patch deleted file mode 100644 index 6515deb..0000000 --- a/SOURCES/fence_cisco_ucs-encode-POSTFIELDS.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 70bd4ffa245ef7e8b7698228bab3b41c240d50d2 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 4 Sep 2018 12:35:07 +0200 -Subject: [PATCH] fence_cisco_ucs: encode POSTFIELDS - ---- - agents/cisco_ucs/fence_cisco_ucs.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/cisco_ucs/fence_cisco_ucs.py b/agents/cisco_ucs/fence_cisco_ucs.py -index d509b3e0..ec311754 100644 ---- a/agents/cisco_ucs/fence_cisco_ucs.py -+++ b/agents/cisco_ucs/fence_cisco_ucs.py -@@ -111,7 +111,7 @@ def send_command(opt, command, timeout): - web_buffer = io.BytesIO() - conn.setopt(pycurl.URL, url.encode("ascii")) - conn.setopt(pycurl.HTTPHEADER, ["Content-type: text/xml"]) -- conn.setopt(pycurl.POSTFIELDS, command) -+ conn.setopt(pycurl.POSTFIELDS, command.encode("ascii")) - conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write) - conn.setopt(pycurl.TIMEOUT, timeout) - if "--ssl" in opt or "--ssl-secure" in opt: diff --git a/SOURCES/fence_compute-fence_evacuate-fix-compute-domain.patch b/SOURCES/fence_compute-fence_evacuate-fix-compute-domain.patch deleted file mode 100644 index 3ae0ae8..0000000 --- a/SOURCES/fence_compute-fence_evacuate-fix-compute-domain.patch +++ /dev/null @@ -1,232 +0,0 @@ -From 15635df9d12ce693f473d5ebcd5b7cacb81e2295 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 16 Jul 2018 11:14:16 +0200 -Subject: [PATCH] fence_compute/fence_evacuate: workaround for compute-domain - regression - ---- - agents/compute/fence_compute.py | 24 +++++++++++++++++++----- - agents/evacuate/fence_evacuate.py | 24 +++++++++++++++++++----- - tests/data/metadata/fence_compute.xml | 24 ++++++++++++++++++++++-- - tests/data/metadata/fence_evacuate.xml | 24 ++++++++++++++++++++++-- - 4 files changed, 82 insertions(+), 14 deletions(-) - -diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py -index ec2d093c..aac9b296 100644 ---- a/agents/compute/fence_compute.py -+++ b/agents/compute/fence_compute.py -@@ -353,7 +353,7 @@ def define_new_opts(): - "default" : "", - "order": 1, - } -- all_opt["user_domain"] = { -+ all_opt["user-domain"] = { - "getopt" : "u:", - "longopt" : "user-domain", - "help" : "-u, --user-domain=[name] Keystone v3 User Domain", -@@ -362,7 +362,7 @@ def define_new_opts(): - "default" : "Default", - "order": 2, - } -- all_opt["project_domain"] = { -+ all_opt["project-domain"] = { - "getopt" : "P:", - "longopt" : "project-domain", - "help" : "-d, --project-domain=[name] Keystone v3 Project Domain", -@@ -433,6 +433,14 @@ def define_new_opts(): - "default" : "False", - "order": 5, - } -+ all_opt["compute-domain"] = { -+ "getopt" : ":", -+ "longopt" : "compute-domain", -+ "help" : "--compute-domain=[string] Replaced by --domain", -+ "required" : "0", -+ "shortdesc" : "Replaced by domain", -+ "order": 6, -+ } - - def set_multi_power_fn(connection, options, set_power_fn, get_power_fn, retry_attempts=1): - for _ in range(retry_attempts): -@@ -450,9 +458,10 @@ def main(): - global override_status - atexit.register(atexit_handler) - -- device_opt = ["login", "passwd", "tenant_name", "auth_url", "fabric_fencing", -- "no_login", "no_password", "port", "domain", "project_domain", "user_domain", -- "no_shared_storage", "endpoint_type", "record_only", "instance_filtering", "insecure", "region_name"] -+ device_opt = ["login", "passwd", "tenant_name", "auth_url", "fabric_fencing", "no_login", -+ "no_password", "port", "domain", "compute-domain", "project-domain", -+ "user-domain", "no_shared_storage", "endpoint_type", "record_only", -+ "instance_filtering", "insecure", "region_name"] - define_new_opts() - all_opt["shell_timeout"]["default"] = "180" - -@@ -470,6 +479,11 @@ def main(): - - run_delay(options) - -+ # workaround to avoid regressions -+ if "--compute-domain" in options and options["--compute-domain"]: -+ options["--domain"] = options["--compute-domain"] -+ del options["--domain"] -+ - logging.debug("Running "+options["--action"]) - connection = create_nova_connection(options) - -diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py -index 615dede7..529a60dd 100644 ---- a/agents/evacuate/fence_evacuate.py -+++ b/agents/evacuate/fence_evacuate.py -@@ -287,7 +287,7 @@ def define_new_opts(): - "default" : "", - "order": 1, - } -- all_opt["user_domain"] = { -+ all_opt["user-domain"] = { - "getopt" : "u:", - "longopt" : "user-domain", - "help" : "-u, --user-domain=[name] Keystone v3 User Domain", -@@ -296,7 +296,7 @@ def define_new_opts(): - "default" : "Default", - "order": 2, - } -- all_opt["project_domain"] = { -+ all_opt["project-domain"] = { - "getopt" : "P:", - "longopt" : "project-domain", - "help" : "-d, --project-domain=[name] Keystone v3 Project Domain", -@@ -358,14 +358,22 @@ def define_new_opts(): - "default" : "False", - "order": 5, - } -+ all_opt["compute-domain"] = { -+ "getopt" : ":", -+ "longopt" : "compute-domain", -+ "help" : "--compute-domain=[string] Replaced by --domain", -+ "required" : "0", -+ "shortdesc" : "Replaced by domain", -+ "order": 6, -+ } - - def main(): - atexit.register(atexit_handler) - - device_opt = ["login", "passwd", "tenant_name", "auth_url", -- "no_login", "no_password", "port", "domain", "project_domain", -- "user_domain", "no_shared_storage", "endpoint_type", -- "instance_filtering", "insecure", "region_name"] -+ "no_login", "no_password", "port", "domain", "compute-domain", -+ "project-domain", "user-domain", "no_shared_storage", -+ "endpoint_type", "instance_filtering", "insecure", "region_name"] - define_new_opts() - all_opt["shell_timeout"]["default"] = "180" - -@@ -380,6 +388,12 @@ def main(): - - run_delay(options) - -+ # workaround to avoid regressions -+ if "--compute-domain" in options and options["--compute-domain"]: -+ options["--domain"] = options["--compute-domain"] -+ del options["--domain"] -+ -+ - connection = create_nova_connection(options) - - # Un-evacuating a server doesn't make sense -diff --git a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml -index e1dac97c..1dcbfc54 100644 ---- a/tests/data/metadata/fence_compute.xml -+++ b/tests/data/metadata/fence_compute.xml -@@ -73,12 +73,22 @@ - - Allow Insecure TLS Requests - -- -+ - - - Keystone v3 Project Domain - -- -+ -+ -+ -+ Keystone v3 Project Domain -+ -+ -+ -+ -+ Keystone v3 User Domain -+ -+ - - - Keystone v3 User Domain -@@ -103,6 +113,16 @@ - - Only record the target as needing evacuation - -+ -+ -+ -+ Replaced by domain -+ -+ -+ -+ -+ Replaced by domain -+ - - - -diff --git a/tests/data/metadata/fence_evacuate.xml b/tests/data/metadata/fence_evacuate.xml -index 6f8bd0a4..4f1f6a58 100644 ---- a/tests/data/metadata/fence_evacuate.xml -+++ b/tests/data/metadata/fence_evacuate.xml -@@ -73,12 +73,22 @@ - - Allow Insecure TLS Requests - -- -+ - - - Keystone v3 Project Domain - -- -+ -+ -+ -+ Keystone v3 Project Domain -+ -+ -+ -+ -+ Keystone v3 User Domain -+ -+ - - - Keystone v3 User Domain -@@ -98,6 +108,16 @@ - - Disable functionality for dealing with shared storage - -+ -+ -+ -+ Replaced by domain -+ -+ -+ -+ -+ Replaced by domain -+ - - - --- -2.17.1 - diff --git a/SOURCES/fence_evacuate-fix-evacuable-tag-mix-issue.patch b/SOURCES/fence_evacuate-fix-evacuable-tag-mix-issue.patch deleted file mode 100644 index a83ff74..0000000 --- a/SOURCES/fence_evacuate-fix-evacuable-tag-mix-issue.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -uNr a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py ---- a/agents/evacuate/fence_evacuate.py 2018-06-28 14:24:54.000000000 +0200 -+++ b/agents/evacuate/fence_evacuate.py 2018-07-11 09:08:56.975072003 +0200 -@@ -74,12 +74,15 @@ - } - - def _is_server_evacuable(server, evac_flavors, evac_images): -+ reason = "flavor "+server.flavor.get('id') - if server.flavor.get('id') in evac_flavors: - return True - if hasattr(server.image, 'get'): - if server.image.get('id') in evac_images: - return True -- logging.debug("Instance %s is not evacuable" % server.image.get('id')) -+ reason = reason +" and image "+server.image.get('id') -+ -+ logging.debug("Instance is not evacuable: no match for %s" % reason) - return False - - def _get_evacuable_flavors(connection): diff --git a/SOURCES/fence_gce-1-stackdriver-logging-default-method-cycle.patch b/SOURCES/fence_gce-1-stackdriver-logging-default-method-cycle.patch deleted file mode 100644 index bafa753..0000000 --- a/SOURCES/fence_gce-1-stackdriver-logging-default-method-cycle.patch +++ /dev/null @@ -1,674 +0,0 @@ -From 59ae9d00060da5329d7ca538974498292bbe1d91 Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Tue, 26 Jun 2018 10:18:29 -0300 -Subject: [PATCH 1/7] fence_gce: add support for stackdriver logging - -Add --logging option to enable sending logs to google stackdriver ---- - agents/gce/fence_gce.py | 65 +++++++++++++++++++++++++++++++++++++-- - tests/data/metadata/fence_gce.xml | 5 +++ - 2 files changed, 67 insertions(+), 3 deletions(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 3abb5207..3af5bfc8 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -1,12 +1,19 @@ - #!@PYTHON@ -tt - - import atexit -+import logging -+import platform - import sys -+import time - sys.path.append("@FENCEAGENTSLIBDIR@") - - import googleapiclient.discovery - from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action - -+ -+LOGGER = logging -+ -+ - def translate_status(instance_status): - "Returns on | off | unknown." - if instance_status == "RUNNING": -@@ -27,6 +34,7 @@ def get_nodes_list(conn, options): - - return result - -+ - def get_power_status(conn, options): - try: - instance = conn.instances().get( -@@ -38,18 +46,37 @@ def get_power_status(conn, options): - fail_usage("Failed: get_power_status: {}".format(str(err))) - - -+def wait_for_operation(conn, project, zone, operation): -+ while True: -+ result = conn.zoneOperations().get( -+ project=project, -+ zone=zone, -+ operation=operation['name']).execute() -+ if result['status'] == 'DONE': -+ if 'error' in result: -+ raise Exception(result['error']) -+ return -+ time.sleep(1) -+ -+ - def set_power_status(conn, options): - try: - if options["--action"] == "off": -- conn.instances().stop( -+ LOGGER.info("Issuing poweroff of %s in zone %s" % (options["--plug"], options["--zone"])) -+ operation = conn.instances().stop( - project=options["--project"], - zone=options["--zone"], - instance=options["--plug"]).execute() -+ wait_for_operation(conn, options["--project"], options["--zone"], operation) -+ LOGGER.info("Poweroff of %s in zone %s complete" % (options["--plug"], options["--zone"])) - elif options["--action"] == "on": -- conn.instances().start( -+ LOGGER.info("Issuing poweron of %s in zone %s" % (options["--plug"], options["--zone"])) -+ operation = conn.instances().start( - project=options["--project"], - zone=options["--zone"], - instance=options["--plug"]).execute() -+ wait_for_operation(conn, options["--project"], options["--zone"], operation) -+ LOGGER.info("Poweron of %s in zone %s complete" % (options["--plug"], options["--zone"])) - except Exception as err: - fail_usage("Failed: set_power_status: {}".format(str(err))) - -@@ -71,11 +98,24 @@ def define_new_opts(): - "required" : "1", - "order" : 3 - } -+ all_opt["logging"] = { -+ "getopt" : ":", -+ "longopt" : "logging", -+ "help" : "--logging=[bool] Logging, true/false", -+ "shortdesc" : "Stackdriver-logging support.", -+ "longdesc" : "If enabled (set to true), IP failover logs will be posted to stackdriver logging.", -+ "required" : "0", -+ "default" : "false", -+ "order" : 4 -+ } - - def main(): - conn = None -+ global LOGGER -+ -+ hostname = platform.node() - -- device_opt = ["port", "no_password", "zone", "project"] -+ device_opt = ["port", "no_password", "zone", "project", "logging"] - - atexit.register(atexit_handler) - -@@ -97,6 +137,25 @@ def main(): - - run_delay(options) - -+ # Prepare logging -+ logging_env = options.get('--logging') -+ if logging_env: -+ logging_env = logging_env.lower() -+ if any(x in logging_env for x in ['yes', 'true', 'enabled']): -+ try: -+ import google.cloud.logging.handlers -+ client = google.cloud.logging.Client() -+ handler = google.cloud.logging.handlers.CloudLoggingHandler(client, name=hostname) -+ formatter = logging.Formatter('gcp:stonish "%(message)s"') -+ LOGGER = logging.getLogger(hostname) -+ handler.setFormatter(formatter) -+ LOGGER.addHandler(handler) -+ LOGGER.setLevel(logging.INFO) -+ except ImportError: -+ LOGGER.error('Couldn\'t import google.cloud.logging, ' -+ 'disabling Stackdriver-logging support') -+ -+ # Prepare cli - try: - credentials = None - if tuple(googleapiclient.__version__) < tuple("1.6.0"): -diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml -index 2a147f21..805ecc6b 100644 ---- a/tests/data/metadata/fence_gce.xml -+++ b/tests/data/metadata/fence_gce.xml -@@ -30,6 +30,11 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui - - Project ID. - -+ -+ -+ -+ Stackdriver-logging support. -+ - - - - -From bb34acd8b0b150599c393d56dd81a7d8185b27d3 Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Tue, 26 Jun 2018 10:44:41 -0300 -Subject: [PATCH 2/7] fence_gce: set project and zone as not required - -Try to retrieve the GCE project if the script is being executed inside a -GCE machine if --project is not provided. -Try to retrieve the zone automatically from GCE if --zone is not -provided. ---- - agents/gce/fence_gce.py | 63 +++++++++++++++++++++++++++++++++++++-- - tests/data/metadata/fence_gce.xml | 4 +-- - 2 files changed, 63 insertions(+), 4 deletions(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 3af5bfc8..e53dc5a6 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -12,6 +12,8 @@ - - - LOGGER = logging -+METADATA_SERVER = 'http://metadata.google.internal/computeMetadata/v1/' -+METADATA_HEADERS = {'Metadata-Flavor': 'Google'} - - - def translate_status(instance_status): -@@ -81,13 +83,56 @@ def set_power_status(conn, options): - fail_usage("Failed: set_power_status: {}".format(str(err))) - - -+def get_instance(conn, project, zone, instance): -+ request = conn.instances().get( -+ project=project, zone=zone, instance=instance) -+ return request.execute() -+ -+ -+def get_zone(conn, project, instance): -+ request = conn.instances().aggregatedList(project=project) -+ while request is not None: -+ response = request.execute() -+ zones = response.get('items', {}) -+ for zone in zones.values(): -+ for inst in zone.get('instances', []): -+ if inst['name'] == instance: -+ return inst['zone'].split("/")[-1] -+ request = conn.instances().aggregatedList_next( -+ previous_request=request, previous_response=response) -+ raise Exception("Unable to find instance %s" % (instance)) -+ -+ -+def get_metadata(metadata_key, params=None, timeout=None): -+ """Performs a GET request with the metadata headers. -+ -+ Args: -+ metadata_key: string, the metadata to perform a GET request on. -+ params: dictionary, the query parameters in the GET request. -+ timeout: int, timeout in seconds for metadata requests. -+ -+ Returns: -+ HTTP response from the GET request. -+ -+ Raises: -+ urlerror.HTTPError: raises when the GET request fails. -+ """ -+ timeout = timeout or 60 -+ metadata_url = os.path.join(METADATA_SERVER, metadata_key) -+ params = urlparse.urlencode(params or {}) -+ url = '%s?%s' % (metadata_url, params) -+ request = urlrequest.Request(url, headers=METADATA_HEADERS) -+ request_opener = urlrequest.build_opener(urlrequest.ProxyHandler({})) -+ return request_opener.open(request, timeout=timeout * 1.1).read() -+ -+ - def define_new_opts(): - all_opt["zone"] = { - "getopt" : ":", - "longopt" : "zone", - "help" : "--zone=[name] Zone, e.g. us-central1-b", - "shortdesc" : "Zone.", -- "required" : "1", -+ "required" : "0", - "order" : 2 - } - all_opt["project"] = { -@@ -95,7 +140,7 @@ def define_new_opts(): - "longopt" : "project", - "help" : "--project=[name] Project ID", - "shortdesc" : "Project ID.", -- "required" : "1", -+ "required" : "0", - "order" : 3 - } - all_opt["logging"] = { -@@ -109,6 +154,7 @@ def define_new_opts(): - "order" : 4 - } - -+ - def main(): - conn = None - global LOGGER -@@ -165,6 +211,19 @@ def main(): - except Exception as err: - fail_usage("Failed: Create GCE compute v1 connection: {}".format(str(err))) - -+ # Get project and zone -+ if not options.get("--project"): -+ try: -+ options["--project"] = get_metadata('project/project-id') -+ except Exception as err: -+ fail_usage("Failed retrieving GCE project. Please provide --project option: {}".format(str(err))) -+ -+ if not options.get("--zone"): -+ try: -+ options["--zone"] = get_zone(conn, options['--project'], options['--plug']) -+ except Exception as err: -+ fail_usage("Failed retrieving GCE zone. Please provide --zone option: {}".format(str(err))) -+ - # Operate the fencing device - result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) - sys.exit(result) -diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml -index 805ecc6b..507b8385 100644 ---- a/tests/data/metadata/fence_gce.xml -+++ b/tests/data/metadata/fence_gce.xml -@@ -20,12 +20,12 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui - - Physical plug number on device, UUID or identification of machine - -- -+ - - - Zone. - -- -+ - - - Project ID. - -From 8ae1af8068d1718a861a25bf954e14392384fa55 Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Wed, 4 Jul 2018 09:25:46 -0300 -Subject: [PATCH 3/7] fence_gce: add power cycle as default method - -Add function to power cycle an instance and set cycle as the default -method to reboot. ---- - agents/gce/fence_gce.py | 21 +++++++++++++++++++-- - tests/data/metadata/fence_gce.xml | 8 ++++++++ - 2 files changed, 27 insertions(+), 2 deletions(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index e53dc5a6..3f77dc24 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -83,6 +83,21 @@ def set_power_status(conn, options): - fail_usage("Failed: set_power_status: {}".format(str(err))) - - -+def power_cycle(conn, options): -+ try: -+ LOGGER.info('Issuing reset of %s in zone %s' % (options["--plug"], options["--zone"])) -+ operation = conn.instances().reset( -+ project=options["--project"], -+ zone=options["--zone"], -+ instance=options["--plug"]).execute() -+ wait_for_operation(conn, options["--project"], options["--zone"], operation) -+ LOGGER.info('Reset of %s in zone %s complete' % (options["--plug"], options["--zone"])) -+ return True -+ except Exception as err: -+ LOGGER.error("Failed: power_cycle: {}".format(str(err))) -+ return False -+ -+ - def get_instance(conn, project, zone, instance): - request = conn.instances().get( - project=project, zone=zone, instance=instance) -@@ -161,13 +176,15 @@ def main(): - - hostname = platform.node() - -- device_opt = ["port", "no_password", "zone", "project", "logging"] -+ device_opt = ["port", "no_password", "zone", "project", "logging", "method"] - - atexit.register(atexit_handler) - - 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)) - -@@ -225,7 +242,7 @@ def main(): - fail_usage("Failed retrieving GCE zone. Please provide --zone option: {}".format(str(err))) - - # Operate the fencing device -- result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list) -+ result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list, power_cycle) - sys.exit(result) - - if __name__ == "__main__": -diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml -index 507b8385..f522550f 100644 ---- a/tests/data/metadata/fence_gce.xml -+++ b/tests/data/metadata/fence_gce.xml -@@ -10,6 +10,14 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui - - Fencing action - -+ -+ -+ -+ -+ Method to fence -+ - - - - -From 68644764695b79a3b75826fe009ea7da675677f7 Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Thu, 5 Jul 2018 11:04:32 -0300 -Subject: [PATCH 4/7] fence_gce: add missing imports to retrieve the project - ---- - agents/gce/fence_gce.py | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 3f77dc24..9b7b5e55 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -2,9 +2,18 @@ - - import atexit - import logging -+import os - import platform - import sys - import time -+if sys.version_info >= (3, 0): -+ # Python 3 imports. -+ import urllib.parse as urlparse -+ import urllib.request as urlrequest -+else: -+ # Python 2 imports. -+ import urllib as urlparse -+ import urllib2 as urlrequest - sys.path.append("@FENCEAGENTSLIBDIR@") - - import googleapiclient.discovery - -From f8f3f11187341622c26e4e439dfda6a37ad660b0 Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Thu, 5 Jul 2018 11:05:32 -0300 -Subject: [PATCH 5/7] fence_gce: s/--loging/--stackdriver-logging/ - ---- - agents/gce/fence_gce.py | 42 ++++++++++++++++++--------------------- - tests/data/metadata/fence_gce.xml | 11 +++++++--- - 2 files changed, 27 insertions(+), 26 deletions(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 9b7b5e55..a6befe39 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -167,14 +167,13 @@ def define_new_opts(): - "required" : "0", - "order" : 3 - } -- all_opt["logging"] = { -- "getopt" : ":", -- "longopt" : "logging", -- "help" : "--logging=[bool] Logging, true/false", -+ all_opt["stackdriver-logging"] = { -+ "getopt" : "", -+ "longopt" : "stackdriver-logging", -+ "help" : "--stackdriver-logging Enable Logging to Stackdriver", - "shortdesc" : "Stackdriver-logging support.", -- "longdesc" : "If enabled (set to true), IP failover logs will be posted to stackdriver logging.", -+ "longdesc" : "If enabled IP failover logs will be posted to stackdriver logging.", - "required" : "0", -- "default" : "false", - "order" : 4 - } - -@@ -185,7 +184,7 @@ def main(): - - hostname = platform.node() - -- device_opt = ["port", "no_password", "zone", "project", "logging", "method"] -+ device_opt = ["port", "no_password", "zone", "project", "stackdriver-logging", "method"] - - atexit.register(atexit_handler) - -@@ -210,22 +209,19 @@ def main(): - run_delay(options) - - # Prepare logging -- logging_env = options.get('--logging') -- if logging_env: -- logging_env = logging_env.lower() -- if any(x in logging_env for x in ['yes', 'true', 'enabled']): -- try: -- import google.cloud.logging.handlers -- client = google.cloud.logging.Client() -- handler = google.cloud.logging.handlers.CloudLoggingHandler(client, name=hostname) -- formatter = logging.Formatter('gcp:stonish "%(message)s"') -- LOGGER = logging.getLogger(hostname) -- handler.setFormatter(formatter) -- LOGGER.addHandler(handler) -- LOGGER.setLevel(logging.INFO) -- except ImportError: -- LOGGER.error('Couldn\'t import google.cloud.logging, ' -- 'disabling Stackdriver-logging support') -+ if options.get('--stackdriver-logging'): -+ try: -+ import google.cloud.logging.handlers -+ client = google.cloud.logging.Client() -+ handler = google.cloud.logging.handlers.CloudLoggingHandler(client, name=hostname) -+ formatter = logging.Formatter('gcp:stonish "%(message)s"') -+ LOGGER = logging.getLogger(hostname) -+ handler.setFormatter(formatter) -+ LOGGER.addHandler(handler) -+ LOGGER.setLevel(logging.INFO) -+ except ImportError: -+ LOGGER.error('Couldn\'t import google.cloud.logging, ' -+ 'disabling Stackdriver-logging support') - - # Prepare cli - try: -diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml -index f522550f..79b82ebb 100644 ---- a/tests/data/metadata/fence_gce.xml -+++ b/tests/data/metadata/fence_gce.xml -@@ -38,9 +38,14 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui - - Project ID. - -- -- -- -+ -+ -+ -+ Stackdriver-logging support. -+ -+ -+ -+ - Stackdriver-logging support. - - - -From 9ae0a072424fa982e1d18a2cb661628c38601c3a Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Sat, 7 Jul 2018 18:42:01 -0300 -Subject: [PATCH 6/7] fence_gce: use root logger for stackdriver - ---- - agents/gce/fence_gce.py | 29 +++++++++++++++-------------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index a6befe39..1d5095ae 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -20,7 +20,6 @@ - from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action - - --LOGGER = logging - METADATA_SERVER = 'http://metadata.google.internal/computeMetadata/v1/' - METADATA_HEADERS = {'Metadata-Flavor': 'Google'} - -@@ -73,37 +72,37 @@ def wait_for_operation(conn, project, zone, operation): - def set_power_status(conn, options): - try: - if options["--action"] == "off": -- LOGGER.info("Issuing poweroff of %s in zone %s" % (options["--plug"], options["--zone"])) -+ logging.info("Issuing poweroff of %s in zone %s" % (options["--plug"], options["--zone"])) - operation = conn.instances().stop( - project=options["--project"], - zone=options["--zone"], - instance=options["--plug"]).execute() - wait_for_operation(conn, options["--project"], options["--zone"], operation) -- LOGGER.info("Poweroff of %s in zone %s complete" % (options["--plug"], options["--zone"])) -+ logging.info("Poweroff of %s in zone %s complete" % (options["--plug"], options["--zone"])) - elif options["--action"] == "on": -- LOGGER.info("Issuing poweron of %s in zone %s" % (options["--plug"], options["--zone"])) -+ logging.info("Issuing poweron of %s in zone %s" % (options["--plug"], options["--zone"])) - operation = conn.instances().start( - project=options["--project"], - zone=options["--zone"], - instance=options["--plug"]).execute() - wait_for_operation(conn, options["--project"], options["--zone"], operation) -- LOGGER.info("Poweron of %s in zone %s complete" % (options["--plug"], options["--zone"])) -+ logging.info("Poweron of %s in zone %s complete" % (options["--plug"], options["--zone"])) - except Exception as err: - fail_usage("Failed: set_power_status: {}".format(str(err))) - - - def power_cycle(conn, options): - try: -- LOGGER.info('Issuing reset of %s in zone %s' % (options["--plug"], options["--zone"])) -+ logging.info('Issuing reset of %s in zone %s' % (options["--plug"], options["--zone"])) - operation = conn.instances().reset( - project=options["--project"], - zone=options["--zone"], - instance=options["--plug"]).execute() - wait_for_operation(conn, options["--project"], options["--zone"], operation) -- LOGGER.info('Reset of %s in zone %s complete' % (options["--plug"], options["--zone"])) -+ logging.info('Reset of %s in zone %s complete' % (options["--plug"], options["--zone"])) - return True - except Exception as err: -- LOGGER.error("Failed: power_cycle: {}".format(str(err))) -+ logging.error("Failed: power_cycle: {}".format(str(err))) - return False - - -@@ -180,7 +179,6 @@ def define_new_opts(): - - def main(): - conn = None -- global LOGGER - - hostname = platform.node() - -@@ -209,18 +207,21 @@ def main(): - run_delay(options) - - # Prepare logging -- if options.get('--stackdriver-logging'): -+ if options.get('--stackdriver-logging') is not None: - try: - import google.cloud.logging.handlers - client = google.cloud.logging.Client() - handler = google.cloud.logging.handlers.CloudLoggingHandler(client, name=hostname) -+ handler.setLevel(logging.INFO) - formatter = logging.Formatter('gcp:stonish "%(message)s"') -- LOGGER = logging.getLogger(hostname) - handler.setFormatter(formatter) -- LOGGER.addHandler(handler) -- LOGGER.setLevel(logging.INFO) -+ root_logger = logging.getLogger() -+ if options.get('--verbose') is None: -+ root_logger.setLevel(logging.INFO) -+ logging.getLogger("googleapiclient").setLevel(logging.ERROR) -+ root_logger.addHandler(handler) - except ImportError: -- LOGGER.error('Couldn\'t import google.cloud.logging, ' -+ logging.error('Couldn\'t import google.cloud.logging, ' - 'disabling Stackdriver-logging support') - - # Prepare cli - -From a52e643708908539d6e5fdb5d36a6cea935e4481 Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Wed, 11 Jul 2018 17:16:49 -0300 -Subject: [PATCH 7/7] fence_gce: minor changes in logging - -- Remove hostname (use --plug instead). -- Supress messages from googleapiclient and oauth2client if not error in -non verbose mode. -- s/stonish/stonith ---- - agents/gce/fence_gce.py | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 1d5095ae..3eca0139 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -3,7 +3,6 @@ - import atexit - import logging - import os --import platform - import sys - import time - if sys.version_info >= (3, 0): -@@ -180,8 +179,6 @@ def define_new_opts(): - def main(): - conn = None - -- hostname = platform.node() -- - device_opt = ["port", "no_password", "zone", "project", "stackdriver-logging", "method"] - - atexit.register(atexit_handler) -@@ -207,18 +204,20 @@ def main(): - run_delay(options) - - # Prepare logging -- if options.get('--stackdriver-logging') is not None: -+ if options.get('--verbose') is None: -+ logging.getLogger('googleapiclient').setLevel(logging.ERROR) -+ logging.getLogger('oauth2client').setLevel(logging.ERROR) -+ if options.get('--stackdriver-logging') is not None and options.get('--plug'): - try: - import google.cloud.logging.handlers - client = google.cloud.logging.Client() -- handler = google.cloud.logging.handlers.CloudLoggingHandler(client, name=hostname) -+ handler = google.cloud.logging.handlers.CloudLoggingHandler(client, name=options['--plug']) - handler.setLevel(logging.INFO) -- formatter = logging.Formatter('gcp:stonish "%(message)s"') -+ formatter = logging.Formatter('gcp:stonith "%(message)s"') - handler.setFormatter(formatter) - root_logger = logging.getLogger() - if options.get('--verbose') is None: - root_logger.setLevel(logging.INFO) -- logging.getLogger("googleapiclient").setLevel(logging.ERROR) - root_logger.addHandler(handler) - except ImportError: - logging.error('Couldn\'t import google.cloud.logging, ' diff --git a/SOURCES/fence_gce-2-filter-aggregatedlist.patch b/SOURCES/fence_gce-2-filter-aggregatedlist.patch deleted file mode 100644 index 29b7203..0000000 --- a/SOURCES/fence_gce-2-filter-aggregatedlist.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8e801d513b9a500ac0d717476aadc1cdabc0a92e Mon Sep 17 00:00:00 2001 -From: Helen Koike -Date: Thu, 19 Jul 2018 13:13:53 -0300 -Subject: [PATCH] fence_gce: filter call to aggregatedList - -Don't list all the instances in the project, filter only the one we are -interested in. ---- - agents/gce/fence_gce.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py -index 3eca0139..93cd1180 100644 ---- a/agents/gce/fence_gce.py -+++ b/agents/gce/fence_gce.py -@@ -112,7 +112,8 @@ def get_instance(conn, project, zone, instance): - - - def get_zone(conn, project, instance): -- request = conn.instances().aggregatedList(project=project) -+ fl = 'name="%s"' % instance -+ request = conn.instances().aggregatedList(project=project, filter=fl) - while request is not None: - response = request.execute() - zones = response.get('items', {}) diff --git a/SOURCES/fence_gce-3-stackdriver-logging-note.patch b/SOURCES/fence_gce-3-stackdriver-logging-note.patch deleted file mode 100644 index 8589b77..0000000 --- a/SOURCES/fence_gce-3-stackdriver-logging-note.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -uNr a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py ---- a/agents/gce/fence_gce.py 2018-07-30 16:09:45.811531118 +0200 -+++ b/agents/gce/fence_gce.py 2018-07-30 16:31:28.970202508 +0200 -@@ -174,9 +174,9 @@ - all_opt["stackdriver-logging"] = { - "getopt" : "", - "longopt" : "stackdriver-logging", -- "help" : "--stackdriver-logging Enable Logging to Stackdriver", -- "shortdesc" : "Stackdriver-logging support.", -- "longdesc" : "If enabled IP failover logs will be posted to stackdriver logging.", -+ "help" : "--stackdriver-logging Enable Logging to Stackdriver. Using stackdriver logging requires additional libraries (google-cloud-logging).", -+ "shortdesc" : "Stackdriver-logging support. Requires additional libraries (google-cloud-logging).", -+ "longdesc" : "If enabled IP failover logs will be posted to stackdriver logging. Using stackdriver logging requires additional libraries (google-cloud-logging).", - "required" : "0", - "order" : 4 - } -diff -uNr a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml ---- a/tests/data/metadata/fence_gce.xml 2018-07-30 16:09:45.548532576 +0200 -+++ b/tests/data/metadata/fence_gce.xml 2018-07-30 16:32:05.392988450 +0200 -@@ -41,12 +41,12 @@ - - - -- Stackdriver-logging support. -+ Stackdriver-logging support. Requires additional libraries (google-cloud-logging). - - - - -- Stackdriver-logging support. -+ Stackdriver-logging support. Requires additional libraries (google-cloud-logging). - - - diff --git a/SOURCES/fence_ilo3-fence_ipmilan-show-correct-default-method.patch b/SOURCES/fence_ilo3-fence_ipmilan-show-correct-default-method.patch deleted file mode 100644 index 677ebb1..0000000 --- a/SOURCES/fence_ilo3-fence_ipmilan-show-correct-default-method.patch +++ /dev/null @@ -1,26 +0,0 @@ -From bd1b11884f33f5fce5ca7618c9f87b540592e1b6 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 2 Jul 2018 16:36:41 +0200 -Subject: [PATCH] fence_ilo3/fence_ipmilan: show correct default method (onoff) - in help - ---- - agents/ipmilan/fence_ipmilan.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/ipmilan/fence_ipmilan.py b/agents/ipmilan/fence_ipmilan.py -index 453d7365..9610f1c6 100644 ---- a/agents/ipmilan/fence_ipmilan.py -+++ b/agents/ipmilan/fence_ipmilan.py -@@ -171,7 +171,7 @@ def main(): - all_opt["lanplus"]["default"] = "1" - - all_opt["ipport"]["default"] = "623" -- all_opt["method"]["help"] = "-m, --method=[method] Method to fence (onoff|cycle) (Default: cycle)\n" \ -+ all_opt["method"]["help"] = "-m, --method=[method] Method to fence (onoff|cycle) (Default: onoff)\n" \ - "WARNING! This fence agent might report success before the node is powered off. " \ - "You should use -m/method onoff if your fence device works correctly with that option." - --- -2.17.1 - diff --git a/SOURCES/fence_impilan-fence_ilo_ssh-add-ilo5-support.patch b/SOURCES/fence_impilan-fence_ilo_ssh-add-ilo5-support.patch deleted file mode 100644 index 8e23e64..0000000 --- a/SOURCES/fence_impilan-fence_ilo_ssh-add-ilo5-support.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -uNr a/agents/ilo_ssh/fence_ilo_ssh.py b/agents/ilo_ssh/fence_ilo_ssh.py ---- a/agents/ilo_ssh/fence_ilo_ssh.py 2018-06-18 12:14:35.000000000 +0200 -+++ b/agents/ilo_ssh/fence_ilo_ssh.py 2018-06-28 12:26:14.274615003 +0200 -@@ -54,7 +54,8 @@ - device via ssh and reboot a specified outlet. " - docs["vendorurl"] = "http://www.hp.com" - docs["symlink"] = [("fence_ilo3_ssh", "Fence agent for HP iLO3 over SSH"), -- ("fence_ilo4_ssh", "Fence agent for HP iLO4 over SSH")] -+ ("fence_ilo4_ssh", "Fence agent for HP iLO4 over SSH"), -+ ("fence_ilo5_ssh", "Fence agent for HP iLO5 over SSH")] - show_docs(options, docs) - - options["eol"] = "\r" -diff -uNr a/agents/ipmilan/fence_ipmilan.py b/agents/ipmilan/fence_ipmilan.py ---- a/agents/ipmilan/fence_ipmilan.py 2018-06-18 12:14:35.000000000 +0200 -+++ b/agents/ipmilan/fence_ipmilan.py 2018-06-28 12:26:14.275614990 +0200 -@@ -169,6 +169,8 @@ - all_opt["lanplus"]["default"] = "1" - elif os.path.basename(sys.argv[0]) == "fence_ilo4": - all_opt["lanplus"]["default"] = "1" -+ elif os.path.basename(sys.argv[0]) == "fence_ilo5": -+ all_opt["lanplus"]["default"] = "1" - - all_opt["ipport"]["default"] = "623" - all_opt["method"]["help"] = "-m, --method=[method] Method to fence (onoff|cycle) (Default: cycle)\n" \ -@@ -187,6 +189,7 @@ - docs["vendorurl"] = "" - docs["symlink"] = [("fence_ilo3", "Fence agent for HP iLO3"), - ("fence_ilo4", "Fence agent for HP iLO4"), -+ ("fence_ilo5", "Fence agent for HP iLO5"), - ("fence_imm", "Fence agent for IBM Integrated Management Module"), - ("fence_idrac", "Fence agent for Dell iDRAC")] - show_docs(options, docs) diff --git a/SOURCES/fence_kdump-fix-strncpy-issue.patch b/SOURCES/fence_kdump-fix-strncpy-issue.patch deleted file mode 100644 index 7514b81..0000000 --- a/SOURCES/fence_kdump-fix-strncpy-issue.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ac83d8ce3d8dd868b0e887528e7c269cee4dcac8 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 31 Jul 2018 15:57:38 +0200 -Subject: [PATCH] fence_kdump: fix strncpy issue - ---- - agents/kdump/fence_kdump.c | 2 +- - agents/kdump/fence_kdump_send.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/kdump/fence_kdump.c b/agents/kdump/fence_kdump.c -index e2f3cd80..768a9344 100644 ---- a/agents/kdump/fence_kdump.c -+++ b/agents/kdump/fence_kdump.c -@@ -351,7 +351,7 @@ get_options_node (fence_kdump_opts_t *opts) - hints.ai_protocol = IPPROTO_UDP; - hints.ai_flags = AI_NUMERICSERV; - -- strncpy (node->name, opts->nodename, sizeof (node->name)); -+ strncpy (node->name, opts->nodename, sizeof (node->name) - 1); - snprintf (node->port, sizeof (node->port), "%d", opts->ipport); - - node->info = NULL; -diff --git a/agents/kdump/fence_kdump_send.c b/agents/kdump/fence_kdump_send.c -index d668bed3..638f8c97 100644 ---- a/agents/kdump/fence_kdump_send.c -+++ b/agents/kdump/fence_kdump_send.c -@@ -116,7 +116,7 @@ get_options_node (fence_kdump_opts_t *opts) - hints.ai_protocol = IPPROTO_UDP; - hints.ai_flags = AI_NUMERICSERV; - -- strncpy (node->name, opts->nodename, sizeof (node->name)); -+ strncpy (node->name, opts->nodename, sizeof (node->name) - 1); - snprintf (node->port, sizeof (node->port), "%d", opts->ipport); - - node->info = NULL; diff --git a/SOURCES/fence_mpath-watchdog-support.patch b/SOURCES/fence_mpath-watchdog-support.patch deleted file mode 100644 index c2f0122..0000000 --- a/SOURCES/fence_mpath-watchdog-support.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 199b1efee0ba1f01c27ca689a15465cf4a258ee6 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 22 Jan 2018 11:27:28 +0100 -Subject: [PATCH] fence_mpath: add watchdog support - ---- - agents/Makefile.am | 11 ++++++++ - agents/mpath/fence_mpath.py | 50 ++++++++++++++++++++++++++++++++++--- - configure.ac | 6 +++++ - make/fencebuild.mk | 2 +- - tests/data/metadata/fence_mpath.xml | 2 +- - 5 files changed, 66 insertions(+), 5 deletions(-) - -diff --git a/agents/Makefile.am b/agents/Makefile.am -index 2524a3ab..833d2af5 100644 ---- a/agents/Makefile.am -+++ b/agents/Makefile.am -@@ -50,6 +50,11 @@ zvm_fence_zvm_SOURCES = zvm/fence_zvm.c - zvm_fence_zvm_CFLAGS = -D_GNU_SOURCE -Izvm - endif - -+if BUILD_FENCE_MPATH -+mpathdatadir = $(CLUSTERDATA) -+mpathdata_SCRIPTS = mpath/fence_mpath_check mpath/fence_mpath_check_hardreboot -+endif -+ - if BUILD_FENCE_SCSI - scsidatadir = $(CLUSTERDATA) - scsidata_SCRIPTS = scsi/fence_scsi_check scsi/fence_scsi_check_hardreboot -@@ -72,6 +77,12 @@ manual/fence_ack_manual: manual/fence_ack_manual.in - -e 's#@clustervarrun@#${CLUSTERVARRUN}#g' \ - > $@ - -+mpath/fence_mpath_check: mpath/fence_mpath -+ cp $^ $@ -+ -+mpath/fence_mpath_check_hardreboot: mpath/fence_mpath -+ cp $^ $@ -+ - scsi/fence_scsi_check: scsi/fence_scsi - cp $^ $@ - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index ac5bc794..d9ac2ef5 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -143,25 +143,63 @@ def dev_write(options, dev): - store_fh.write(dev + "\t" + options["--key"] + "\n") - store_fh.close() - --def dev_read(options): -+def dev_read(options, fail=True): - dev_key = {} - file_path = options["--store-path"] + "/mpath.devices" - try: - store_fh = open(file_path, "r") - except IOError: -- fail_usage("Failed: Cannot open file \"" + file_path + "\"") -+ if fail: -+ fail_usage("Failed: Cannot open file \"" + file_path + "\"") -+ else: -+ return None - # get not empty lines from file - for (device, key) in [line.strip().split() for line in store_fh if line.strip()]: - dev_key[device] = key - store_fh.close() - return dev_key - -+def mpath_check_get_verbose(): -+ try: -+ f = open("/etc/sysconfig/watchdog", "r") -+ except IOError: -+ return False -+ match = re.search(r"^\s*verbose=yes", "".join(f.readlines()), re.MULTILINE) -+ f.close() -+ return bool(match) -+ -+def mpath_check(hardreboot=False): -+ if len(sys.argv) >= 3 and sys.argv[1] == "repair": -+ return int(sys.argv[2]) -+ options = {} -+ options["--mpathpersist-path"] = "/usr/sbin/mpathpersist" -+ options["--store-path"] = "/var/run/cluster" -+ options["--power-timeout"] = "5" -+ if mpath_check_get_verbose(): -+ logging.getLogger().setLevel(logging.DEBUG) -+ devs = dev_read(options, fail=False) -+ if not devs: -+ logging.error("No devices found") -+ return 0 -+ for dev, key in list(devs.items()): -+ if key in get_registration_keys(options, dev): -+ logging.debug("key " + key + " registered with device " + dev) -+ return 0 -+ else: -+ logging.debug("key " + key + " not registered with device " + dev) -+ logging.debug("key " + key + " registered with any devices") -+ -+ if hardreboot == True: -+ libc = ctypes.cdll['libc.so.6'] -+ libc.reboot(0x1234567) -+ return 2 -+ - def define_new_opts(): - all_opt["devices"] = { - "getopt" : "d:", - "longopt" : "devices", - "help" : "-d, --devices=[devices] List of devices to use for current operation", -- "required" : "1", -+ "required" : "0", - "shortdesc" : "List of devices to use for current operation. Devices can \ - be comma-separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). \ - Each device must support SCSI-3 persistent reservations.", -@@ -205,6 +243,12 @@ def main(): - - define_new_opts() - -+ # fence_mpath_check -+ if os.path.basename(sys.argv[0]) == "fence_mpath_check": -+ sys.exit(mpath_check()) -+ elif os.path.basename(sys.argv[0]) == "fence_mpath_check_hardreboot": -+ sys.exit(mpath_check(hardreboot=True)) -+ - options = check_input(device_opt, process_input(device_opt), other_conditions=True) - - docs = {} -diff --git a/configure.ac b/configure.ac -index e8b24211..24b857b3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -148,6 +148,11 @@ if echo "$AGENTS_LIST" | grep -q -E "all|manual"; then - AGENTS_LIST=$(echo "$AGENTS_LIST" | sed -E "s/manual( |$)//") - fi - -+FENCE_MPATH=0 -+if echo "$AGENTS_LIST" | grep -q -E "all|mpath"; then -+ FENCE_MPATH=1 -+fi -+ - FENCE_SCSI=0 - if echo "$AGENTS_LIST" | grep -q -E "all|scsi"; then - FENCE_SCSI=1 -@@ -312,6 +317,7 @@ AC_SUBST([SNMPBIN]) - AC_SUBST([AGENTS_LIST]) - AM_CONDITIONAL(BUILD_FENCE_KDUMP, test $FENCE_KDUMP -eq 1) - AM_CONDITIONAL(BUILD_FENCE_MANUAL, test $FENCE_MANUAL -eq 1) -+AM_CONDITIONAL(BUILD_FENCE_MPATH, test $FENCE_MPATH -eq 1) - AM_CONDITIONAL(BUILD_FENCE_SCSI, test $FENCE_SCSI -eq 1) - AM_CONDITIONAL(BUILD_FENCE_ZVM, test $FENCE_ZVM -eq 1) - AM_CONDITIONAL(BUILD_XENAPILIB, test $XENAPILIB -eq 1) -diff --git a/make/fencebuild.mk b/make/fencebuild.mk -index e08d5200..6a7c6f63 100644 ---- a/make/fencebuild.mk -+++ b/make/fencebuild.mk -@@ -51,7 +51,7 @@ $(TARGET): - $(call gen_agent_from_py) - - clean: clean-man -- rm -f $(CLEAN_TARGET:%.8=%) $(CLEAN_TARGET_ADDITIONAL) $(scsidata_SCRIPTS) */*.pyc *.pyc */*.wiki -+ rm -f $(CLEAN_TARGET:%.8=%) $(CLEAN_TARGET_ADDITIONAL) $(mpathdata_SCRIPTS) $(scsidata_SCRIPTS) */*.pyc */*.wiki - - if [ "$(abs_builddir)" = "$(abs_top_builddir)/lib" ]; then \ - rm -f $(TARGET); \ -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index f384e50b..bbe9ad2b 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -9,7 +9,7 @@ The fence_mpath agent works by having a unique key for each node that has to be - - Fencing action - -- -+ - - - List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations. diff --git a/SOURCES/fix-version.patch b/SOURCES/fix-version.patch deleted file mode 100644 index dbb2fc2..0000000 --- a/SOURCES/fix-version.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -uNr a/.tarball-version b/.tarball-version ---- a/.tarball-version 1970-01-01 01:00:00.000000000 +0100 -+++ b/.tarball-version 2018-08-20 10:42:03.876068353 +0200 -@@ -0,0 +1 @@ -+4.2.1 -diff -uNr a/.version b/.version ---- a/.version 1970-01-01 01:00:00.000000000 +0100 -+++ b/.version 2018-08-20 10:52:35.712060731 +0200 -@@ -0,0 +1 @@ -+4.2.1 diff --git a/SOURCES/ha-cloud-support-aliyun.patch b/SOURCES/ha-cloud-support-aliyun.patch new file mode 100644 index 0000000..22b35a5 --- /dev/null +++ b/SOURCES/ha-cloud-support-aliyun.patch @@ -0,0 +1,10 @@ +--- a/agents/aliyun/fence_aliyun.py 2021-02-08 16:27:46.587068911 +0100 ++++ b/agents/aliyun/fence_aliyun.py 2021-02-08 16:27:41.368054268 +0100 +@@ -9,6 +9,7 @@ + + + try: ++ sys.path.insert(0, '/usr/lib/fence-agents/support/aliyun/lib/python#PYTHON3_VERSION#/site-packages') + from aliyunsdkcore import client + from aliyunsdkcore.auth.credentials import EcsRamRoleCredential + from aliyunsdkcore.profile import region_provider diff --git a/SOURCES/ha-cloud-support-aws.patch b/SOURCES/ha-cloud-support-aws.patch new file mode 100644 index 0000000..39f7353 --- /dev/null +++ b/SOURCES/ha-cloud-support-aws.patch @@ -0,0 +1,10 @@ +--- a/agents/aws/fence_aws.py 2021-02-08 13:31:49.748362643 +0100 ++++ b/agents/aws/fence_aws.py 2021-02-08 13:31:46.836356513 +0100 +@@ -11,6 +11,7 @@ + from requests import HTTPError + + try: ++ sys.path.insert(0, '/usr/lib/fence-agents/support/aws/lib/python#PYTHON3_VERSION#/site-packages') + import boto3 + from botocore.exceptions import ConnectionError, ClientError, EndpointConnectionError, NoRegionError + except ImportError: diff --git a/SOURCES/ha-cloud-support-azure.patch b/SOURCES/ha-cloud-support-azure.patch new file mode 100644 index 0000000..8ace52e --- /dev/null +++ b/SOURCES/ha-cloud-support-azure.patch @@ -0,0 +1,16 @@ +--- a/agents/azure_arm/fence_azure_arm.py 2025-01-31 15:12:38.877143460 +0100 ++++ b/agents/azure_arm/fence_azure_arm.py 2025-01-31 11:20:23.325919657 +0100 +@@ -1,6 +1,12 @@ + #!@PYTHON@ -tt + +-import sys, re, pexpect ++import sys, re ++sys.path.insert(0, '/usr/lib/fence-agents/support/common/lib/python#PYTHON3_VERSION#/site-packages') ++sys.path.insert(1, '/usr/lib/fence-agents/support/azure/lib/python#PYTHON3_VERSION#/site-packages') ++try: ++ import pexpect ++except: ++ pass + import logging + import atexit + import xml.etree.ElementTree as ET diff --git a/SOURCES/ha-cloud-support-google.patch b/SOURCES/ha-cloud-support-google.patch new file mode 100644 index 0000000..89f84aa --- /dev/null +++ b/SOURCES/ha-cloud-support-google.patch @@ -0,0 +1,10 @@ +--- fence-agents-4.13.1/agents/gce/fence_gce.py 2023-06-13 09:08:11.000000000 +0200 ++++ fence-agents-4.13.1/agents/gce/fence_gce.py.mod 2024-02-22 16:52:49.703854219 +0100 +@@ -31,6 +31,7 @@ + + from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action, run_command + try: ++ sys.path.insert(0, '/usr/lib/fence-agents/support/google/lib/python#PYTHON3_VERSION#/site-packages') + import httplib2 + import googleapiclient.discovery + import socks diff --git a/SOURCES/python3-has_key-fixes.patch b/SOURCES/python3-has_key-fixes.patch deleted file mode 100644 index 9252cb1..0000000 --- a/SOURCES/python3-has_key-fixes.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 29f93ed6f7f79cad801bf08ad9172c8a62183435 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 14 Aug 2018 12:33:41 +0200 -Subject: [PATCH] fence_compute/fence_evacuate/fence_rhevm: dont use has_key - (not supported in Python 3) - ---- - agents/compute/fence_compute.py | 4 ++-- - agents/evacuate/fence_evacuate.py | 4 ++-- - agents/rhevm/fence_rhevm.py | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/agents/compute/fence_compute.py b/agents/compute/fence_compute.py -index ec2d093c..254e2670 100644 ---- a/agents/compute/fence_compute.py -+++ b/agents/compute/fence_compute.py -@@ -311,7 +311,7 @@ def create_nova_connection(options): - region_name=options["--region-name"], - endpoint_type=options["--endpoint-type"], - session=keystone_session, auth=keystone_auth, -- http_log_debug=options.has_key("--verbose")) -+ http_log_debug="--verbose" in options) - else: - # OSP >= 11 - # ArgSpec(args=['version'], varargs='args', keywords='kwargs', defaults=None) -@@ -319,7 +319,7 @@ def create_nova_connection(options): - region_name=options["--region-name"], - endpoint_type=options["--endpoint-type"], - session=keystone_session, auth=keystone_auth, -- http_log_debug=options.has_key("--verbose")) -+ http_log_debug="--verbose" in options) - - try: - nova.hypervisors.list() -diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py -index 615dede7..6818c44f 100644 ---- a/agents/evacuate/fence_evacuate.py -+++ b/agents/evacuate/fence_evacuate.py -@@ -245,7 +245,7 @@ def create_nova_connection(options): - region_name=options["--region-name"], - endpoint_type=options["--endpoint-type"], - session=keystone_session, auth=keystone_auth, -- http_log_debug=options.has_key("--verbose")) -+ http_log_debug="--verbose" in options) - else: - # OSP >= 11 - # ArgSpec(args=['version'], varargs='args', keywords='kwargs', defaults=None) -@@ -253,7 +253,7 @@ def create_nova_connection(options): - region_name=options["--region-name"], - endpoint_type=options["--endpoint-type"], - session=keystone_session, auth=keystone_auth, -- http_log_debug=options.has_key("--verbose")) -+ http_log_debug="--verbose" in options) - - try: - nova.hypervisors.list() -diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py -index 0594e66b..c06b7c39 100644 ---- a/agents/rhevm/fence_rhevm.py -+++ b/agents/rhevm/fence_rhevm.py -@@ -74,11 +74,11 @@ def send_command(opt, command, method="GET"): - url = "https:" - else: - url = "http:" -- if opt.has_key("--api-path"): -+ if "--api-path" in opt: - api_path = opt["--api-path"] - else: - api_path = "/ovirt-engine/api" -- if opt.has_key("--disable-http-filter"): -+ if "--disable-http-filter" in opt: - http_filter = 'false' - else: - http_filter = 'true' diff --git a/SOURCES/requirements-aliyun.txt b/SOURCES/requirements-aliyun.txt new file mode 100644 index 0000000..c708c41 --- /dev/null +++ b/SOURCES/requirements-aliyun.txt @@ -0,0 +1,3 @@ +aliyun-python-sdk-ecs +# for resource-agents-cloud +#aliyuncli>=2.1.5 diff --git a/SOURCES/requirements-aws.txt b/SOURCES/requirements-aws.txt new file mode 100644 index 0000000..f702bb0 --- /dev/null +++ b/SOURCES/requirements-aws.txt @@ -0,0 +1,2 @@ +boto3 +jmespath<1.0.0 diff --git a/SOURCES/requirements-common.txt b/SOURCES/requirements-common.txt new file mode 100644 index 0000000..08f1c62 --- /dev/null +++ b/SOURCES/requirements-common.txt @@ -0,0 +1,3 @@ +pexpect +pycurl +suds-community diff --git a/SOURCES/requirements-google.txt b/SOURCES/requirements-google.txt new file mode 100644 index 0000000..4ef59ba --- /dev/null +++ b/SOURCES/requirements-google.txt @@ -0,0 +1,4 @@ +google-api-python-client==1.12.8 +chardet<4.0 +# for gcp-vpc-move-route +pyroute2 diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index b3cfea2..047033f 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -1,337 +1,116 @@ -# Copyright 2004-2011 Red Hat, Inc. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License v.2. - -# keep around ready for later user -## global alphatag git0a6184070 - -# bundles -%global bundled_lib_dir bundled -# alibaba -# python-pycryptodome bundle -%global pycryptodome pycryptodome -%global pycryptodome_version 3.20.0 -%global pycryptodome_dir %{bundled_lib_dir}/aliyun/%{pycryptodome} -# python-aliyun-sdk-core bundle -%global aliyunsdkcore aliyun-python-sdk-core -%global aliyunsdkcore_version 2.13.1 -%global aliyunsdkcore_dir %{bundled_lib_dir}/aliyun/%{aliyunsdkcore} -# python-aliyun-sdk-ecs bundle -%global aliyunsdkecs aliyun-python-sdk-ecs -%global aliyunsdkecs_version 4.9.3 -%global aliyunsdkecs_dir %{bundled_lib_dir}/aliyun/%{aliyunsdkecs} -# python-aliyun-sdk-vpc bundle -%global aliyunsdkvpc aliyun-python-sdk-vpc -%global aliyunsdkvpc_version 3.0.2 -%global aliyunsdkvpc_dir %{bundled_lib_dir}/aliyun/%{aliyunsdkvpc} -# aws -%global botocore botocore -%global botocore_version 1.23.46 -%global chardet chardet -%global chardet_version 4.0.0 -## for pip install only -%global jmespath jmespath -%global jmespath_version 0.10.0 -# google cloud -%global httplib2 httplib2 -%global httplib2_version 0.19.1 -# kubevirt -%global openshift openshift -%global openshift_version 0.12.1 -%global ruamelyamlclib ruamel.yaml.clib -%global ruamelyamlclib_version 0.2.6 -%global kubernetes kubernetes -%global kubernetes_version 12.0.1 -%global certifi certifi -%global certifi_version 2023.7.22 -%global googleauth google-auth -%global googleauth_version 2.3.0 -%global cachetools cachetools -%global cachetools_version 4.2.4 -%global pyasn1modules pyasn1-modules -%global pyasn1modules_version 0.2.8 -%global pyasn1 pyasn1 -%global pyasn1_version 0.4.8 -%global dateutil dateutil -%global dateutil_version 2.8.2 -%global pyyaml PyYAML -%global pyyaml_version 6.0 -%global six six -%global six_version 1.16.0 -%global urllib3 urllib3 -%global urllib3_version 1.26.18 -%global websocketclient websocket-client -%global websocketclient_version 1.2.1 -%global jinja2 Jinja2 -%global jinja2_version 3.0.2 -%global markupsafe MarkupSafe -%global markupsafe_version 2.0.1 -%global stringutils string-utils -%global stringutils_version 1.0.0 -%global requests requests -%global requests_version 2.26.0 -%global chrstnormalizer charset-normalizer -%global chrstnormalizer_version 2.0.7 -%global idna idna -%global idna_version 3.3 -%global reqstsoauthlib requests-oauthlib -%global reqstsoauthlib_version 1.3.0 -%global oauthlib oauthlib -%global oauthlib_version 3.1.1 -%global ruamelyaml ruamel.yaml -%global ruamelyaml_version 0.17.16 -%global setuptools setuptools -%global setuptools_version 58.3.0 +############################################################################### +############################################################################### +## +## Copyright (C) 2019-2021 Red Hat, Inc. All rights reserved. +## +## This copyrighted material is made available to anyone wishing to use, +## modify, copy, or redistribute it subject to the terms and conditions +## of the GNU General Public License v.2. +## +############################################################################### +############################################################################### Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") -Version: 4.2.1 -Release: 129%{?alphatag:.%{alphatag}}%{?dist}.8 -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +Version: 4.16.0 +Release: 5%{?alphatag:.%{alphatag}}%{?dist}.3 +License: GPL-2.0-or-later AND LGPL-2.0-or-later URL: https://github.com/ClusterLabs/fence-agents Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz +### HA support requirements-*.txt ### +Source100: requirements-common.txt +Source101: requirements-aliyun.txt +Source102: requirements-aws.txt +Source103: requirements-azure.txt +Source104: requirements-google.txt +### HA support libs/utils ### +### BEGIN ### +## pip download --no-binary :all: -r requirements-.txt +# common +Source1000: pycurl-7.45.3.tar.gz +Source1001: suds-community-1.1.2.tar.gz # aliyun -Source1: %{pycryptodome}-%{pycryptodome_version}.tar.gz -Source2: %{aliyunsdkcore}-%{aliyunsdkcore_version}.tar.gz -Source3: %{aliyunsdkecs}-%{aliyunsdkecs_version}.tar.gz -Source4: %{aliyunsdkvpc}-%{aliyunsdkvpc_version}.tar.gz -# google cloud -Source5: %{httplib2}-%{httplib2_version}-py3-none-any.whl -Source6: pyparsing-2.4.7-py2.py3-none-any.whl +Source1100: aliyun-python-sdk-ecs-4.24.71.tar.gz +Source1101: aliyun-python-sdk-core-2.14.0.tar.gz +Source1102: jmespath-0.10.0.tar.gz +# aliyun-cli +Source1150: aliyun-cli-3.0.198.tar.gz +## TAG=$(git log --pretty="format:%h" -n 1) +## distdir="aliyun-openapi-meta-${TAG}" +## TARFILE="${distdir}.tar.gz" +## rm -rf $TARFILE $distdir +## git archive --prefix=$distdir/ HEAD | gzip > $TARFILE +Source1151: aliyun-openapi-meta-5cf98b660.tar.gz +## go mod vendor +Source1152: aliyun-cli-go-vendor.tar.gz # aws -Source7: %{botocore}-%{botocore_version}.tar.gz -Source8: %{jmespath}-%{jmespath_version}.tar.gz -Source9: %{chardet}-%{chardet_version}.tar.gz -# kubevirt -## pip download --no-binary :all: openshift "ruamel.yaml.clib>=0.1.2" -### BEGIN -Source10: %{openshift}-%{openshift_version}.tar.gz -Source11: %{ruamelyamlclib}-%{ruamelyamlclib_version}.tar.gz -Source12: %{kubernetes}-%{kubernetes_version}.tar.gz -Source13: %{certifi}-%{certifi_version}.tar.gz -Source14: %{googleauth}-%{googleauth_version}.tar.gz -Source15: %{cachetools}-%{cachetools_version}.tar.gz -Source16: %{pyasn1modules}-%{pyasn1modules_version}.tar.gz -Source17: %{pyasn1}-%{pyasn1_version}.tar.gz -Source18: python-%{dateutil}-%{dateutil_version}.tar.gz -Source19: %{pyyaml}-%{pyyaml_version}.tar.gz -## rsa is dependency for "pip install", -## but gets removed to use cryptography lib instead -Source20: rsa-4.7.2.tar.gz -Source21: %{six}-%{six_version}.tar.gz -Source22: %{urllib3}-%{urllib3_version}.tar.gz -Source23: %{websocketclient}-%{websocketclient_version}.tar.gz -Source24: %{jinja2}-%{jinja2_version}.tar.gz -Source25: %{markupsafe}-%{markupsafe_version}.tar.gz -Source26: python-%{stringutils}-%{stringutils_version}.tar.gz -Source27: %{requests}-%{requests_version}.tar.gz -Source28: %{chrstnormalizer}-%{chrstnormalizer_version}.tar.gz -Source29: %{idna}-%{idna_version}.tar.gz -Source30: %{reqstsoauthlib}-%{reqstsoauthlib_version}.tar.gz -Source31: %{oauthlib}-%{oauthlib_version}.tar.gz -Source32: %{ruamelyaml}-%{ruamelyaml_version}.tar.gz -Source33: %{setuptools}-%{setuptools_version}.tar.gz +Source1200: boto3-1.34.47.tar.gz +Source1201: botocore-1.34.47.tar.gz +Source1202: s3transfer-0.10.0.tar.gz # azure -Source34: requirements-azure.txt -Source35: azure-common-1.1.28.zip -Source36: azure-core-1.24.2.zip -Source37: azure-mgmt-compute-27.2.0.zip -Source38: azure-mgmt-core-1.3.2.zip -Source39: azure-mgmt-network-20.0.0.zip -Source40: azure-identity-1.10.0.zip -Source41: isodate-0.6.1.tar.gz -Source42: msrest-0.7.1.zip -Source43: oauthlib-3.2.2.tar.gz -Source44: PyJWT-2.4.0.tar.gz -Source45: requests-2.27.1.tar.gz -Source46: requests-oauthlib-2.0.0.tar.gz -Source47: msal-1.27.0.tar.gz -Source48: msal-extensions-1.0.0.tar.gz -Source49: portalocker-2.7.0.tar.gz -Source50: cryptography-3.3.2.tar.gz -Source51: cffi-1.15.1.tar.gz -Source52: typing_extensions-4.1.1.tar.gz -## msrestazure specific -Source54: msrestazure-0.6.4.tar.gz -Source55: adal-1.2.7.tar.gz -## required for installation -Source100: setuptools_scm-6.4.2.tar.gz -Source101: packaging-21.2-py3-none-any.whl -Source102: tomli-1.1.0.tar.gz -Source103: pycparser-2.20.tar.gz -Source104: wheel-0.37.1.tar.gz -Source105: pip-21.3.1.tar.gz -## azure -Source106: flit_core-3.10.1.tar.gz -## msrestazure -Source107: poetry-core-1.0.8.tar.gz +Source1300: azure-common-1.1.28.zip +Source1301: azure_core-1.32.0.tar.gz +Source1302: azure_mgmt_core-1.5.0.tar.gz +Source1303: azure_mgmt_compute-34.0.0.tar.gz +Source1304: azure_mgmt_network-28.1.0.tar.gz +Source1305: azure_identity-1.19.0.tar.gz +Source1306: msal-1.31.1.tar.gz +Source1307: msal_extensions-1.2.0.tar.gz +Source1308: msrest-0.7.1.zip +Source1309: msrestazure-0.6.4.post1.tar.gz +Source1310: adal-1.2.7.tar.gz +Source1311: certifi-2025.1.31.tar.gz +Source1312: isodate-0.6.1.tar.gz +Source1313: portalocker-2.10.1.tar.gz +Source1314: pyjwt-2.10.1.tar.gz +# google +Source1400: google-api-python-client-1.12.8.tar.gz +Source1401: chardet-3.0.4.tar.gz +Source1402: google-api-core-1.34.1.tar.gz +Source1403: google-auth-2.28.1.tar.gz +Source1404: google-auth-httplib2-0.2.0.tar.gz +Source1405: httplib2-0.22.0.tar.gz +Source1406: uritemplate-3.0.1.tar.gz +Source1407: cachetools-5.3.2.tar.gz +Source1408: googleapis-common-protos-1.62.0.tar.gz +Source1409: pyasn1-0.5.1.tar.gz +Source1410: pyasn1_modules-0.3.0.tar.gz +Source1411: pyroute2-0.7.12.tar.gz +Source1412: pyroute2.core-0.6.13.tar.gz +Source1413: pyroute2.ethtool-0.6.13.tar.gz +Source1414: pyroute2.ipdb-0.6.13.tar.gz +Source1415: pyroute2.ipset-0.6.13.tar.gz +Source1416: pyroute2.ndb-0.6.13.tar.gz +Source1417: pyroute2.nftables-0.6.13.tar.gz +Source1418: pyroute2.nslink-0.6.13.tar.gz +## NEEEDED FOR GOOGLE AUTH +## INFO: pip is looking at multiple versions of google-auth to determine which version is compatible with other requirements. This could take a while. +## ERROR: Could not find a version that satisfies the requirement rsa<5,>=3.1.4 (from google-auth) (from versions: none) +Source1518: rsa-4.9.tar.gz +# google buildreq +Source1519: poetry_core-1.9.0.tar.gz +# kubevirt +## pip download --no-binary :all: openshift +Source1600: openshift-0.13.2.tar.gz +Source1601: kubernetes-29.0.0.tar.gz +Source1602: python-string-utils-1.0.0.tar.gz +Source1603: websocket-client-1.7.0.tar.gz ### END -Patch0: fence_impilan-fence_ilo_ssh-add-ilo5-support.patch -Patch1: fence_mpath-watchdog-support.patch -Patch2: fence_ilo3-fence_ipmilan-show-correct-default-method.patch -Patch3: fence_evacuate-fix-evacuable-tag-mix-issue.patch -Patch4: fence_compute-fence_evacuate-fix-compute-domain.patch -Patch5: fence_gce-1-stackdriver-logging-default-method-cycle.patch -Patch6: fence_gce-2-filter-aggregatedlist.patch -Patch7: fence_aliyun-1.patch -Patch8: fence_aliyun-2.patch -Patch9: fence_aliyun-3-logging.patch -Patch10: fence_aliyun-4-bundled.patch -Patch11: python3-has_key-fixes.patch -Patch12: fence_kdump-fix-strncpy-issue.patch -Patch13: fix-version.patch -Patch14: fence_gce-3-stackdriver-logging-note.patch -Patch15: fence_aliyun-5-list-instance-names.patch -Patch16: fence_aliyun-6-correct-help-indentation.patch -Patch17: fence_cisco_ucs-encode-POSTFIELDS.patch -Patch18: bz1654968-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch -Patch19: bz1654976-1-fence_scsi-watchdog-retry-support.patch -Patch20: bz1654976-2-build-fix-check_used_options.patch -Patch21: bz1654616-fence_hpblade-fix-log_expect_syntax.patch -Patch22: bz1654973-fence_vmware_soap-cleanup-sigterm.patch -Patch23: bz1650214-fence_azure_arm-bundled.patch -Patch24: bz1666914-1-fence_redfish.patch -Patch25: bz1666914-2-fence_redfish-fail-invalid-cert.patch -Patch26: bz1677327-1-fence_redfish-use-ipport-parameter.patch -Patch27: bz1677327-2-fence_redfish-ip-parameter-backward-compatibility.patch -Patch28: bz1696584-fence_gce-fix-python3-encoding-issue.patch -Patch29: bz1709926-fence_mpath-fix-watchdog-hardreboot.patch -Patch30: bz1709780-fence_rhevm-RHEV-v4-API-support.patch -Patch31: bz1712263-fence_rhevm-1-use-UTF8-encoding.patch -Patch32: bz1712263-fence_rhevm-2-fix-debug-encoding-issues.patch -Patch33: bz1700546-fence_azure_arm-skip_shutdown.patch -Patch34: bz1704228-fence_redfish-full-redfish-spec-compliance.patch -Patch35: bz1714458-fence_scsi-node-id-new-format.patch -Patch36: bz1720198-fence_scsi-watchdog-fix-retry-failing-on-first-try.patch -Patch37: bz1732773-fence_vmware_rest-fix-keyerror-suspended-vms.patch -Patch38: bz1748443-fence_zvmip-python3-fixes.patch -Patch39: bz1732766-fence_aliyun-1-add-RAM-role.patch -Patch40: bz1732766-fence_aliyun-2-import-EcsRamRoleCredential.patch -Patch41: bz1734811-fence_iloX_ssh-monitor-timeout-warning.patch -Patch42: bz1751704-fence_mpath-fix-watchdog-trigger-multipath-disconnect.patch -Patch43: bz1760213-fence_compute-disable-service-after-force-down.patch -Patch44: bz1760201-fence_compute-fence_evacuate-1-fix-region_name-type.patch -Patch45: bz1760224-fence_vmware_rest-improve-logging.patch -Patch46: bz1760201-fence_compute-fence_evacuate-2-fix-project-shortopt.patch -Patch47: bz1769783-fencing-improve-stdin-quote-parsing.patch -Patch48: bz1763674-fence_rhevm-add-cookie-support.patch -Patch49: bz1773890-fence_scsi-add-hash-key-value-support.patch -Patch50: bz1774458-fence_sbd-stderr-support.patch -Patch51: bz1771594-1-fencing-inetX_only-SSH-fence_zvmip.patch -Patch52: bz1771594-2-fence_redfish-fence_vmware_soap-suppress-warning.patch -Patch53: bz1781357-fence_aws-improve-logging-and-metadata-usage-text.patch -Patch54: bz1753228-fence_mpath-1-add-plug-parameter-support.patch -Patch55: bz1753228-fence_mpath-2-fix-plug-parameter-issues.patch -Patch56: bz1798641-fence_mpath-fix-reserve-parameter-typo.patch -Patch57: bz1810457-fence_aws-improve-parameter-logic.patch -Patch58: bz1816203-fence_aws-1-fix-race-condition.patch -Patch59: bz1816203-fence_aws-2-fix-python3-encoding.patch -Patch60: bz1827559-fence_vmware_rest-improve-exception-handling.patch -Patch61: bz1827652-fence_vmware_rest-1-add-filter-parameter.patch -Patch62: bz1827652-fence_vmware_rest-2-fix-1000-VM-monitor-error.patch -Patch63: bz1830776-fence_compute-fence_evacuate-fix-insecure-parameter.patch -Patch64: bz1750596-fence_scsi-add-readonly-parameter.patch -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 -Patch84: bz1925015-fence_ipmilan-add-fence_ipmilanplus.patch -Patch85: bz1920947-fence_redfish-1-add-diag-action.patch -Patch86: bz1941989-fence_aws-add-filter-parameter.patch -Patch87: bz1780825-fencing-1-add-stonith_status_sleep.patch -Patch88: bz1780825-fencing-2-metadata-fix-long-parameters.patch -Patch89: bz1942363-fence_gce-default-to-cycle.patch -Patch90: bz1920947-fence_redfish-2-add-diag-action-logic.patch -Patch91: bz1920947-fence_redfish-3-fix-typo.patch -Patch92: bz1922437-fence_mpath-watchdog-retry-support.patch -Patch93: bz1685814-fence_gce-add-serviceaccount-file-support.patch -Patch94: bz1728203-bz1874862-fence_ibm_vpc-fence_ibm_powervs.patch -Patch95: bz1969953-fence_gce-1-add-proxy-support.patch -Patch96: bz1969953-fence_gce-2-bundled.patch -Patch97: bz1470827-all-agents-log-exceptions-fail.patch -Patch98: bz2010710-1-fence_amt_ws-fix-or-dead-code.patch -Patch99: bz2010710-2-fence_amt_ws-boot-option.patch -Patch100: bz1969953-fence_gce-3-fix-httplib2-import.patch -Patch101: bz1971683-fence_sbd-dont-spam-logs-disable-timeout.patch -Patch102: bz1977588-1-fencing-add-EC_FETCH_VM_UUID.patch -Patch103: bz1977588-2-fence_kubevirt.patch -Patch104: bz1977588-3-fence_kubevirt-fix-status.patch -Patch105: bz1977588-4-fence_kubevirt-power-timeout-40s.patch -Patch106: bz1963163-fence_zvmip-add-ssl-tls-support.patch -Patch107: bz1977588-5-fence_kubevirt-get-namespace-from-context.patch -Patch108: bz2048857-fence_aws-botocore-bundled.patch -Patch109: bz1886074-1-fencing-source_env.patch -Patch110: bz1886074-2-fence_openstack.patch -Patch111: bz2072421-1-all-agents-unify-ssl-parameters.patch -Patch112: bz2078244-fence_gce-update.patch -Patch113: bz2080994-fence_ibm_vpc-fix-parameters.patch -Patch114: bz2080729-1-fence_apc-fence_ilo_moonshot-import-logging.patch -Patch115: bz2080729-2-fence_lpar-fix-import-fail_usage.patch -Patch116: bz2072421-2-fence_zvmip-connect-error.patch -Patch117: bz2091826-fence_ibm_vpc-add-proxy-support.patch -Patch118: bz2092921-fence_ibm_powervs-proxy-private-api-servers.patch -Patch119: bz1886074-4-fencing-source_env-dont-process-empty-lines.patch -Patch120: bz1787178-1-fence_vmware_soap-set-timeout-cleanup-tmp-dirs.patch -Patch121: bz1787178-2-fence_vmware_soap-login-timeout-15s.patch -Patch122: bz2102024-fence_ibm_vpc-add-token-cache-support.patch -Patch123: bz2134017-fence_lpar-only-output-additional-info-on-debug.patch -Patch124: bz2136076-fence_ibm_powervs-improve-defaults.patch -Patch125: bz2160478-fence_scsi-fix-validate-all.patch -Patch126: bz2152105-fencing-1-add-plug_separator.patch -Patch127: bz2152105-fencing-2-update-DEPENDENCY_OPT.patch -Patch128: bz2183158-fence_aws-1-add-skip-race-check-parameter.patch -Patch129: bz2183158-fence_aws-2-fail-when-power-action-request-fails.patch -Patch130: bz2187329-fence_scsi-1-detect-devices-in-shared-vgs.patch -Patch131: bz2187329-fence_scsi-2-support-space-separated-devices.patch -Patch132: bz2211460-fence_azure-arm-1-stack-hub-support.patch -Patch133: bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch -Patch134: bz2155453-fence_ibm_powervs-performance-improvements.patch -Patch135: RHEL-14343-fence_zvmip-1-document-user-permissions.patch -Patch136: RHEL-14031-1-all-agents-metadata-update-IO-Power-Network.patch -Patch137: RHEL-14031-2-fence_cisco_mds-undo-metadata-change.patch -Patch138: RHEL-5397-fence_scsi-1-fix-ISID-reg-handling.patch -Patch139: RHEL-5397-fence_scsi-2-fix-ISID-reg-handling-off.patch -Patch140: RHEL-5397-fence_scsi-3-fix-run_cmd.patch -Patch141: RHEL-5397-4-fence_scsi-log-err.patch -Patch142: RHEL-14343-fence_zvmip-2-fix-manpage-formatting.patch -Patch143: RHEL-7734-fence_eps-add-fence_epsr2-for-ePowerSwitch-R2-and-newer.patch -Patch144: RHEL-56840-fence_scsi-only-preempt-once-for-mpath-devices.patch -Patch145: RHEL-76492-fence_azure_arm-use-azure-identity.patch -Patch146: RHEL-65025-fence_ibm_powervs-add-private-endpoint-and-token-file-support.patch +Patch0: build-pythonpath.patch +Patch1: RHEL-76495-fence_azure_arm-use-azure-identity.patch +Patch2: ha-cloud-support-aliyun.patch +Patch3: ha-cloud-support-aws.patch +Patch4: ha-cloud-support-azure.patch +Patch5: ha-cloud-support-google.patch +Patch6: bundled-kubevirt.patch +Patch7: bundled-pycurl.patch +Patch8: bundled-suds.patch +Patch9: RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch -### HA support libs/utils ### -# all archs -Patch1000: bz2218234-1-kubevirt-fix-bundled-dateutil-CVE-2007-4559.patch -Patch1001: RHEL-22174-kubevirt-fix-bundled-jinja2-CVE-2024-22195.patch -Patch1002: RHEL-35655-kubevirt-fix-bundled-jinja2-CVE-2024-34064.patch -Patch1003: RHEL-43568-1-kubevirt-fix-bundled-urllib3-CVE-2024-37891.patch -Patch1004: RHEL-50223-setuptools-fix-CVE-2024-6345.patch -# cloud (x86_64 only) -Patch2000: bz2218234-2-aws-fix-bundled-dateutil-CVE-2007-4559.patch -Patch2001: RHEL-43568-2-aws-fix-bundled-urllib3-CVE-2024-37891.patch - -%if 0%{?fedora} || 0%{?rhel} > 7 -%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hds_cb hpblade ibmblade ibm_powervs ibm_vpc ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump kubevirt lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti +%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs drac5 eaton_snmp emerson eps hpblade ibmblade ibm_powervs ibm_vpc ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump kubevirt lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti %ifarch x86_64 -%global testagents virsh heuristics_ping aliyun aws azure_arm gce openstack +%global testagents virsh heuristics_ping aliyun aws azure_arm gce openstack virt %endif %ifarch ppc64le %global testagents virsh heuristics_ping openstack @@ -343,6 +122,7 @@ Patch2001: RHEL-43568-2-aws-fix-bundled-urllib3-CVE-2024-37891.patch %global testagents virsh heuristics_ping %endif +# skipped: pve, raritan, rcd-serial, virsh %global allfenceagents %(cat < /dev/null 2>&1 ||: +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%preun +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable fence_virtd.service &> /dev/null || : + /bin/systemctl stop fence_virtd.service &> /dev/null || : +fi + +%postun +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd +/bin/systemctl daemon-reload &> /dev/null || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart fence_virtd.service &> /dev/null || : +fi + +%triggerun -- fence_virtd < 0.3.0-1 +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Packages_migrating_to_a_systemd_unit_file_from_a_SysV_initscript +/usr/bin/systemd-sysv-convert --save fence_virtd &> /dev/null || : +/sbin/chkconfig --del fence_virtd &> /dev/null || : +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +/bin/systemctl try-restart fence_virtd.service &> /dev/null || : %description A collection of executables to handle isolation ("fencing") of possibly @@ -696,11 +355,11 @@ network, storage, or similar. They operate through a unified interface (calling conventions) devised for the original Red Hat clustering solution. %package common -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND MIT Summary: Common base for Fence Agents -Requires: python3-pexpect python3-pycurl -BuildArch: noarch +Requires: python3-pexpect python3-ptyprocess +Provides: bundled(python3-pycurl) = 7.45.3 +Provides: bundled(python3-suds-community) = 1.1.2 %description common A collection of executables to handle isolation ("fencing") of possibly misbehaving hosts by the means of remote power management, blocking @@ -712,11 +371,10 @@ This package contains support files including the Python fencing library. %{_datadir}/fence %exclude %{_datadir}/fence/azure_fence.* %exclude %{_datadir}/fence/__pycache__/azure_fence.* -%exclude %{_datadir}/fence/XenAPI.* -%exclude %{_datadir}/fence/__pycache__/XenAPI.* %{_datadir}/cluster %exclude %{_datadir}/cluster/fence_mpath_check* %exclude %{_datadir}/cluster/fence_scsi_check* +%{_datadir}/pkgconfig/%{name}.pc %exclude %{_sbindir}/* %exclude %{_mandir}/man8/* %if %{defined _tmpfilesdir} @@ -727,23 +385,85 @@ This package contains support files including the Python fencing library. %else %dir %attr (1755, root, root) %{_var}/run/%{name} %endif +%dir %{_usr}/lib/%{name} +%{_usr}/lib/%{name}/support/common/lib* +%exclude %{_usr}/lib/%{name}/support/common/share + +%ifarch x86_64 +%package -n ha-cloud-support +License: GPL-2.0-or-later AND LGPL-2.0-or-later AND Apache-2.0 AND MIT AND BSD-2-Clause AND BSD-3-Clause AND MPL-2.0 AND LGPL-2.1-or-later AND ISC +Summary: Support libraries for HA Cloud agents +Requires: python3-colorama python3-docutils python3-pyyaml python3-jmespath python3-pyasn1 python3-dateutil python3-urllib3 python3-six python3-cryptography python3-cffi python3-requests python3-requests-oauthlib python3-typing-extensions python3-packaging python3-charset-normalizer python3-idna python3-oauthlib python3-pycparser python3-protobuf python3-pyparsing +Requires: awscli2 +# aliyun +Provides: bundled(python3-aliyun-python-sdk-ecs) = 4.24.71 +Provides: bundled(python3-aliyun-python-sdk-core) = 2.14.0 +Provides: bundled(python3-jmespath) = 0.10.0 +Provides: bundled(aliyun-cli) = 3.0.198 +Provides: bundled(aliyun-openapi-meta) = 5cf98b660 +# aws +Provides: bundled(python3-boto3) = 1.34.47 +Provides: bundled(python3-botocore) = 1.34.47 +Provides: bundled(python3-s3transfer) = 0.10.0 +# azure +Provides: bundled(python3-azure-common) = 1.1.28 +Provides: bundled(python3-azure-core) = 1.32.0 +Provides: bundled(python3-azure-mgmt-core) = 1.5.0 +Provides: bundled(python3-azure-mgmt-compute) = 34.0.0 +Provides: bundled(python3-azure-mgmt-network) = 28.1.0 +Provides: bundled(python3-azure-identity) = 1.19.0 +Provides: bundled(python3-msal) = 1.31.1 +Provides: bundled(python3-msal-extensions) = 1.2.0 +Provides: bundled(python3-msrest) = 0.7.1 +Provides: bundled(python3-msrestazure) = 0.6.4.post1 +Provides: bundled(python3-adal) = 1.2.7 +Provides: bundled(python3-certifi) = 2025.1.31 +Provides: bundled(python3-isodate) = 0.6.1 +Provides: bundled(python3-portalocker) = 2.10.1 +Provides: bundled(python3-PyJWT) = 2.10.1 +# google +Provides: bundled(python3-google-api-python-client) = 1.12.8 +Provides: bundled(python3-chardet) = 3.0.4 +Provides: bundled(python3-google-api-core) = 1.34.1 +Provides: bundled(python3-google-auth) = 2.28.1 +Provides: bundled(python3-google-auth-httplib2) = 0.2.0 +Provides: bundled(python3-httplib2) = 0.22.0 +Provides: bundled(python3-uritemplate) = 3.0.1 +Provides: bundled(python3-cachetools) = 5.3.2 +Provides: bundled(python3-googleapis-common-protos) = 1.62.0 +Provides: bundled(python3-pyasn1) = 0.5.1 +Provides: bundled(python3-pyasn1_modules) = 0.3.0 +Provides: bundled(python-pyroute2) = 0.7.12 +Provides: bundled(python-pyroute2-core) = 0.6.13 +Provides: bundled(python-pyroute2-ethtool) = 0.6.13 +Provides: bundled(python-pyroute2-ipdb) = 0.6.13 +Provides: bundled(python-pyroute2-ipset) = 0.6.13 +Provides: bundled(python-pyroute2-ndb) = 0.6.13 +Provides: bundled(python-pyroute2-nftables) = 0.6.13 +Provides: bundled(python-pyroute2-nslink) = 0.6.13 +Provides: bundled(python3-rsa) = 4.9 +%description -n ha-cloud-support +Support libraries for Fence Agents. +%files -n ha-cloud-support +%dir %{_usr}/lib/%{name} +%{_usr}/lib/%{name}/support/*/lib +%{_usr}/lib/%{name}/support/aliyun/aliyun-cli +%exclude %{_usr}/lib/%{name}/support/common +%exclude %{_usr}/lib/%{name}/support/kubevirt +%endif %package all -License: GPLv2+ and LGPLv2+ and ASL 2.0 -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later AND Apache-2.0 Summary: Set of unified programs capable of host isolation ("fencing") -Requires: %(echo "%{allfenceagents}" | sed "s/\( \|$\)/ >= %{version}-%{release}\1/g") -%ifarch i686 x86_64 -Requires: fence-virt -%endif +Requires: %{allfenceagents} %ifarch ppc64le Requires: fence-agents-lpar >= %{version}-%{release} %endif %ifarch s390x Requires: fence-agents-zvm >= %{version}-%{release} %endif -Provides: %{name} >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Provides: fence-agents = %{version}-%{release} +Obsoletes: fence-agents < 3.1.13 %description all A collection of executables to handle isolation ("fencing") of possibly misbehaving hosts by the means of remote power management, blocking @@ -754,62 +474,45 @@ This package serves as a catch-all for all supported fence agents. %ifarch x86_64 %package aliyun -License: GPLv2+ and LGPLv2+ and ASL 2.0 and BSD and MIT +License: GPL-2.0-or-later AND LGPL-2.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT Group: System Environment/Base Summary: Fence agent for Alibaba Cloud (Aliyun) Requires: fence-agents-common >= %{version}-%{release} +Requires: ha-cloud-support = %{version}-%{release} Requires: python3-jmespath >= 0.9.0 -# python-pycryptodome bundle -Provides: bundled(python-%{pycryptodome}) = %{pycryptodome_version} -# python-aliyun-sdk-core bundle -Provides: bundled(python-aliyun-sdk-core) = %{aliyunsdkcore_version} -# python-aliyun-sdk-ecs bundle -Provides: bundled(python-aliyun-sdk-ecs) = %{aliyunsdkecs_version} -# python-aliyun-sdk-vpc bundle -Provides: bundled(python-aliyun-sdk-vpc) = %{aliyunsdkvpc_version} Obsoletes: %{name} < %{version}-%{release} %description aliyun The fence-agents-aliyun package contains a fence agent for Alibaba Cloud (Aliyun) instances. %files aliyun %defattr(-,root,root,-) -# bundled libraries -%doc pycryptodome_README.rst aliyun*_README* -%license pycryptodome_LICENSE.rst %{_sbindir}/fence_aliyun %{_mandir}/man8/fence_aliyun.8* -# bundled libraries -/usr/lib/fence-agents/%{bundled_lib_dir}/aliyun %endif %package amt-ws -License: ASL 2.0 -Group: System Environment/Base +License: Apache-2.0 Summary: Fence agent for Intel AMT (WS-Man) devices -Requires: fence-agents-common >= %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} +%if 0%{?fedora} || 0%{?centos} || 0%{?rhel} Requires: openwsman-python3 -Obsoletes: %{name} < %{version}-%{release} +%else +Requires: python3-openwsman +%endif BuildArch: noarch %description amt-ws -The fence-agents-amt-ws package contains a fence agent for AMT (WS-Man) devices. +Fence agent for AMT (WS-Man) devices. %files amt-ws -%defattr(-,root,root,-) %{_sbindir}/fence_amt_ws %{_mandir}/man8/fence_amt_ws.8* %package apc -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for APC devices 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description apc Fence agent for APC devices that are accessed via telnet or SSH. @@ -818,109 +521,59 @@ Fence agent for APC devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_apc.8* %package apc-snmp -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agents for APC devices (SNMP) Requires: net-snmp-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description apc-snmp Fence agents for APC devices that are accessed via the SNMP protocol. %files apc-snmp %{_sbindir}/fence_apc_snmp %{_mandir}/man8/fence_apc_snmp.8* +%{_sbindir}/fence_tripplite_snmp +%{_mandir}/man8/fence_tripplite_snmp.8* %ifarch x86_64 %package aws -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Amazon AWS -Requires: fence-agents-common >= %{version}-%{release} -Requires: python3-boto3 -Provides: bundled(python3-%{botocore}) = %{botocore_version} -Provides: bundled(python3-%{urllib3}) = %{urllib3_version} -Provides: bundled(python3-%{requests}) = %{requests_version} -Provides: bundled(python3-%{certifi}) = %{certifi_version} -Provides: bundled(python3-%{chrstnormalizer}) = %{chrstnormalizer_version} -Provides: bundled(python3-%{idna}) = %{idna_version} -Provides: bundled(python3-%{chardet}) = %{chardet_version} -Provides: bundled(python3-%{dateutil}) = %{dateutil_version} -Provides: bundled(python3-%{six}) = %{six_version} -Provides: bundled(python3-%{jmespath}) = %{jmespath_version} -Obsoletes: %{name} < %{version}-%{release} -BuildArch: noarch +Requires: fence-agents-common = %{version}-%{release} +Requires: ha-cloud-support = %{version}-%{release} +Obsoletes: fence-agents < 3.1.13 %description aws Fence agent for Amazon AWS instances. %files aws %{_sbindir}/fence_aws %{_mandir}/man8/fence_aws.8* -# bundled libraries -/usr/lib/fence-agents/%{bundled_lib_dir}/aws %endif %ifarch x86_64 %package azure-arm -License: GPLv2+ and LGPLv2+ and MIT and MPL-2.0 and Apache-2.0 and BSD and PSF-2.0 and BSD-3-Clause and ISC -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Azure Resource Manager -Requires: fence-agents-common >= %{version}-%{release} -# azure -Provides: bundled(python3-adal) = 1.2.7 -Provides: bundled(python3-azure-common) = 1.1.28 -Provides: bundled(python3-azure-core) = 1.24.2 -Provides: bundled(python3-azure-identity) = 1.10.0 -Provides: bundled(python3-azure-mgmt-compute) = 27.2.0 -Provides: bundled(python3-azure-mgmt-core) = 1.3.2 -Provides: bundled(python3-azure-mgmt-network) = 20.0.0 -Provides: bundled(python3-certifi) = 2023.7.22 -Provides: bundled(python3-cffi) = 1.15.1 -Provides: bundled(python3-charset-normalizer) = 2.0.7 -Provides: bundled(python3-cryptography) = 3.3.2 -Provides: bundled(python3-%{dateutil}) = %{dateutil_version} -Provides: bundled(python3-%{idna}) = %{idna_version} -Provides: bundled(python3-isodate) = 0.6.1 -Provides: bundled(python3-msal) = 1.27.0 -Provides: bundled(python3-msal-extensions) = 1.0.0 -Provides: bundled(python3-msrest) = 0.7.1 -Provides: bundled(python3-msrestazure) = 0.6.4 -Provides: bundled(python3-oauthlib) = 3.2.2 -Provides: bundled(python3-portalocker) = 2.7.0 -Provides: bundled(python3-pycparser) = 2.20 -Provides: bundled(python3-PyJWT) = 2.4.0 -Provides: bundled(python3-requests) = 2.27.1 -Provides: bundled(python3-requests-oauthlib) = 2.0.0 -Provides: bundled(python3-six) = 1.16.0 -Provides: bundled(python3-typing-extensions) = 4.1.1 -Provides: bundled(python3-urllib3) = 1.26.18 -Obsoletes: %{name} < %{version}-%{release} -Provides: python3-azure-sdk = 4.0.0-10 -Obsoletes: python3-azure-sdk < 4.0.0-10 +Requires: fence-agents-common = %{version}-%{release} +Requires: ha-cloud-support = %{version}-%{release} +Obsoletes: fence-agents < 3.1.13 %description azure-arm Fence agent for Azure Resource Manager instances. %files azure-arm %{_sbindir}/fence_azure_arm %{_datadir}/fence/azure_fence.py* +%if 0%{?fedora} || 0%{?centos} || 0%{?rhel} %{_datadir}/fence/__pycache__/azure_fence.* +%endif %{_mandir}/man8/fence_azure_arm.8* -# bundled libraries -/usr/lib/fence-agents/%{bundled_lib_dir}/azure %endif %package bladecenter -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM BladeCenter 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description bladecenter Fence agent for IBM BladeCenter devices that are accessed @@ -930,19 +583,13 @@ via telnet or SSH. %{_mandir}/man8/fence_bladecenter.8* %package brocade -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Brocade switches 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description brocade Fence agent for Brocade devices that are accessed via telnet or SSH. @@ -951,12 +598,10 @@ Fence agent for Brocade devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_brocade.8* %package cisco-mds -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Cisco MDS 9000 series Requires: net-snmp-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description cisco-mds Fence agent for Cisco MDS 9000 series devices that are accessed @@ -966,12 +611,9 @@ via the SNMP protocol. %{_mandir}/man8/fence_cisco_mds.8* %package cisco-ucs -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Cisco UCS series -Requires: python3-pycurl -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description cisco-ucs Fence agent for Cisco UCS series devices that are accessed @@ -980,36 +622,14 @@ via the SNMP protocol. %{_sbindir}/fence_cisco_ucs %{_mandir}/man8/fence_cisco_ucs.8* -%package compute -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base -Summary: Fence agent for Nova compute nodes -Requires: python3-requests -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} -BuildArch: noarch -%description compute -Fence agent for Nova compute nodes. -%files compute -%{_sbindir}/fence_compute -%{_sbindir}/fence_evacuate -%{_mandir}/man8/fence_compute.8* -%{_mandir}/man8/fence_evacuate.8* - %package drac5 -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Dell DRAC 5 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description drac5 Fence agent for Dell DRAC 5 series devices that are accessed @@ -1019,12 +639,10 @@ via telnet or SSH. %{_mandir}/man8/fence_drac5.8* %package eaton-snmp -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Eaton network power switches Requires: net-snmp-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description eaton-snmp Fence agent for Eaton network power switches that are accessed @@ -1034,11 +652,9 @@ via the SNMP protocol. %{_mandir}/man8/fence_eaton_snmp.8* %package emerson -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Emerson devices (SNMP) -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description emerson Fence agent for Emerson devices that are accessed via @@ -1048,11 +664,9 @@ the SNMP protocol. %{_mandir}/man8/fence_emerson.8* %package eps -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for ePowerSwitch 8M+ power switches -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description eps Fence agent for ePowerSwitch 8M+ power switches that are accessed @@ -1063,32 +677,24 @@ via the HTTP(s) protocol. %ifarch x86_64 %package gce -License: GPLv2+ and LGPLv2+ and MIT -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for GCE (Google Cloud Engine) -Requires: fence-agents-common >= %{version}-%{release} -Requires: python3-google-api-client -Requires: python3-pysocks -# google cloud -Provides: bundled(python-httplib2) = %{httplib2_version} -Obsoletes: %{name} < %{version}-%{release} -BuildArch: noarch +Requires: fence-agents-common = %{version}-%{release} +Requires: ha-cloud-support = %{version}-%{release} +Obsoletes: fence-agents < 3.1.13 %description gce Fence agent for GCE (Google Cloud Engine) instances. %files gce %{_sbindir}/fence_gce %{_mandir}/man8/fence_gce.8* -# bundled libraries -/usr/lib/fence-agents/%{bundled_lib_dir}/google %endif %package heuristics-ping -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Pseudo fence agent to affect other agents based on ping-heuristics -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch +Obsoletes: fence-agents < 3.1.13 %description heuristics-ping Fence pseudo agent used to affect other agents based on ping-heuristics. @@ -1097,19 +703,13 @@ ping-heuristics. %{_mandir}/man8/fence_heuristics_ping.8* %package hpblade -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for HP BladeSystem devices 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description hpblade Fence agent for HP BladeSystem devices that are accessed via telnet @@ -1119,12 +719,10 @@ or SSH. %{_mandir}/man8/fence_hpblade.8* %package ibmblade -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM BladeCenter Requires: net-snmp-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description ibmblade Fence agent for IBM BladeCenter devices that are accessed @@ -1134,8 +732,7 @@ via the SNMP protocol. %{_mandir}/man8/fence_ibmblade.8* %package ibm-powervs -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM PowerVS Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -1146,8 +743,7 @@ Fence agent for IBM PowerVS that are accessed via REST API. %{_mandir}/man8/fence_ibm_powervs.8* %package ibm-vpc -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM Cloud VPC Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -1158,12 +754,10 @@ Fence agent for IBM Cloud VPC that are accessed via REST API. %{_mandir}/man8/fence_ibm_vpc.8* %package ifmib -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for devices with IF-MIB interfaces Requires: net-snmp-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description ifmib Fence agent for IF-MIB interfaces that are accessed via @@ -1173,12 +767,10 @@ the SNMP protocol. %{_mandir}/man8/fence_ifmib.8* %package ilo2 -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agents for HP iLO2 devices Requires: gnutls-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description ilo2 Fence agents for HP iLO2 devices that are accessed via @@ -1190,19 +782,13 @@ the HTTP(s) protocol. %{_mandir}/man8/fence_ilo2.8* %package ilo-moonshot -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for HP iLO Moonshot devices 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description ilo-moonshot Fence agent for HP iLO Moonshot devices that are accessed @@ -1212,20 +798,13 @@ via telnet or SSH. %{_mandir}/man8/fence_ilo_moonshot.8* %package ilo-mp -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for HP iLO MP devices 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 %description ilo-mp Fence agent for HP iLO MP devices that are accessed via telnet or SSH. @@ -1234,12 +813,10 @@ Fence agent for HP iLO MP devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_ilo_mp.8* %package ilo-ssh -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agents for HP iLO devices over SSH Requires: openssh-clients -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description ilo-ssh Fence agents for HP iLO devices that are accessed via telnet or SSH. @@ -1254,12 +831,10 @@ Fence agents for HP iLO devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_ilo5_ssh.8* %package intelmodular -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for devices with Intel Modular interfaces Requires: net-snmp-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description intelmodular Fence agent for Intel Modular interfaces that are accessed @@ -1269,12 +844,10 @@ via the SNMP protocol. %{_mandir}/man8/fence_intelmodular.8* %package ipdu -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM iPDU network power switches Requires: net-snmp-utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description ipdu Fence agent for IBM iPDU network power switches that are accessed @@ -1284,12 +857,10 @@ via the SNMP protocol. %{_mandir}/man8/fence_ipdu.8* %package ipmilan -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agents for devices with IPMI interface Requires: /usr/bin/ipmitool -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description ipmilan Fence agents for devices with IPMI interface. @@ -1310,11 +881,9 @@ Fence agents for devices with IPMI interface. %{_mandir}/man8/fence_imm.8* %package kdump -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for use with kdump crash recovery service -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} # this cannot be noarch since it's compiled %description kdump Fence agent for use with kdump crash recovery service. @@ -1325,54 +894,31 @@ Fence agent for use with kdump crash recovery service. %{_mandir}/man8/fence_kdump_send.8* %package kubevirt -License: GPLv2+ and LGPLv2+ and ASL 2.0 and BSD and BSD-2-Clause and BSD-3-Clause and ISC and MIT and MPL-2.0 +License: GPL-2.0-or-later AND LGPL-2.0-or-later AND Apache-2.0 AND MIT Summary: Fence agent for KubeVirt platform Requires: fence-agents-common = %{version}-%{release} -Provides: bundled(python3-%{openshift}) = %{openshift_version} -Provides: bundled(python3-%{ruamelyamlclib}) = %{ruamelyamlclib_version} -Provides: bundled(python3-%{kubernetes}) = %{kubernetes_version} -Provides: bundled(python3-%{certifi}) = %{certifi_version} -Provides: bundled(python3-%{googleauth}) = %{googleauth_version} -Provides: bundled(python3-%{cachetools}) = %{cachetools_version} -Provides: bundled(python3-%{pyasn1modules}) = %{pyasn1modules_version} -Provides: bundled(python3-%{pyasn1}) = %{pyasn1_version} -Provides: bundled(python3-%{dateutil}) = %{dateutil_version} -Provides: bundled(python3-%{pyyaml}) = %{pyyaml_version} -Provides: bundled(python3-%{six}) = %{six_version} -Provides: bundled(python3-%{urllib3}) = %{urllib3_version} -Provides: bundled(python3-%{websocketclient}) = %{websocketclient_version} -Provides: bundled(python3-%{jinja2}) = %{jinja2_version} -Provides: bundled(python3-%{markupsafe}) = %{markupsafe_version} -Provides: bundled(python3-%{stringutils}) = %{stringutils_version} -Provides: bundled(python3-%{requests}) = %{requests_version} -Provides: bundled(python3-%{chrstnormalizer}) = %{chrstnormalizer_version} -Provides: bundled(python3-%{idna}) = %{idna_version} -Provides: bundled(python3-%{reqstsoauthlib}) = %{reqstsoauthlib_version} -Provides: bundled(python3-%{oauthlib}) = %{oauthlib_version} -Provides: bundled(python3-%{ruamelyaml}) = %{ruamelyaml_version} -Provides: bundled(python3-%{setuptools}) = %{setuptools_version} +Requires: python3-pyyaml python3-pyasn1 python3-dateutil python3-urllib3 python3-six python3-requests python3-requests-oauthlib python3-charset-normalizer python3-oauthlib +Provides: bundled(python3-openshift) = 0.13.2 +Provides: bundled(python3-kubernetes) = 29.0.0 +Provides: bundled(python3-python-string-utils) = 1.0.0 +Provides: bundled(python3-websocket-client) = 1.7.0 %description kubevirt Fence agent for KubeVirt platform. %files kubevirt %{_sbindir}/fence_kubevirt %{_mandir}/man8/fence_kubevirt.8* # bundled libraries -/usr/lib/fence-agents/%{bundled_lib_dir}/kubevirt +%{_usr}/lib/%{name}/support/kubevirt/lib +%exclude %{_usr}/lib/%{name}/support/kubevirt/README %package lpar -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM LPAR 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description lpar Fence agent for IBM LPAR devices that are accessed via telnet or SSH. @@ -1381,12 +927,10 @@ Fence agent for IBM LPAR devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_lpar.8* %package mpath -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for reservations over Device Mapper Multipath Requires: device-mapper-multipath -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description mpath Fence agent for SCSI persistent reservation over @@ -1398,14 +942,11 @@ Device Mapper Multipath. %ifarch x86_64 ppc64le %package openstack -License: GPLv2+ and LGPLv2+ and ASL 2.0 and MIT and Python +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for OpenStack's Nova service -%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} Requires: python3-requests -%else -Requires: python-requests -%endif Requires: fence-agents-common = %{version}-%{release} +Obsoletes: ha-openstack-support <= %{version}-%{release} %description openstack Fence agent for OpenStack's Nova service. %files openstack @@ -1414,12 +955,12 @@ Fence agent for OpenStack's Nova service. %endif %package redfish -License: GPLv2+ and LGPLv2+ +License: GPL-2.0-or-later AND LGPL-2.0-or-later Group: System Environment/Base Summary: Fence agent for Redfish Requires: fence-agents-common >= %{version}-%{release} Requires: python3-requests -Obsoletes: %{name} < %{version}-%{release} +Obsoletes: fence-agents < 3.1.13 %description redfish The fence-agents-redfish package contains a fence agent for Redfish %files redfish @@ -1428,11 +969,9 @@ The fence-agents-redfish package contains a fence agent for Redfish %{_mandir}/man8/fence_redfish.8* %package rhevm -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for RHEV-M -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description rhevm Fence agent for RHEV-M via REST API. @@ -1440,21 +979,14 @@ Fence agent for RHEV-M via REST API. %{_sbindir}/fence_rhevm %{_mandir}/man8/fence_rhevm.8* -%if 0%{?fedora} || 0%{?rhel} > 7 %package rsa -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM RSA II 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description rsa Fence agent for IBM RSA II devices that are accessed @@ -1462,22 +994,15 @@ via telnet or SSH. %files rsa %{_sbindir}/fence_rsa %{_mandir}/man8/fence_rsa.8* -%endif %package rsb -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for Fujitsu RSB 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description rsb Fence agent for Fujitsu RSB devices that are accessed @@ -1486,29 +1011,23 @@ via telnet or SSH. %{_sbindir}/fence_rsb %{_mandir}/man8/fence_rsb.8* -%if 0%{?fedora} || 0%{?rhel} > 7 %package sbd -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for SBD (storage-based death) Requires: sbd -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description sbd Fence agent for SBD (storage-based death). %files sbd %{_sbindir}/fence_sbd %{_mandir}/man8/fence_sbd.8* -%endif %package scsi -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for SCSI persistent reservations Requires: sg3_utils -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description scsi Fence agent for SCSI persistent reservations. @@ -1518,13 +1037,12 @@ Fence agent for SCSI persistent reservations. %{_datadir}/cluster/fence_scsi_check_hardreboot %{_mandir}/man8/fence_scsi.8* +# skipped from allfenceagents %package virsh -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for virtual machines based on libvirt Requires: openssh-clients /usr/bin/virsh -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description virsh Fence agent for virtual machines that are accessed via SSH. @@ -1533,12 +1051,11 @@ Fence agent for virtual machines that are accessed via SSH. %{_mandir}/man8/fence_virsh.8* %package vmware-rest -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for VMWare with REST API -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch +Obsoletes: fence-agents < 3.1.13 %description vmware-rest Fence agent for VMWare with REST API. %files vmware-rest @@ -1546,12 +1063,9 @@ Fence agent for VMWare with REST API. %{_mandir}/man8/fence_vmware_rest.8* %package vmware-soap -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for VMWare with SOAP API v4.1+ -Requires: python3-suds python3-requests -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description vmware-soap Fence agent for VMWare with SOAP API v4.1+. @@ -1560,19 +1074,13 @@ Fence agent for VMWare with SOAP API v4.1+. %{_mandir}/man8/fence_vmware_soap.8* %package wti -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for WTI Network power switches 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} +Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch %description wti Fence agent for WTI network power switches that are accessed @@ -1583,12 +1091,9 @@ via telnet or SSH. %ifarch s390x %package zvm -License: GPLv2+ and LGPLv2+ -Group: System Environment/Base +License: GPL-2.0-or-later AND LGPL-2.0-or-later Summary: Fence agent for IBM z/VM over IP -Requires: fence-agents-common >= %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} -BuildArch: noarch +Requires: fence-agents-common = %{version}-%{release} %description zvm Fence agent for IBM z/VM over IP. %files zvm @@ -1596,584 +1101,139 @@ Fence agent for IBM z/VM over IP. %{_mandir}/man8/fence_zvmip.8* %endif -%changelog -* Fri Apr 25 2025 Oyvind Albrigtsen - 4.2.1-129.8 -- fence_ibm_powervs: add private endpoint and token file support - Resolves: RHEL-65025 +# fence-virt -* Thu Jan 30 2025 Oyvind Albrigtsen - 4.2.1-129.7 +%ifarch x86_64 +%package -n fence-virt +Summary: A pluggable fencing framework for virtual machines +Requires(post): systemd-sysv %{systemd_units} +Requires(preun): %{systemd_units} +Requires(postun): %{systemd_units} +%description -n fence-virt +Fencing agent for virtual machines. +%files -n fence-virt +%doc agents/virt/docs/* +%{_sbindir}/fence_virt +%{_sbindir}/fence_xvm +%{_mandir}/man8/fence_virt.* +%{_mandir}/man8/fence_xvm.* + +%package -n fence-virtd +Summary: Daemon which handles requests from fence-virt +%description -n fence-virtd +This package provides the host server framework, fence_virtd, +for fence_virt. The fence_virtd host daemon is resposible for +processing fencing requests from virtual machines and routing +the requests to the appropriate physical machine for action. +%files -n fence-virtd +%{_sbindir}/fence_virtd +%{_unitdir}/fence_virtd.service +%config(noreplace) %{_sysconfdir}/fence_virt.conf +%dir %{_libdir}/fence-virt +%{_libdir}/fence-virt/vsock.so +%{_mandir}/man5/fence_virt.conf.* +%{_mandir}/man8/fence_virtd.* + +%package -n fence-virtd-multicast +Summary: Multicast listener for fence-virtd +Requires: fence-virtd +%description -n fence-virtd-multicast +Provides multicast listener capability for fence-virtd. +%files -n fence-virtd-multicast +%{_libdir}/fence-virt/multicast.so + +%package -n fence-virtd-serial +Summary: Serial VMChannel listener for fence-virtd +Requires: libvirt >= 0.6.2 +Requires: fence-virtd +%description -n fence-virtd-serial +Provides serial VMChannel listener capability for fence-virtd. +%files -n fence-virtd-serial +%{_libdir}/fence-virt/serial.so + +%package -n fence-virtd-tcp +Summary: TCP listener for fence-virtd +Requires: fence-virtd +%description -n fence-virtd-tcp +Provides TCP listener capability for fence-virtd. +%files -n fence-virtd-tcp +%{_libdir}/fence-virt/tcp.so + +%package -n fence-virtd-libvirt +Summary: Libvirt backend for fence-virtd +Requires: libvirt >= 0.6.0 +Requires: fence-virtd +%description -n fence-virtd-libvirt +Provides fence_virtd with a connection to libvirt to fence +virtual machines. Useful for running a cluster of virtual +machines on a desktop. +%files -n fence-virtd-libvirt +%{_libdir}/fence-virt/virt.so + +%package -n fence-virtd-cpg +Summary: CPG/libvirt backend for fence-virtd +Requires: corosynclib +Requires: fence-virtd +%description -n fence-virtd-cpg +Provides fence_virtd with a connection to libvirt to fence +virtual machines. Uses corosync CPG to keep track of VM +locations to allow for non-local VMs to be fenced when VMs +are located on corosync cluster nodes. +%files -n fence-virtd-cpg +%{_libdir}/fence-virt/cpg.so +%endif + +%changelog +* Thu Aug 7 2025 David Sloboda - 4.16.0-5.3 +- fence_ibm_vpc: refresh bearer-token if token data is corrupt, and + avoid edge-case of writing empty token file + Resolves: RHEL-83520 + +* Mon Feb 3 2025 Oyvind Albrigtsen - 4.16.0-5 - fence_azure_arm: use azure-identity instead of msrestazure, which has been deprecated - Resolves: RHEL-76492 + Resolves: RHEL-76495 -* Tue Sep 24 2024 Oyvind Albrigtsen - 4.2.1-129.5 -- fence_scsi: preempt clears all devices on the mpath device, so only - run it for the first device - Resolves: RHEL-56840 +* Tue Nov 26 2024 Oyvind Albrigtsen - 4.16.0-2 +- Move fence-agents to AppStream + Resolves: RHEL-68842 -* Wed Jul 24 2024 Oyvind Albrigtsen - 4.2.1-129.4 -- bundled setuptools: fix CVE-2024-6345 - Resolves: RHEL-50223 - -* Tue Jun 25 2024 Oyvind Albrigtsen - 4.2.1-129.3 -- bundled urllib3: fix CVE-2024-37891 - Resolves: RHEL-43568 - -* Thu May 30 2024 Oyvind Albrigtsen - 4.2.1-129.2 -- fence_eps: add fence_epsr2 for ePowerSwitch R2 and newer - Resolves: RHEL-7734 -- bundled jinja2: fix CVE-2024-34064 - Resolves: RHEL-35655 - -* Fri Jan 19 2024 Oyvind Albrigtsen - 4.2.1-129 -- bundled urllib3: fix CVE-2023-45803 - Resolves: RHEL-18132 -- bundled pycryptodome: fix CVE-2023-52323 - Resolves: RHEL-20915 -- bundled jinja2: fix CVE-2024-22195 - Resolves: RHEL-22174 - -* Wed Jan 3 2024 Oyvind Albrigtsen - 4.2.1-127 -- fence_scsi: fix registration handling if ISID conflicts - Resolves: RHEL-5397 -- fence_zvmip: document required user permissions in metadata/manpage - Resolves: RHEL-14343 - -* Mon Oct 23 2023 Oyvind Albrigtsen - 4.2.1-125 -- all agents: update metadata in non-I/O agents to Power or Network - fencing - Resolves: RHEL-14031 - -* Thu Oct 12 2023 Oyvind Albrigtsen - 4.2.1-123 -- bundled urllib3: fix CVE-2023-43804 - Resolves: RHEL-11988 - -* Tue Sep 26 2023 Oyvind Albrigtsen - 4.2.1-122 -- bundled certifi: fix CVE-2023-37920 - Resolves: RHEL-6972 - -* Thu Aug 3 2023 Oyvind Albrigtsen - 4.2.1-121 -- bundled dateutil: fix tarfile CVE-2007-4559 - Resolves: rhbz#2218234 - -* Tue Jul 11 2023 Oyvind Albrigtsen - 4.2.1-119 -- fence_ibm_powervs: performance improvements - Resolves: rhbz#2155453 - -* Mon Jul 3 2023 Oyvind Albrigtsen - 4.2.1-118 -- fence_azure_arm: add Stack Hub support - Resolves: rhbz#2211460 - -* Thu May 4 2023 Oyvind Albrigtsen - 4.2.1-115 -- fence_scsi: detect devices in shared VGs - Resolves: rhbz#2187329 - -* Wed May 3 2023 Oyvind Albrigtsen - 4.2.1-114 -- fence_aws: add --skip-race-check parameter to allow running outside - of AWS network - Resolves: rhbz#2183158 - -* Thu Jan 26 2023 Oyvind Albrigtsen - 4.2.1-112 -- fence_vmware_soap: set login_timeout lower than default - pcmk_monitor_timeout (20s) to remove tmp dirs - Resolves: rhbz#1787178 - -* Wed Jan 25 2023 Oyvind Albrigtsen - 4.2.1-111 -- fencing/fence_wti: add --plug-separator to be able to avoid - characters that are in node name(s) - Resolves: rhbz#2152105 - -* Fri Jan 13 2023 Oyvind Albrigtsen - 4.2.1-110 -- fence_scsi: skip key generation during validate-all action - Resolves: rhbz#2160478 - -* Thu Oct 27 2022 Oyvind Albrigtsen - 4.2.1-108 -- fence_ibm_powervs: improve defaults - Resolves: rhbz#2136076 - -* Wed Oct 12 2022 Oyvind Albrigtsen - 4.2.1-107 -- fence_lpar: only output additional output info on DEBUG level - Resolves: rhbz#2134017 - -* Mon Sep 5 2022 Oyvind Albrigtsen - 4.2.1-106 -- fence_ibm_vpc: add token cache support - Resolves: rhbz#2102024 - -* Tue Aug 16 2022 Oyvind Albrigtsen - 4.2.1-103 -- fence_openstack: new fence agent - Resolves: rhbz#1886074 - -* Wed Jun 22 2022 Oyvind Albrigtsen - 4.2.1-99 -- fence_ibm_powervs: add support for proxy, private API servers and - get token via API key - Resolves: rhbz#2092921 - -* Tue Jun 7 2022 Oyvind Albrigtsen - 4.2.1-98 -- fence_ibm_vpc: add proxy support - Resolves: rhbz#2091826 - -* Tue May 31 2022 Oyvind Albrigtsen - 4.2.1-96 -- all agents: unify ssl parameters to avoid having to use --ssl when - using --ssl-secure/--ssl-insecure for some agents - Resolves: rhbz#2072421 - -* Tue May 17 2022 Oyvind Albrigtsen - 4.2.1-95 -- fence_apc/fence_ilo_moonshot/fence_lpar: add missing "import logging" - Resolves: rhbz#2080729 - -* Thu May 5 2022 Oyvind Albrigtsen - 4.2.1-94 -- fence_ibm_vpc: remove unused instance parameter and make limit - optional - Resolves: rhbz#2080994 - -* Thu Apr 28 2022 Oyvind Albrigtsen - 4.2.1-93 -- fence_gce: update fence agent - Resolves: rhbz#2078244 - -* Wed Apr 27 2022 Oyvind Albrigtsen - 4.2.1-92 -- fence_ibm_vpc: new fence agent - Resolves: rhbz#1728203 - -* Fri Feb 11 2022 Oyvind Albrigtsen - 4.2.1-88 -- fence_aws: upgrade botocore to fix IMDSv2 support - Resolves: rhbz#2048857 - -* Wed Jan 19 2022 Oyvind Albrigtsen - 4.2.1-85 -- fence_ibm_powervs: new fence agent - Resolves: rhbz#1874862 - -* Mon Jan 17 2022 Oyvind Albrigtsen - 4.2.1-84 -- fence_kubevirt: new fence agent - Resolves: rhbz#1977588 - -* Thu Nov 11 2021 Oyvind Albrigtsen - 4.2.1-83 -- fence_zvmip: add SSL/TLS support - Resolves: rhbz#1963163 - -* Tue Nov 2 2021 Oyvind Albrigtsen - 4.2.1-80 -- fence_sbd: dont spam logs when disable_timeout is enabled - Resolves: rhbz#1971683 - -* Wed Oct 27 2021 Oyvind Albrigtsen - 4.2.1-79 -- fence_amt_ws: fix "or" causing dead code - Resolves: rhbz#2010710 -- fence_gce: add proxy support - Resolves: rhbz#1969953 - -* Tue Oct 19 2021 Oyvind Albrigtsen - 4.2.1-78 -- all agents: log exceptions when failing - Resolves: rhbz#1470827 - -* Wed Aug 11 2021 Oyvind Albrigtsen - 4.2.1-75 -- fence_gce: add serviceaccount JSON file support - Resolves: rhbz#1685814 - -* Thu May 20 2021 Oyvind Albrigtsen - 4.2.1-72 -- fence_mpath: add watchdog retry support - Resolves: rhbz#1922437 - -* Fri May 7 2021 Oyvind Albrigtsen - 4.2.1-71 -- fence_redfish: add diag action - Resolves: rhbz#1920947 - -* Thu May 6 2021 Oyvind Albrigtsen - 4.2.1-70 -- fence_gce: change default back to cycle to avoid "soft" off - Resolves: rhbz#1942363 - -* Tue May 4 2021 Oyvind Albrigtsen - 4.2.1-69 -- fencing: add "stonith_status_sleep" parameter to set sleep between - status calls during STONITH action - Resolves: rhbz#1780825 - -* Fri Apr 30 2021 Oyvind Albrigtsen - 4.2.1-68 -- fence_aws: add "filter" parameter - Resolves: rhbz#1941989 - -* Wed Mar 3 2021 Oyvind Albrigtsen - 4.2.1-67 -- fence_ipmilanplus: new symlink agent with lanplus enabled by default - Resolves: rhbz#1925015 - -* 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 - -* Wed May 27 2020 Oyvind Albrigtsen - 4.2.1-49 -- fence_aws: improve logging by catching ConnectionError exception - Resolves: rhbz#1839776 - -* 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 - Resolves: rhbz#1827652 -- fence_compute/fence_evacuate: fix --insecure parameter - Resolves: rhbz#1830776 -- fence_scsi: add readonly parameter - Resolves: rhbz#1750596 - -* Tue Apr 28 2020 Oyvind Albrigtsen - 4.2.1-45 -- fence_vmware_rest: improve exception handling - Resolves: rhbz#1827559 - -* Tue Mar 24 2020 Oyvind Albrigtsen - 4.2.1-44 -- fence_aws: fix possible race condition - - Resolves: rhbz#1816203 - -* Fri Mar 13 2020 Oyvind Albrigtsen - 4.2.1-42 -- fence-agents-lpar: build on non-ppc64le arch's - Resolves: rhbz#1804907 -- fence_aws: improve parameter logic to allow setting region parameter - while using credentials from ~/.aws/config - Resolves: rhbz#1810457 - -* Thu Feb 13 2020 Oyvind Albrigtsen - 4.2.1-41 -- fence_mpath: add plug parameter support to be able to use pcmk_host_map - Resolves: rhbz#1753228 -- fence_mpath: fix --reserve parameter typo - Resolves: rhbz#1798641 - -* Fri Jan 31 2020 Oyvind Albrigtsen - 4.2.1-40 -- fence_aws: improve logging and metadata/usage text - Resolves: rhbz#1781357 - -* Tue Nov 26 2019 Oyvind Albrigtsen - 4.2.1-39 -- fencing: only use inetX_only parameters for SSH based agents and - fence_zvmip - Resolves: rhbz#1771594 - -* Wed Nov 20 2019 Oyvind Albrigtsen - 4.2.1-38 -- fence_sbd: add stderr support - Resolves: rhbz#1774458 - -* Tue Nov 19 2019 Oyvind Albrigtsen - 4.2.1-37 -- fence_scsi: add hash key-value support - Resolves: rhbz#1773890 - -* Wed Nov 13 2019 Oyvind Albrigtsen - 4.2.1-35 -- fence_rhevm: add cookie support - Resolves: rhbz#1763674 - -* Thu Nov 7 2019 Oyvind Albrigtsen - 4.2.1-34 -- fence_compute/fence_evacuate: fix region_name content type and - project shortopt in usage text and project-domain shortopt - Resolves: rhbz#1760201 -- fencing: improve stdin quote parsing - Resolves: rhbz#1769783 - -* Fri Oct 18 2019 Oyvind Albrigtsen - 4.2.1-33 -- fence_vmware_rest: improve logging - Resolves: rhbz#1760224 - -* Wed Oct 16 2019 Oyvind Albrigtsen - 4.2.1-32 -- fence_compute: disable service after force-down - Resolves: rhbz#1760213 - -* Thu Oct 3 2019 Oyvind Albrigtsen - 4.2.1-31 -- fence_aliyun: add RAM role support - Resolves: rhbz#1732766 -- fence_ilo4_ssh/fence_ilo5_ssh: add monitor timeout warning - Resolves: rhbz#1734811 -- fence_mpath: fix watchdog reboot not triggered when multipath - disconnected - Resolves: rhbz#1751704 - -* Fri Sep 6 2019 Oyvind Albrigtsen - 4.2.1-30 -- fence_zvmip: fix Python 3 issues - Resolves: rhbz#1748443 - -* Thu Jul 25 2019 Oyvind Albrigtsen - 4.2.1-29 -- fence_vmware_rest: fix KeyError issue for suspended VMs - Resolves: rhbz#1732773 - -* Wed Jul 24 2019 Oyvind Albrigtsen - 4.2.1-28 -- fence_mpath: fix watchdog hardreboot - Resolves: rhbz#1709926 - -* Thu Jun 13 2019 Oyvind Albrigtsen - 4.2.1-27 -- fence_scsi watchdog: fix failing on first try when using retry - Resolves: rhbz#1720198 - -* Tue May 28 2019 Oyvind Albrigtsen - 4.2.1-25 -- fence_redfish: add header for full Redfish spec compliance - Resolves: rhbz#1704228 -- fence_scsi: fix to match new node ID format - Resolves: rhbz#1714458 - -* Thu May 23 2019 Oyvind Albrigtsen - 4.2.1-24 -- fence_azure_arm: use skip_shutdown feature - Resolves: rhbz#1700546 - -* Tue May 21 2019 Oyvind Albrigtsen - 4.2.1-23 -- fence_rhevm: add RHEV v4 API support and auto-detection - Resolves: rhbz#1709780 -- fence_rhevm: fix encoding issues - Resolves: rhbz#1712263 - -* Fri Apr 5 2019 Oyvind Albrigtsen - 4.2.1-22 -- fence_gce: fix Python 3 encoding issue - Resolves: rhbz#1696584 - -* Mon Apr 1 2019 Oyvind Albrigtsen - 4.2.1-21 -- Add CI gating tests - Resolves: rhbz#1682125 - -* Fri Mar 22 2019 Oyvind Albrigtsen - 4.2.1-20 -- fence_aliyun: upgrade python-aliyun-sdk-core to fix httplib issue - Resolves: rhbz#1677945 - -* Tue Mar 19 2019 Oyvind Albrigtsen - 4.2.1-18 -- fence_redfish: use ipport parameter - Resolves: rhbz#1677327 - -* Fri Feb 8 2019 Oyvind Albrigtsen - 4.2.1-17 -- fence-agents-vmware-soap: add missing python3-requests dependency - Resolves: rhbz#1591502 - -* Mon Jan 28 2019 Oyvind Albrigtsen - 4.2.1-16 -- fence_redfish: new fence agent - Resolves: rhbz#1666914 - -* Fri Jan 25 2019 Oyvind Albrigtsen - 4.2.1-13 -- fence-agents-scsi: add missing fence-agents-common dependency - Resolves: rhbz#1665170 -- fence_azure_arm: add bundled directory to search path - Resolves: rhbz#1650214 - -* Fri Dec 7 2018 Oyvind Albrigtsen - 4.2.1-11 -- fence_scsi: fix incorrect SCSI-key when node ID is 10 or higher - Resolves: rhbz#1654968 -- fence_scsi: add watchdog retry support - Resolves: rhbz#1654976 -- fence_hpblade: fix log_expect syntax - Resolves: rhbz#1654616 -- fence_vmware_soap: cleanup when receiving SIGTERM - Resolves: rhbz#1654973 - -* Mon Oct 8 2018 Oyvind Albrigtsen - 4.2.1-10 -- spec-file improvements by Jan Pokorny -- fence_aliyun: bundled libraries - Resolves: rhbz#1625208 - -* Tue Aug 14 2018 Oyvind Albrigtsen - 4.2.1-7 -- fence_kdump: fix strncpy issue - -* Wed Jul 11 2018 Oyvind Albrigtsen - 4.2.1-6 -- fence_evacuate: fix evacuable tag mix issue - -* Wed Jul 4 2018 Oyvind Albrigtsen - 4.2.1-5 -- Use %{__python3} macro to set correct Python #! - -* Mon Jun 18 2018 Oyvind Albrigtsen - 4.2.1-4 -- fence_vmware_soap: fix python3-suds issue -- Remove unsupported agents - -* Mon Jun 11 2018 Oyvind Albrigtsen - 4.2.1-2 -- Remove fence-agents-amt due to missing amtterm - -* Thu May 31 2018 Oyvind Albrigtsen - 4.2.1-1 +* Mon Nov 25 2024 Oyvind Albrigtsen - 4.16.0-1 - new upstream release + Resolves: RHEL-65332 +- ha-cloud-support: add awscli2 dependency + Resolves: RHEL-60021 +- fence_bladecenter fix SyntaxWarning: invalid escape sequence '\s' + Resolves: RHEL-57063 +- build: remove python-poetry-core BuildRequires + Resolves: RHEL-60893 -* Thu May 17 2018 Oyvind Albrigtsen - 4.2.0-1 +* Tue Oct 29 2024 Troy Dawson - 4.15.0-2 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Tue Jul 2 2024 Oyvind Albrigtsen - 4.15.0-1 - new upstream release + Resolves: RHEL-45835 -* Thu Feb 15 2018 Oyvind Albrigtsen - 4.1.1-1 +* Mon Jun 24 2024 Troy Dawson - 4.13.1-8 +- Bump release for June 2024 mass rebuild + +* Wed May 15 2024 Oyvind Albrigtsen - 4.13.1-7 +- lib/all agents: use r"" to avoid SyntaxWarnings + Resolves: RHEL-35663 +- fix pycurl bundled path + Resolves: RHEL-35986 + +* Mon Apr 15 2024 Oyvind Albrigtsen - 4.13.1-6 +- Bundled missing libraries + Resolves: RHEL-25954 + +* Wed Jan 24 2024 Fedora Release Engineering - 4.13.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 4.13.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Oct 17 2023 Oyvind Albrigtsen - 4.13.1-1 - new upstream release -- fence_vmware_soap / fence_ovh: use Python 2 till python3-suds bug - is fixed - -* Fri Feb 9 2018 Oyvind Albrigtsen - 4.1.0-2 -- new upstream release - -* Wed Feb 07 2018 Fedora Release Engineering - 4.0.24-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jan 11 2018 Iryna Shcherbina - 4.0.24-14 -- Cleanup no longer needed Python 2 dependencies - -* Tue Nov 07 2017 Troy Dawson - 4.0.24-13 -- Cleanup spec file conditionals - -* Tue Aug 29 2017 Oyvind Albrigtsen - 4.0.24-12 -- fence-agents-common: remove fence_scsi_check files -- fence-scsi: add "fence_scsi_check_hardreboot" - -* Thu Aug 3 2017 Oyvind Albrigtsen - 4.0.24-10 -- fence_zvm: fix "uintptr_t" undeclared - -* Thu Aug 3 2017 Oyvind Albrigtsen - 4.0.24-9 -- Fix encoding for pexpect with Python 3.6 - - Resolves: rhbz#1473908 - -* Wed Aug 02 2017 Fedora Release Engineering - 4.0.24-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 4.0.24-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 4.0.24-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Dec 23 2016 Oyvind Albrigtsen - 4.0.24-5 -- Fix to build in Python 3 only environment - -* Mon Dec 19 2016 Miro Hrončok - 4.0.24-4 -- Rebuild for Python 3.6 - -* Wed Sep 21 2016 Marek Grac - 4.0.24-4 -- Remove Obsoletes that are no longer valid - -* Fri Sep 2 2016 Oyvind Albrigtsen - 4.0.24-2 -- fence-agents-common: add dependency on python3-pycurl - -* Fri Aug 26 2016 Oyvind Albrigtsen - 4.0.24-1 -- new upstream release - -* Wed Jul 13 2016 Oyvind Albrigtsen - 4.0.23-2 -- fix build issue on s390 - -* Tue Jul 12 2016 Oyvind Albrigtsen - 4.0.23-1 -- new upstream release -- new package fence-agents-amt-ws -- new package fence-agents-compute -- new package fence-agents-drac -- new package fence-agents-hds-cb -- new package fence-agents-mpath -- new package fence-agents-sanbox2 -- new package fence-agents-sbd -- new package fence-agents-vbox -- new package fence-agents-vmware -- new package fence-agents-xenapi - -* Wed Feb 03 2016 Fedora Release Engineering - 4.0.20-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Aug 11 2015 Marek Grac - 4.0.20-1 -- new upstream release -- new package fence-agents-rcd-serial - -* Wed Jun 17 2015 Fedora Release Engineering - 4.0.16-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Mar 05 2015 Marek Grac - 4.0.16-1 -- new upstream release - -* Mon Feb 09 2015 Marek Grac - 4.0.15-1 -- new upstream release - -* Thu Jan 08 2015 Marek Grac - 4.0.14-1 -- new upstream release -- new packages fence-agents-zvm and fence-agents-emerson - -* Thu Oct 16 2014 Marek Grac - 4.0.12-1 -- new upstream release -- new package fence-agents-ilo-ssh - -* Wed Aug 27 2014 Marek Grac - 4.0.10 -- new upstream release -- new package fence-agents-ilo-moonshot - -* Sat Jun 07 2014 Fedora Release Engineering - 4.0.9-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri May 16 2014 Marek Grac - 4.0.9 -- new upstream release -- new package fence-agents-pve - -* Mon Apr 07 2014 Marek Grac - 4.0.8-1 -- new upstream release -- new package fence-agents-raritan - -* Wed Feb 26 2014 Marek Grac - 4.0.7-3 -- requires a specific version of fence-agents-common - -* Mon Feb 17 2014 Marek Grac - 4.0.7-2 -- new upstream release -- changed dependancy from nss/nspr to gnutls-utils - -* Fri Jan 10 2014 Marek Grac - 4.0.4-4 -- new upstream release -- new package fence-agents-amt - -* Mon Oct 07 2013 Marek Grac - 4.0.4-3 -- new upstream release -- new package fence-agents-netio - -* Tue Sep 03 2013 Marek Grac - 4.0.3-1 -- new upstream release -- new packages fence-agents-brocade and fence-agents-ovh - -* Sat Aug 03 2013 Fedora Release Engineering - 4.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Jul 18 2013 Petr Pisar - 4.0.1-2 -- Perl 5.18 rebuild - -* Mon Jul 01 2013 Marek Grac - 4.0.1-1 -- new upstream release - -* Mon Jun 24 2013 Marek Grac - 4.0.0-5 -- fence-agents-all should provide fence-agent for clean update path - -* Wed Apr 03 2013 Marek Grac - 4.0.0-4 -- minor changes in spec file - -* Thu Mar 21 2013 Marek Grac - 4.0.0-3 -- minor changes in spec file - -* Mon Mar 18 2013 Marek Grac - 4.0.0-2 -- minor changes in spec file - -* Mon Mar 11 2013 Marek Grac - 4.0.0-1 -- new upstream release -- introducing subpackages - -