diff --git a/0001-fix-fail_usage-issue.patch b/0001-fix-fail_usage-issue.patch deleted file mode 100644 index f72d380c0ad5890cedb5cbfb1cefcf6b1dbf80d3..0000000000000000000000000000000000000000 --- a/0001-fix-fail_usage-issue.patch +++ /dev/null @@ -1,77 +0,0 @@ -From ed3ce39ac322edc0c764c8347aab79efcd6785ce Mon Sep 17 00:00:00 2001 -From: wubijie -Date: Tue, 22 Aug 2023 19:08:34 +0800 -Subject: [PATCH] fix fail_usage() issue - ---- - agents/openstack/fence_openstack.py | 11 ++++++----- - tests/data/metadata/fence_openstack.xml | 6 +++--- - 2 files changed, 9 insertions(+), 8 deletions(-) - -diff --git a/agents/openstack/fence_openstack.py b/agents/openstack/fence_openstack.py -index 5257ec5..1a1218c 100755 ---- a/agents/openstack/fence_openstack.py -+++ b/agents/openstack/fence_openstack.py -@@ -114,7 +114,7 @@ def define_new_opts(): - "longopt" : "uuid", - "help" : "--uuid=[uuid] Replaced by -n, --plug", - "required" : "0", -- "shortdesc" : "Replaced by port", -+ "shortdesc" : "Replaced by port/-n/--plug", - "order": 1 - } - -@@ -126,6 +126,7 @@ def main(): - "port", "no_port", "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." - -@@ -138,10 +139,10 @@ def main(): - if "--uuid" in options: - options["--plug"] = options["--uuid"] - del options["--uuid"] -- 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 OpenStack's Nova service" - docs["longdesc"] = "fence_openstack is a Fencing agent \ -diff --git a/tests/data/metadata/fence_openstack.xml b/tests/data/metadata/fence_openstack.xml -index a7b2594..3a799f4 100644 ---- a/tests/data/metadata/fence_openstack.xml -+++ b/tests/data/metadata/fence_openstack.xml -@@ -43,12 +43,12 @@ - - Script to run to retrieve password - -- -+ - - - UUID of the node to be fenced. - -- -+ - - - UUID of the node to be fenced. -@@ -91,7 +91,7 @@ - - - -- Replaced by port -+ Replaced by port/-n/--plig - - - --- -2.33.0 - diff --git a/fence-agents-4.12.1.tar.gz b/fence-agents-4.12.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b44ed12e6387bf4cb1129c74124ab778b53b5c29 Binary files /dev/null and b/fence-agents-4.12.1.tar.gz differ diff --git a/fence-agents.spec b/fence-agents.spec index edb3c274db322c2e246c206eaddd0962f76094b0..acaaefaf365dee181beaeb1b0e29ff25ba69b820 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -5,36 +5,42 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") -Version: 4.5.0 -Release: 3 +Version: 4.12.1 +Release: 1 License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents -Source0: https://github.com/ClusterLabs/fence-agents/archive/v4.5.0.tar.gz +Source0: https://github.com/ClusterLabs/fence-agents/archive//v%{version}/%{name}-%{version}.tar.gz -Patch0: fix-fail_usage-issue-and-a-couple-of-other-minor-iss.patch -Patch1: 0001-fix-fail_usage-issue.patch +# skipped: pve, raritan, rcd-serial, virsh %global allfenceagents %(cat < /dev/null 2>&1 ||: +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%preun +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 +/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 +/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 @@ -141,9 +200,19 @@ This package contains support files including the Python fencing library. %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} +%{_tmpfilesdir}/%{name}.conf +%endif +%if %{defined _tmpfilesdir} +%dir %attr (1755, root, root) /run/%{name} +%else +%dir %attr (1755, root, root) %{_var}/run/%{name} +%endif %package all License: GPLv2+, LGPLv2+ and ASL 2.0 @@ -160,6 +229,22 @@ network, storage, or similar. This package serves as a catch-all for all supported fence agents. %files all +%ifarch x86_64 +%package aliyun +License: GPLv2+ and LGPLv2+ +Group: System Environment/Base +Summary: Fence agent for Alibaba Cloud (Aliyun) +Requires: fence-agents-common >= %{version}-%{release} +Requires: python3-jmespath >= 0.9.0 +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,-) +%{_sbindir}/fence_aliyun +%{_mandir}/man8/fence_aliyun.8* +%endif + %package alom License: GPLv2+ and LGPLv2+ Summary: Fence agent for SUN ALOM @@ -261,6 +346,17 @@ Fence agent for Brocade devices that are accessed via telnet or SSH. %{_sbindir}/fence_brocade %{_mandir}/man8/fence_brocade.8* +%package cdu +License: GPL-3.0-only +Summary: Fence agent for a Sentry Switch CDU +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description cdu +Fence agent for Sentry Switch CDU power switch. +%files cdu +%{_sbindir}/fence_cdu +%{_mandir}/man8/fence_cdu.8* + %package cisco-mds License: GPLv2+ and LGPLv2+ Summary: Fence agent for Cisco MDS 9000 series @@ -287,6 +383,7 @@ via the SNMP protocol. %{_sbindir}/fence_cisco_ucs %{_mandir}/man8/fence_cisco_ucs.8* +%ifarch x86_64 %package compute License: GPLv2+ and LGPLv2+ Summary: Fence agent for Nova compute nodes @@ -300,6 +397,18 @@ Fence agent for Nova compute nodes. %{_sbindir}/fence_evacuate %{_mandir}/man8/fence_compute.8* %{_mandir}/man8/fence_evacuate.8* +%endif + +%package cyberpower-ssh +License: GPLv2+ and LGPLv2+ +Summary: Fence agent for CyberPower network PDUs +Requires: openssh-clients +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description cyberpower-ssh +%files cyberpower-ssh +%{_sbindir}/fence_cyberpower_ssh +%{_mandir}/man8/fence_cyberpower_ssh.8* %package docker License: GPLv2+ and LGPLv2+ @@ -352,6 +461,18 @@ via the SNMP protocol. %{_sbindir}/fence_eaton_snmp %{_mandir}/man8/fence_eaton_snmp.8* +%package ecloud +License: GPLv2+ and LGPLv2+ +Summary: Fence agent for eCloud and eCloud VPC +Requires: python3-requests +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description ecloud +Fence agent for eCloud and eCloud VPC from ANS Group Limited +%files ecloud +%{_sbindir}/fence_ecloud +%{_mandir}/man8/fence_ecloud.8* + %package emerson License: GPLv2+ and LGPLv2+ Summary: Fence agent for Emerson devices (SNMP) @@ -382,7 +503,7 @@ Summary: Fence agent for GCE (Google Cloud Engine) Requires: fence-agents-common = %{version}-%{release} Requires: python3-google-api-client BuildArch: noarch -Obsoletes: fence-agents +Obsoletes: fence-agents < 3.1.13 %description gce Fence agent for GCE (Google Cloud Engine) instances. %files gce @@ -406,7 +527,7 @@ License: GPLv2+ and LGPLv2+ Summary: Pseudo fence agent to affect other agents based on ping-heuristics Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch -Obsoletes: fence-agents +Obsoletes: fence-agents < 3.1.13 %description heuristics-ping Fence pseudo agent used to affect other agents based on ping-heuristics. @@ -440,6 +561,41 @@ via the SNMP protocol. %{_sbindir}/fence_ibmblade %{_mandir}/man8/fence_ibmblade.8* +%package ibmz +License: GPLv2+ and LGPLv2+ +Summary: Fence agent for IBM z LPARs +Requires: python3-requests +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description ibmz +Fence agent for IBM z LPARs that are accessed via the HMC +Web Services REST API. +%files ibmz +%{_sbindir}/fence_ibmz +%{_mandir}/man8/fence_ibmz.8* + +%package ibm-powervs +License: GPLv2+ and LGPLv2+ +Summary: Fence agent for IBM PowerVS +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description ibm-powervs +Fence agent for IBM PowerVS that are accessed via REST API. +%files ibm-powervs +%{_sbindir}/fence_ibm_powervs +%{_mandir}/man8/fence_ibm_powervs.8* + +%package ibm-vpc +License: GPLv2+ and LGPLv2+ +Summary: Fence agent for IBM Cloud VPC +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description ibm-vpc +Fence agent for IBM Cloud VPC that are accessed via REST API. +%files ibm-vpc +%{_sbindir}/fence_ibm_vpc +%{_mandir}/man8/fence_ibm_vpc.8* + %package ifmib License: GPLv2+ and LGPLv2+ Summary: Fence agent for devices with IF-MIB interfaces @@ -556,9 +712,12 @@ Fence agents for devices with IPMI interface. %{_mandir}/man8/fence_ilo4.8* %{_sbindir}/fence_ilo5 %{_mandir}/man8/fence_ilo5.8* +%{_sbindir}/fence_ipmilanplus +%{_mandir}/man8/fence_ipmilanplus.8* %{_sbindir}/fence_imm %{_mandir}/man8/fence_imm.8* +%ifarch x86_64 %package ironic License: GPLv2+ and LGPLv2+ Summary: Fence agent for OpenStack's Ironic (Bare Metal as a service) @@ -569,6 +728,7 @@ Fence agent for OpenStack's Ironic (Bare Metal as a service) service. %files ironic %{_sbindir}/fence_ironic %{_mandir}/man8/fence_ironic.8* +%endif %package kdump License: GPLv2+ and LGPLv2+ @@ -618,6 +778,7 @@ Fence agent for SCSI persistent reservation over Device Mapper Multipath. %files mpath %{_sbindir}/fence_mpath +%{_datadir}/cluster/fence_mpath_check* %{_mandir}/man8/fence_mpath.8* %package netio @@ -688,7 +849,7 @@ Group: System Environment/Base Summary: Fence agent for Redfish Requires: fence-agents-common >= %{version}-%{release} Requires: python3-requests -Obsoletes: fence-agents +Obsoletes: fence-agents < 3.1.13 %description redfish The fence-agents-redfish package contains a fence agent for Redfish %files redfish @@ -868,9 +1029,7 @@ Fence agent for Citrix XenServer accessed over XenAPI. %files xenapi %{_sbindir}/fence_xenapi %{_datadir}/fence/XenAPI.py* -%if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 %{_datadir}/fence/__pycache__/XenAPI.* -%endif %{_mandir}/man8/fence_xenapi.8* %package zvm @@ -884,7 +1043,90 @@ Fence agent for IBM z/VM over IP. %{_sbindir}/fence_zvmip %{_mandir}/man8/fence_zvmip.8* +# fence-virt + +%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 + %changelog +* Tue Feb 27 2024 jiangxinyu - 4.12.1-1 +- Update package to version 4.12.1 + * Thu Aug 24 2023 wubijie - 4.5.0-3 - fence_openstack: fix fail_usage() issue and a couple of other minor issues w/the newly added plug/port parameter diff --git a/fix-fail_usage-issue-and-a-couple-of-other-minor-iss.patch b/fix-fail_usage-issue-and-a-couple-of-other-minor-iss.patch deleted file mode 100644 index 9b9889359ed07feed8c4ede11248617efc775c71..0000000000000000000000000000000000000000 --- a/fix-fail_usage-issue-and-a-couple-of-other-minor-iss.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 44b72f9ee7008e1b37c6be2288106dcd09676938 Mon Sep 17 00:00:00 2001 -From: zhanghan -Date: Wed, 23 Aug 2023 16:14:15 +0800 -Subject: [PATCH] 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 25aeb05..aa56242 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -213,7 +213,7 @@ Each device must support SCSI-3 persistent reservations.", - "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 @@ be removed from the device(s)." - 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 fe9378d..f5e6082 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). - --- -2.33.0 - diff --git a/v4.5.0.tar.gz b/v4.5.0.tar.gz deleted file mode 100644 index 9490a624bffe93838fd4b62b2b804049fbd30ec5..0000000000000000000000000000000000000000 Binary files a/v4.5.0.tar.gz and /dev/null differ