- fence_openstack: add support for reading config from clouds.yaml

and openrc
  Resolves: rhbz#2041933, rhbz#2041935
This commit is contained in:
Oyvind Albrigtsen 2022-08-15 12:47:52 +02:00
parent 6a75d52e40
commit 1f88c1653b
2 changed files with 30 additions and 6 deletions

View File

@ -0,0 +1,22 @@
From fbca33a536413565108374dd4ed3237b6f7896bd Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
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

View File

@ -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 <oalbrigt@redhat.com> - 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 <oalbrigt@redhat.com> - 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 <oalbrigt@redhat.com> - 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 <oalbrigt@redhat.com> - 4.10.0-15
- fence_kubevirt: new fence agent
Resolves: rhbz#2000954