import OL fence-agents-4.10.0-86.el9_6.9
This commit is contained in:
parent
1f3a30156c
commit
c4c85b947a
@ -0,0 +1,50 @@
|
||||
From 9460728b18c648e390390d888ac856628366a521 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Thu, 7 Aug 2025 14:53:30 +0200
|
||||
Subject: [PATCH] fence_ibm_vpc: add apikey file support
|
||||
|
||||
---
|
||||
agents/ibm_vpc/fence_ibm_vpc.py | 23 ++++++++++++++++++++++-
|
||||
1 file changed, 22 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py
|
||||
index efda5eed7..a87e9e6dc 100755
|
||||
--- a/agents/ibm_vpc/fence_ibm_vpc.py
|
||||
+++ b/agents/ibm_vpc/fence_ibm_vpc.py
|
||||
@@ -7,7 +7,7 @@
|
||||
import hashlib
|
||||
sys.path.append("@FENCEAGENTSLIBDIR@")
|
||||
from fencing import *
|
||||
-from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS, EC_GENERIC_ERROR
|
||||
+from fencing import fail, run_delay, EC_BAD_ARGS, EC_LOGIN_DENIED, EC_STATUS, EC_GENERIC_ERROR
|
||||
|
||||
state = {
|
||||
"running": "on",
|
||||
@@ -315,6 +315,27 @@ def main():
|
||||
####
|
||||
run_delay(options)
|
||||
|
||||
+ if options["--apikey"][0] == '@':
|
||||
+ key_file = options["--apikey"][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'
|
||||
+ options["--apikey"] = keys.get("Apikey", "")
|
||||
+ if not options["--apikey"]:
|
||||
+ # backward compatibility: former key name was 'apikey'
|
||||
+ options["--apikey"] = keys.get("apikey", "")
|
||||
+ # data is text, return as is
|
||||
+ except ValueError:
|
||||
+ f.seek(0)
|
||||
+ options["--apikey"] = f.read().strip()
|
||||
+ except FileNotFoundError:
|
||||
+ logging.error("Failed: Cannot open file {}".format(key_file))
|
||||
+ sys.exit(EC_BAD_ARGS)
|
||||
+
|
||||
conn = connect(options)
|
||||
atexit.register(disconnect, conn)
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
Name: fence-agents
|
||||
Summary: Set of unified programs capable of host isolation ("fencing")
|
||||
Version: 4.10.0
|
||||
Release: 86%{?alphatag:.%{alphatag}}%{?dist}.8
|
||||
Release: 86%{?alphatag:.%{alphatag}}%{?dist}.9
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/fence-agents
|
||||
Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz
|
||||
@ -247,6 +247,7 @@ Patch62: RHEL-76493-fence_azure_arm-use-azure-identity.patch
|
||||
Patch63: RHEL-83488-fence_ibm_vpc-refresh-bearer-token.patch
|
||||
Patch64: RHEL-92695-1-fence_sbd-improve-error-handling.patch
|
||||
Patch65: RHEL-92695-2-fence_sbd-get-devices-from-SBD_DEVICE-if-devices-parameter-isnt-set.patch
|
||||
Patch66: RHEL-107529-fence_ibm_vpc-add-apikey-file-support.patch
|
||||
|
||||
### HA support libs/utils ###
|
||||
# all archs
|
||||
@ -434,6 +435,7 @@ BuildRequires: %{systemd_units}
|
||||
%patch -p1 -P 63
|
||||
%patch -p1 -P 64
|
||||
%patch -p1 -P 65
|
||||
%patch -p1 -P 66
|
||||
|
||||
# prevent compilation of something that won't get used anyway
|
||||
sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
|
||||
@ -1541,6 +1543,10 @@ are located on corosync cluster nodes.
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Aug 12 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-86.9
|
||||
- fence_ibm_vpc: add apikey file support
|
||||
Resolves: RHEL-107529
|
||||
|
||||
* Thu Jul 17 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-86.8
|
||||
- bundled setuptools: fix CVE-2025-47273
|
||||
Resolves: RHEL-95903
|
||||
|
||||
Loading…
Reference in New Issue
Block a user