From 1f88c1653bec59f5c229e93e943d1b5d6fd0a3ef Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Mon, 15 Aug 2022 12:47:52 +0200 Subject: [PATCH] - fence_openstack: add support for reading config from clouds.yaml and openrc Resolves: rhbz#2041933, rhbz#2041935 --- ...-source_env-dont-process-empty-lines.patch | 22 +++++++++++++++++++ fence-agents.spec | 14 +++++++----- 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 bz2041933-bz2041935-3-fencing-source_env-dont-process-empty-lines.patch diff --git a/bz2041933-bz2041935-3-fencing-source_env-dont-process-empty-lines.patch b/bz2041933-bz2041935-3-fencing-source_env-dont-process-empty-lines.patch new file mode 100644 index 0000000..8803895 --- /dev/null +++ b/bz2041933-bz2041935-3-fencing-source_env-dont-process-empty-lines.patch @@ -0,0 +1,22 @@ +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/fence-agents.spec b/fence-agents.spec index bcc2029..c73f108 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -59,7 +59,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.10.0 -Release: 28%{?alphatag:.%{alphatag}}%{?dist} +Release: 29%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/fence-agents Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz @@ -242,6 +242,7 @@ Patch25: bz2072420-2-fence_zvmip-connect-error.patch Patch26: bz2092385-fence_ibm_vpc-add-proxy-support.patch Patch27: bz2093216-fence_ibm_powervs-proxy-private-api-servers.patch Patch28: bz2087176-fence_sbd-improve-error-handling.patch +Patch29: bz2041933-bz2041935-3-fencing-source_env-dont-process-empty-lines.patch %global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate 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 @@ -381,6 +382,7 @@ BuildRequires: %{systemd_units} %patch26 -p1 %patch27 -p1 %patch28 -p1 +%patch29 -p1 # prevent compilation of something that won't get used anyway sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac @@ -1472,6 +1474,11 @@ are located on corosync cluster nodes. %endif %changelog +* Mon Aug 15 2022 Oyvind Albrigtsen - 4.10.0-29 +- fence_openstack: add support for reading config from clouds.yaml + and openrc + Resolves: rhbz#2041933, rhbz#2041935 + * Mon Aug 1 2022 Oyvind Albrigtsen - 4.10.0-28 - fence_sbd: improve error handling Resolves: rhbz#2087176 @@ -1523,11 +1530,6 @@ are located on corosync cluster nodes. - fence_ibm_powervs: new fence agent Resolves: rhbz#2042496 -* Wed Jan 19 2022 Oyvind Albrigtsen - 4.10.0-16 -- fence_openstack: add support for reading config from clouds.yaml - and openrc - Resolves: rhbz#2041933, rhbz#2041935 - * Mon Jan 17 2022 Oyvind Albrigtsen - 4.10.0-15 - fence_kubevirt: new fence agent Resolves: rhbz#2000954