public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fence-agents] eln: new upstream release
@ 2026-10-16 7:44 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-10-16 7:44 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/fence-agents
Branch : eln
Commit : a7f37a7aeb499eba0cebeaf438415e39d55ea270
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-10-14T13:08:49-04:00
Stats : +17/-1820 in 18 file(s)
URL : https://src.fedoraproject.org/rpms/fence-agents/c/a7f37a7aeb499eba0cebeaf438415e39d55ea270?branch=eln
Log:
new upstream release
---
diff --git a/RHEL-107504-fence_ibm_vpc-add-apikey-file-support.patch b/RHEL-107504-fence_ibm_vpc-add-apikey-file-support.patch
deleted file mode 100644
index c8c8102..0000000
--- a/RHEL-107504-fence_ibm_vpc-add-apikey-file-support.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-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)
-
diff --git a/RHEL-114752-fence_ibm_powervs-update-api-type-description.patch b/RHEL-114752-fence_ibm_powervs-update-api-type-description.patch
deleted file mode 100644
index 1a7788c..0000000
--- a/RHEL-114752-fence_ibm_powervs-update-api-type-description.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From f0b9a79b4c17ba3d98cf4dad9e15391595535f90 Mon Sep 17 00:00:00 2001
-From: Oyvind Albrigtsen <oalbrigt@redhat.com>
-Date: Mon, 25 Aug 2025 13:28:59 +0200
-Subject: [PATCH] fence_ibm_powervs: update description of api-type parameter
- to show correct default value
-
----
- agents/ibm_powervs/fence_ibm_powervs.py | 6 +++---
- tests/data/metadata/fence_ibm_powervs.xml | 8 ++++----
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py
-index d408e8727..b4d3bdc32 100755
---- a/agents/ibm_powervs/fence_ibm_powervs.py
-+++ b/agents/ibm_powervs/fence_ibm_powervs.py
-@@ -258,9 +258,10 @@ def define_new_opts():
- all_opt["api-type"] = {
- "getopt" : ":",
- "longopt" : "api-type",
-- "help" : "--api-type=[public|private] API-type: 'public' (default) or 'private'",
-+ "help" : "--api-type=[private|public] API-type: 'private' (default) or 'public'",
- "required" : "0",
-- "shortdesc" : "API-type (public|private)",
-+ "shortdesc" : "API-type (private|public)",
-+ "default" : "private",
- "order" : 0
- }
- all_opt["proxy"] = {
-@@ -293,7 +294,6 @@ def main():
- 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"] = ""
-
- options = check_input(device_opt, process_input(device_opt))
-diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml
-index ec59e1b53..2298d60cd 100644
---- a/tests/data/metadata/fence_ibm_powervs.xml
-+++ b/tests/data/metadata/fence_ibm_powervs.xml
-@@ -4,14 +4,14 @@
- <vendor-url>https://www.ibm.com</vendor-url>
- <parameters>
- <parameter name="api-type" unique="0" required="0" deprecated="1">
-- <getopt mixed="--api-type=[public|private]" />
-+ <getopt mixed="--api-type=[private|public]" />
- <content type="string" default="private" />
-- <shortdesc lang="en">API-type (public|private)</shortdesc>
-+ <shortdesc lang="en">API-type (private|public)</shortdesc>
- </parameter>
- <parameter name="api_type" unique="0" required="0" obsoletes="api-type">
-- <getopt mixed="--api-type=[public|private]" />
-+ <getopt mixed="--api-type=[private|public]" />
- <content type="string" default="private" />
-- <shortdesc lang="en">API-type (public|private)</shortdesc>
-+ <shortdesc lang="en">API-type (private|public)</shortdesc>
- </parameter>
- <parameter name="crn" unique="0" required="1">
- <getopt mixed="--crn=[crn]" />
diff --git a/RHEL-125959-fence_virt-print-errors-to-stderr.patch b/RHEL-125959-fence_virt-print-errors-to-stderr.patch
deleted file mode 100644
index aab29f9..0000000
--- a/RHEL-125959-fence_virt-print-errors-to-stderr.patch
+++ /dev/null
@@ -1,700 +0,0 @@
-From f704caf5b1b608c06149d456b3842d6e83b8d8fa Mon Sep 17 00:00:00 2001
-From: Oyvind Albrigtsen <oalbrigt@redhat.com>
-Date: Tue, 25 Nov 2025 15:55:24 +0100
-Subject: [PATCH 1/2] fence_virt: cleanup whitespace at end of lines
-
----
- agents/virt/client/main.c | 10 +++++-----
- agents/virt/client/options.c | 38 ++++++++++++++++++------------------
- agents/virt/client/serial.c | 14 ++++++-------
- agents/virt/client/tcp.c | 4 ++--
- agents/virt/client/vsock.c | 4 ++--
- 5 files changed, 35 insertions(+), 35 deletions(-)
-
-diff --git a/agents/virt/client/main.c b/agents/virt/client/main.c
-index 188c05d71..4ffcd549f 100644
---- a/agents/virt/client/main.c
-+++ b/agents/virt/client/main.c
-@@ -13,7 +13,7 @@
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
-- Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
-+ Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- MA 02139, USA.
- */
- /*
-@@ -95,16 +95,16 @@ main(int argc, char **argv)
-
- args_finalize(&args);
- dset(args.debug);
--
-- if (args.debug > 0)
-+
-+ if (args.debug > 0)
- args_print(&args);
-
- /* Additional validation here */
- if (!args.domain && (args.op != FENCE_DEVSTATUS &&
- args.op != FENCE_HOSTLIST &&
- args.op != FENCE_METADATA)) {
-- printf("No domain specified!\n");
-- syslog(LOG_NOTICE, "No domain specified");
-+ fprintf(stderr, "No domain specified!\n");
-+ syslog(LOG_ERR, "No domain specified");
- args.flags |= F_ERR;
- }
-
-diff --git a/agents/virt/client/options.c b/agents/virt/client/options.c
-index ce7ba14da..c98bf60ad 100644
---- a/agents/virt/client/options.c
-+++ b/agents/virt/client/options.c
-@@ -13,7 +13,7 @@
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
-- Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
-+ Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- MA 02139, USA.
- */
-
-@@ -425,12 +425,12 @@ static struct arg_info _arg_info[] = {
-
- { '\xff', NULL, "self",
- NULL, 0, 0, "string", NULL,
-- "Not user serviceable",
-+ "Not user serviceable",
- NULL },
-
- { '\xff', NULL, "nodename",
- NULL, 0, 0, "string", NULL,
-- "Not user serviceable",
-+ "Not user serviceable",
- NULL },
-
- { 'd', "-d", "debug",
-@@ -473,7 +473,7 @@ static struct arg_info _arg_info[] = {
- "Network interface name to listen on",
- assign_interface },
-
-- { 'r', "-r <retrans>", "retrans",
-+ { 'r', "-r <retrans>", "retrans",
- NULL, 0, 0, "string", "20",
- "Multicast retransmit time (in 1/10sec; default=20)",
- assign_retrans },
-@@ -489,7 +489,7 @@ static struct arg_info _arg_info[] = {
- assign_auth },
-
- { 'k', "-k <file>", "key_file",
-- NULL, 0, 0, "string", DEFAULT_KEY_FILE,
-+ NULL, 0, 0, "string", DEFAULT_KEY_FILE,
- "Shared key file (default=" DEFAULT_KEY_FILE ")",
- assign_key },
-
-@@ -541,12 +541,12 @@ static struct arg_info _arg_info[] = {
-
- { 'h', "-h", NULL,
- NULL, 0, 0, "boolean", "0",
-- "Help",
-+ "Help",
- assign_help },
-
- { '?', "-?", NULL,
- NULL, 0, 0, "boolean", "0",
-- "Help (alternate)",
-+ "Help (alternate)",
- assign_help },
-
- { 'w', "-w <delay>", "delay",
-@@ -556,7 +556,7 @@ static struct arg_info _arg_info[] = {
-
- { 'V', "-V", NULL,
- NULL, 0, 0, "boolean", "0",
-- "Display version and exit",
-+ "Display version and exit",
- assign_version },
-
- /* Terminator */
-@@ -819,16 +819,16 @@ args_metadata(char *progname, const char *optstr)
-
- printf("</parameters>\n");
- printf("<actions>\n");
-- printf("\t<action name=\"null\" />\n");
-+ printf("\t<action name=\"null\" />\n");
- printf("\t<action name=\"on\" />\n");
- printf("\t<action name=\"off\" />\n");
- printf("\t<action name=\"reboot\" />\n");
-- printf("\t<action name=\"metadata\" />\n");
-- printf("\t<action name=\"status\" />\n");
-- printf("\t<action name=\"monitor\" />\n");
-- printf("\t<action name=\"list\" />\n");
-- printf("\t<action name=\"list-status\" />\n");
-- printf("\t<action name=\"validate-all\" />\n");
-+ printf("\t<action name=\"metadata\" />\n");
-+ printf("\t<action name=\"status\" />\n");
-+ printf("\t<action name=\"monitor\" />\n");
-+ printf("\t<action name=\"list\" />\n");
-+ printf("\t<action name=\"list-status\" />\n");
-+ printf("\t<action name=\"validate-all\" />\n");
- printf("</actions>\n");
- printf("</resource-agent>\n");
- }
-@@ -846,7 +846,7 @@ cleanup(char *line, size_t linelen)
- {
- char *p;
- int x;
--
-+
- /* Remove leading whitespace. */
- p = line;
- for (x = 0; x < linelen; x++) {
-@@ -887,7 +887,7 @@ cleanup(char *line, size_t linelen)
-
- /**
- Parse args from stdin and assign to the specified args structure.
--
-+
- @param optstr Command line option string in getopt(3) format
- @param args Args structure to fill in.
- */
-@@ -913,7 +913,7 @@ args_get_stdin(const char *optstr, fence_virt_args_t *args)
- }
-
- arg = find_arg_by_string(name);
-- if (!arg || (arg->opt != '\xff' &&
-+ if (!arg || (arg->opt != '\xff' &&
- arg->opt != SCHEMA_COMPAT &&
- !strchr(optstr, arg->opt))) {
- fprintf(stderr,
-@@ -930,7 +930,7 @@ args_get_stdin(const char *optstr, fence_virt_args_t *args)
-
- /**
- Parse args from stdin and assign to the specified args structure.
--
-+
- @param optstr Command line option string in getopt(3) format
- @param args Args structure to fill in.
- */
-diff --git a/agents/virt/client/serial.c b/agents/virt/client/serial.c
-index 238ef4af2..124679e83 100644
---- a/agents/virt/client/serial.c
-+++ b/agents/virt/client/serial.c
-@@ -1,11 +1,11 @@
--/*
-+/*
- * Copyright (C) 2002-2003, 2009 Red Hat, Inc.
- *
- * License: GPLv2+
- *
- * Written by Lon Hohberger <lhh@redhat.com>
- *
-- * Serial client for fence_virt (incomplete, but
-+ * Serial client for fence_virt (incomplete, but
- * a good start)
- *
- * Based on:
-@@ -147,7 +147,7 @@ open_port(char *file, char *cspeed, char *cparam)
- perror("tcsetattr");
- close(fd);
- return -1;
-- }
-+ }
-
- (void) tcflush(fd, TCIOFLUSH);
-
-@@ -171,7 +171,7 @@ hangup(int fd, int delay)
- perror("ioctl2");
- return;
- }
--
-+
- usleep(delay);
-
- bits |= (TIOCM_DTR | TIOCM_CTS | TIOCM_RTS | TIOCM_DSR | TIOCM_CD);
-@@ -233,7 +233,7 @@ serial_fence_virt(fence_virt_args_t *args)
- *flags = 0;
- flags++;
- }
--
-+
- fd = open_port(args->serial.device, speed, flags);
- if (fd == -1) {
- perror("open_port");
-@@ -264,9 +264,9 @@ serial_fence_virt(fence_virt_args_t *args)
- gettimeofday(&tv, NULL);
- req.seqno = (int)tv.tv_usec;
-
-- if (args->domain)
-+ if (args->domain)
- strncpy((char *)req.domain, args->domain, sizeof(req.domain) - 1);
--
-+
- tv.tv_sec = 3;
- tv.tv_usec = 0;
- swab_serial_req_t(&req);
-diff --git a/agents/virt/client/tcp.c b/agents/virt/client/tcp.c
-index 986fdd942..68e69dbef 100644
---- a/agents/virt/client/tcp.c
-+++ b/agents/virt/client/tcp.c
-@@ -13,7 +13,7 @@
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
-- Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
-+ Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- MA 02139, USA.
- */
-
-@@ -158,7 +158,7 @@ tcp_fence_virt(fence_virt_args_t *args)
- ret = tcp_exchange(fd, args->net.auth, key, key_len,
- args->timeout);
- break;
-- /* case AUTH_X509:
-+ /* case AUTH_X509:
- return ssl_exchange(...); */
- default:
- dbg_printf(3, "Unknown auth type: %d\n", args->net.auth);
-diff --git a/agents/virt/client/vsock.c b/agents/virt/client/vsock.c
-index 7557c5413..a59cb652d 100644
---- a/agents/virt/client/vsock.c
-+++ b/agents/virt/client/vsock.c
-@@ -13,7 +13,7 @@
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
-- Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
-+ Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- MA 02139, USA.
- */
-
-@@ -163,7 +163,7 @@ vsock_fence_virt(fence_virt_args_t *args)
- ret = sock_exchange(fd, args->net.auth, key, key_len,
- args->timeout);
- break;
-- /* case AUTH_X509:
-+ /* case AUTH_X509:
- return ssl_exchange(...); */
- default:
- dbg_printf(3, "Unknown auth type: %d\n", args->net.auth);
-
-From 33dd9cb31b3399f1a1bd7d86801e6e8035ca6090 Mon Sep 17 00:00:00 2001
-From: Oyvind Albrigtsen <oalbrigt@redhat.com>
-Date: Wed, 26 Nov 2025 09:05:45 +0100
-Subject: [PATCH 2/2] fence_virt: print error messages to sderr
-
----
- agents/virt/client/main.c | 18 +++++++++---------
- agents/virt/client/mcast.c | 20 ++++++++++----------
- agents/virt/client/options.c | 32 ++++++++++++++++----------------
- agents/virt/client/serial.c | 6 +++---
- agents/virt/client/tcp.c | 10 +++++-----
- agents/virt/client/vsock.c | 12 ++++++------
- 6 files changed, 49 insertions(+), 49 deletions(-)
-
-diff --git a/agents/virt/client/main.c b/agents/virt/client/main.c
-index 4ffcd549f..728932a95 100644
---- a/agents/virt/client/main.c
-+++ b/agents/virt/client/main.c
-@@ -167,28 +167,28 @@ main(int argc, char **argv)
- break;
- case RESP_FAIL:
- if (args.domain) {
-- syslog(LOG_NOTICE, "Fence operation failed for domain \"%s\"",
-+ syslog(LOG_ERR, "Fence operation failed for domain \"%s\"",
- args.domain);
- } else
-- syslog(LOG_NOTICE, "Fence operation failed");
-- printf("Operation failed\n");
-+ syslog(LOG_ERR, "Fence operation failed");
-+ fprintf(stderr, "Operation failed\n");
- break;
- case RESP_PERM:
- if (args.domain) {
-- syslog(LOG_NOTICE,
-+ syslog(LOG_ERR,
- "Permission denied for Fence operation for domain \"%s\"",
- args.domain);
- } else
-- syslog(LOG_NOTICE, "Permission denied for fence operation");
-- printf("Permission denied\n");
-+ syslog(LOG_ERR, "Permission denied for fence operation");
-+ fprintf(stderr, "Permission denied\n");
- break;
- default:
- if (args.domain) {
-- syslog(LOG_NOTICE, "Unknown response (%d) for domain \"%s\"",
-+ syslog(LOG_ERR, "Unknown response (%d) for domain \"%s\"",
- ret, args.domain);
- } else
-- syslog(LOG_NOTICE, "Unknown response (%d)", ret);
-- printf("Unknown response (%d)\n", ret);
-+ syslog(LOG_ERR, "Unknown response (%d)", ret);
-+ fprintf(stderr, "Unknown response (%d)\n", ret);
- break;
- }
-
-diff --git a/agents/virt/client/mcast.c b/agents/virt/client/mcast.c
-index 42f0a6b6f..e6994ad25 100644
---- a/agents/virt/client/mcast.c
-+++ b/agents/virt/client/mcast.c
-@@ -102,13 +102,13 @@ do_read_hostlist(int fd, int timeout)
-
- ret = _select_retry(fd+1, &rfds, NULL, NULL, &tv);
- if (ret == 0) {
-- printf("Timed out!\n");
-+ fprintf(stderr, "Timed out!\n");
- break;
- }
-
- ret = _read_retry(fd, &hinfo, sizeof(hinfo), &tv);
- if (ret < sizeof(hinfo)) {
-- printf("Bad read!\n");
-+ fprintf(stderr, "Bad read!\n");
- break;
- }
-
-@@ -134,14 +134,14 @@ tcp_exchange(int fd, fence_auth_type_t auth, void *key,
- dbg_printf(3, "Issuing TCP challenge\n");
- if (sock_challenge(fd, auth, key, key_len, timeout) <= 0) {
- /* Challenge failed */
-- printf("Invalid response to challenge\n");
-+ fprintf(stderr, "Invalid response to challenge\n");
- return 1;
- }
-
- /* Now they'll send us one, so we need to respond here */
- dbg_printf(3, "Responding to TCP challenge\n");
- if (sock_response(fd, auth, key, key_len, timeout) <= 0) {
-- printf("Invalid response to challenge\n");
-+ fprintf(stderr, "Invalid response to challenge\n");
- return 1;
- }
-
-@@ -277,14 +277,14 @@ mcast_fence_virt(fence_virt_args_t *args)
- /* Initialize NSS; required to do hashing, as silly as that
- sounds... */
- if (NSS_NoDB_Init(NULL) != SECSuccess) {
-- printf("Could not initialize NSS\n");
-+ fprintf(stderr, "Could not initialize NSS\n");
- return 1;
- }
-
- if (args->net.auth != AUTH_NONE || args->net.hash != HASH_NONE) {
- key_len = read_key_file(args->net.key_file, key, sizeof(key));
- if (key_len < 0) {
-- printf("Could not read %s; trying without "
-+ fprintf(stderr, "Could not read %s; trying without "
- "authentication\n", args->net.key_file);
- args->net.auth = AUTH_NONE;
- args->net.hash = HASH_NONE;
-@@ -294,7 +294,7 @@ mcast_fence_virt(fence_virt_args_t *args)
-
- /* Do the real work */
- if (ip_build_list(&ipl) < 0) {
-- printf("Error building IP address list\n");
-+ fprintf(stderr, "Error building IP address list\n");
- return 1;
- }
-
-@@ -320,7 +320,7 @@ mcast_fence_virt(fence_virt_args_t *args)
- }
-
- if (lfd < 0) {
-- printf("Failed to listen: %s\n", strerror(errno));
-+ fprintf(stderr, "Failed to listen: %s\n", strerror(errno));
- usleep(args->retr_time * 100000);
- if (--attempts > 0)
- goto listen_loop;
-@@ -366,10 +366,10 @@ mcast_fence_virt(fence_virt_args_t *args)
-
- if (fd < 0) {
- if (attempts <= 0) {
-- printf("Timed out waiting for response\n");
-+ fprintf(stderr, "Timed out waiting for response\n");
- return 1;
- }
-- printf("Operation failed: %s\n", strerror(errno));
-+ fprintf(stderr, "Operation failed: %s\n", strerror(errno));
- return -1;
- }
-
-diff --git a/agents/virt/client/options.c b/agents/virt/client/options.c
-index c98bf60ad..1d50127be 100644
---- a/agents/virt/client/options.c
-+++ b/agents/virt/client/options.c
-@@ -83,7 +83,7 @@ assign_family(fence_virt_args_t *args, struct arg_info *arg,
- } else if (!strcasecmp(value, "auto")) {
- args->net.family = 0;
- } else {
-- printf("Unsupported family: '%s'\n", value);
-+ fprintf(stderr, "Unsupported family: '%s'\n", value);
- args->flags |= F_ERR;
- }
- }
-@@ -134,7 +134,7 @@ assign_port(fence_virt_args_t *args, struct arg_info *arg, char *value)
-
- ret = strtol(value, &p, 0);
- if (ret <= 0 || ret >= 65536 || *p != '\0') {
-- printf("Invalid port: '%s'\n", value);
-+ fprintf(stderr, "Invalid port: '%s'\n", value);
- args->flags |= F_ERR;
- } else
- args->net.port = ret;
-@@ -153,7 +153,7 @@ assign_cid(fence_virt_args_t *args, struct arg_info *arg, char *value)
-
- ret = strtoul(value, &p, 0);
- if (!p || *p != '\0' || ret < 2 || ret >= 0xffffffff) {
-- printf("Invalid CID: '%s'\n", value);
-+ fprintf(stderr, "Invalid CID: '%s'\n", value);
- args->flags |= F_ERR;
- } else
- args->net.cid = ret;
-@@ -169,7 +169,7 @@ assign_interface(fence_virt_args_t *args, struct arg_info *arg, char *value)
-
- ret = if_nametoindex(value);
- if (ret <= 0) {
-- printf("Invalid interface: %s: %s\n", value, strerror(errno));
-+ fprintf(stderr, "Invalid interface: %s: %s\n", value, strerror(errno));
- args->net.ifindex = 0;
- }
-
-@@ -188,7 +188,7 @@ assign_retrans(fence_virt_args_t *args, struct arg_info *arg, char *value)
-
- ret = strtol(value, &p, 0);
- if (ret <= 0 || *p != '\0') {
-- printf("Invalid retransmit time: '%s'\n", value);
-+ fprintf(stderr, "Invalid retransmit time: '%s'\n", value);
- args->flags |= F_ERR;
- } else
- args->retr_time = ret;
-@@ -209,7 +209,7 @@ assign_hash(fence_virt_args_t *args, struct arg_info *arg, char *value)
- } else if (!strcasecmp(value, "sha512")) {
- args->net.hash = HASH_SHA512;
- } else {
-- printf("Unsupported hash: %s\n", value);
-+ fprintf(stderr, "Unsupported hash: %s\n", value);
- args->flags |= F_ERR;
- }
- }
-@@ -230,7 +230,7 @@ assign_auth(fence_virt_args_t *args, struct arg_info *arg, char *value)
- } else if (!strcasecmp(value, "sha512")) {
- args->net.auth = AUTH_SHA512;
- } else {
-- printf("Unsupported auth type: %s\n", value);
-+ fprintf(stderr, "Unsupported auth type: %s\n", value);
- args->flags |= F_ERR;
- }
- }
-@@ -248,7 +248,7 @@ assign_key(fence_virt_args_t *args, struct arg_info *arg, char *value)
- args->net.key_file = strdup(value);
-
- if (stat(value, &st) == -1) {
-- printf("Invalid key file: '%s' (%s)\n", value,
-+ fprintf(stderr, "Invalid key file: '%s' (%s)\n", value,
- strerror(errno));
- args->flags |= F_ERR;
- }
-@@ -280,7 +280,7 @@ assign_op(fence_virt_args_t *args, struct arg_info *arg, char *value)
- } else if (!strcasecmp(value, "validate-all")) {
- args->op = FENCE_VALIDATEALL;
- } else {
-- printf("Unsupported operation: %s\n", value);
-+ fprintf(stderr, "Unsupported operation: %s\n", value);
- args->flags |= F_ERR;
- }
- }
-@@ -310,7 +310,7 @@ static inline void
- assign_domain(fence_virt_args_t *args, struct arg_info *arg, char *value)
- {
- if (args->domain) {
-- printf("Domain/UUID may not be specified more than once\n");
-+ fprintf(stderr, "Domain/UUID may not be specified more than once\n");
- args->flags |= F_ERR;
- return;
- }
-@@ -321,13 +321,13 @@ assign_domain(fence_virt_args_t *args, struct arg_info *arg, char *value)
- args->domain = strdup(value);
-
- if (strlen(value) <= 0) {
-- printf("Invalid domain name\n");
-+ fprintf(stderr, "Invalid domain name\n");
- args->flags |= F_ERR;
- }
-
- if (strlen(value) >= MAX_DOMAINNAME_LENGTH) {
- errno = ENAMETOOLONG;
-- printf("Invalid domain name: '%s' (%s)\n",
-+ fprintf(stderr, "Invalid domain name: '%s' (%s)\n",
- value, strerror(errno));
- args->flags |= F_ERR;
- }
-@@ -359,7 +359,7 @@ assign_timeout(fence_virt_args_t *args, struct arg_info *arg, char *value)
-
- ret = strtol(value, &p, 0);
- if (ret <= 0 || *p != '\0') {
-- printf("Invalid timeout: '%s'\n", value);
-+ fprintf(stderr, "Invalid timeout: '%s'\n", value);
- args->flags |= F_ERR;
- } else
- args->timeout = ret;
-@@ -376,7 +376,7 @@ assign_delay(fence_virt_args_t *args, struct arg_info *arg, char *value)
-
- ret = strtol(value, &p, 0);
- if (ret < 0 || *p != '\0') {
-- printf("Invalid delay: '%s'\n", value);
-+ fprintf(stderr, "Invalid delay: '%s'\n", value);
- args->flags |= F_ERR;
- } else
- args->delay = ret;
-@@ -979,7 +979,7 @@ args_finalize(fence_virt_args_t *args)
- args->net.addr = addr;
-
- if (!args->net.addr) {
-- printf("No multicast address available\n");
-+ fprintf(stderr, "No multicast address available\n");
- args->flags |= F_ERR;
- }
-
-@@ -994,7 +994,7 @@ args_finalize(fence_virt_args_t *args)
- if (strchr(args->net.addr, '.'))
- args->net.family = PF_INET;
- if (!args->net.family) {
-- printf("Could not determine address family\n");
-+ fprintf(stderr, "Could not determine address family\n");
- args->flags |= F_ERR;
- }
- }
-diff --git a/agents/virt/client/serial.c b/agents/virt/client/serial.c
-index 124679e83..2f5c1b620 100644
---- a/agents/virt/client/serial.c
-+++ b/agents/virt/client/serial.c
-@@ -100,7 +100,7 @@ char_to_flags(const char *param)
- sb_f = CSTOPB;
- break;
- default:
-- printf("Fail: %c\n", param[x]);
-+ fprintf(stderr, "Fail: %c\n", param[x]);
- errno = EINVAL;
- return -1;
- }
-@@ -251,7 +251,7 @@ serial_fence_virt(fence_virt_args_t *args)
-
- if (fd < 0) {
- perror("vmchannel connect");
-- printf("Failed to connect to %s:%d\n", args->serial.address,
-+ fprintf(stderr, "Failed to connect to %s:%d\n", args->serial.address,
- args->net.port);
- return -1;
- }
-@@ -276,7 +276,7 @@ serial_fence_virt(fence_virt_args_t *args)
- close(fd);
- return ret;
- }
-- printf("Failed to send request\n");
-+ fprintf(stderr, "Failed to send request\n");
- }
-
- tv.tv_sec = args->timeout;
-diff --git a/agents/virt/client/tcp.c b/agents/virt/client/tcp.c
-index 68e69dbef..f2782fadb 100644
---- a/agents/virt/client/tcp.c
-+++ b/agents/virt/client/tcp.c
-@@ -53,14 +53,14 @@ tcp_exchange(int fd, fence_auth_type_t auth, void *key,
- dbg_printf(3, "Issuing TCP challenge\n");
- if (sock_challenge(fd, auth, key, key_len, timeout) <= 0) {
- /* Challenge failed */
-- printf("Invalid response to challenge\n");
-+ fprintf(stderr, "Invalid response to challenge\n");
- return 1;
- }
-
- /* Now they'll send us one, so we need to respond here */
- dbg_printf(3, "Responding to TCP challenge\n");
- if (sock_response(fd, auth, key, key_len, timeout) <= 0) {
-- printf("Invalid response to challenge\n");
-+ fprintf(stderr, "Invalid response to challenge\n");
- return 1;
- }
-
-@@ -102,14 +102,14 @@ tcp_fence_virt(fence_virt_args_t *args)
- /* Initialize NSS; required to do hashing, as silly as that
- sounds... */
- if (NSS_NoDB_Init(NULL) != SECSuccess) {
-- printf("Could not initialize NSS\n");
-+ fprintf(stderr, "Could not initialize NSS\n");
- return 1;
- }
-
- if (args->net.auth != AUTH_NONE || args->net.hash != HASH_NONE) {
- key_len = read_key_file(args->net.key_file, key, sizeof(key));
- if (key_len < 0) {
-- printf("Could not read %s; trying without "
-+ fprintf(stderr, "Could not read %s; trying without "
- "authentication\n", args->net.key_file);
- args->net.auth = AUTH_NONE;
- args->net.hash = HASH_NONE;
-@@ -138,7 +138,7 @@ tcp_fence_virt(fence_virt_args_t *args)
- }
-
- if (fd < 0) {
-- printf("Unable to connect to fence_virtd host %s:%d %s\n",
-+ fprintf(stderr, "Unable to connect to fence_virtd host %s:%d %s\n",
- args->net.ipaddr, args->net.port, strerror(errno));
- return 1;
- }
-diff --git a/agents/virt/client/vsock.c b/agents/virt/client/vsock.c
-index a59cb652d..b02c3b07c 100644
---- a/agents/virt/client/vsock.c
-+++ b/agents/virt/client/vsock.c
-@@ -54,14 +54,14 @@ sock_exchange(int fd, fence_auth_type_t auth, void *key,
- dbg_printf(3, "Issuing challenge\n");
- if (sock_challenge(fd, auth, key, key_len, timeout) <= 0) {
- /* Challenge failed */
-- printf("Invalid response to challenge\n");
-+ fprintf(stderr, "Invalid response to challenge\n");
- return 1;
- }
-
- /* Now they'll send us one, so we need to respond here */
- dbg_printf(3, "Responding to challenge\n");
- if (sock_response(fd, auth, key, key_len, timeout) <= 0) {
-- printf("Invalid response to challenge\n");
-+ fprintf(stderr, "Invalid response to challenge\n");
- return 1;
- }
-
-@@ -102,14 +102,14 @@ vsock_fence_virt(fence_virt_args_t *args)
- /* Initialize NSS; required to do hashing, as silly as that
- sounds... */
- if (NSS_NoDB_Init(NULL) != SECSuccess) {
-- printf("Could not initialize NSS\n");
-+ fprintf(stderr, "Could not initialize NSS\n");
- return 1;
- }
-
- if (args->net.auth != AUTH_NONE || args->net.hash != HASH_NONE) {
- key_len = read_key_file(args->net.key_file, key, sizeof(key));
- if (key_len < 0) {
-- printf("Could not read %s; trying without "
-+ fprintf(stderr, "Could not read %s; trying without "
- "authentication\n", args->net.key_file);
- args->net.auth = AUTH_NONE;
- args->net.hash = HASH_NONE;
-@@ -132,7 +132,7 @@ vsock_fence_virt(fence_virt_args_t *args)
-
- fd = socket(PF_VSOCK, SOCK_STREAM, 0);
- if (fd < 0) {
-- printf("Unable to create vsock: %s", strerror(errno));
-+ fprintf(stderr, "Unable to create vsock: %s", strerror(errno));
- return 1;
- }
-
-@@ -142,7 +142,7 @@ vsock_fence_virt(fence_virt_args_t *args)
- svm.svm_port = args->net.port;
-
- if (connect(fd, (struct sockaddr *) &svm, sizeof(svm)) < 0) {
-- printf("Unable to connect to fence_virtd host %d:%d %s\n",
-+ fprintf(stderr, "Unable to connect to fence_virtd host %d:%d %s\n",
- args->net.cid, args->net.port, strerror(errno));
- close(fd);
- return 1;
diff --git a/RHEL-128925-fence_gce-fix-node-list-limit.patch b/RHEL-128925-fence_gce-fix-node-list-limit.patch
deleted file mode 100644
index 4910087..0000000
--- a/RHEL-128925-fence_gce-fix-node-list-limit.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 07285aacbc2194c6a2dfc7dd62dda9a3308bc243 Mon Sep 17 00:00:00 2001
-From: dfellmeth-google <dfellmeth@google.com>
-Date: Mon, 17 Nov 2025 04:44:49 -0500
-Subject: [PATCH] fence_gce: fix node list limit (#640)
-
-This change introduces filtering using the plug to the instances.list method to reduce the number of results returned.
-
-It also introduces pagination if the list returned is still too large.
----
- agents/gce/fence_gce.py | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py
-index 759567c6f..c7bd2a5dc 100644
---- a/agents/gce/fence_gce.py
-+++ b/agents/gce/fence_gce.py
-@@ -150,15 +150,24 @@ def get_nodes_list(conn, options):
- result = {}
- plug = options["--plug"] if "--plug" in options else ""
- zones = options["--zone"] if "--zone" in options else ""
-+ filter = "name="+plug if plug != "" else ""
-+ max_results = 1 if options.get("--action") == "monitor" else 500
- if not zones:
- zones = get_zone(conn, options, plug) if "--plugzonemap" not in options else options["--plugzonemap"][plug]
- try:
- for zone in zones.split(","):
-- instanceList = retry_api_execute(options, conn.instances().list(
-+ request = conn.instances().list(
- project=options["--project"],
-- zone=zone))
-+ zone=zone,
-+ filter=filter,
-+ maxResults=max_results)
-+ while request is not None:
-+ instanceList = retry_api_execute(options, request)
-+ if "items" not in instanceList:
-+ break
- for instance in instanceList["items"]:
- result[instance["id"]] = (instance["name"], translate_status(instance["status"]))
-+ request = conn.instances().list_next(previous_request=request, previous_response=instanceList)
- except Exception as err:
- fail_fence_agent(options, "Failed: get_nodes_list: {}".format(str(err)))
-
diff --git a/RHEL-145086-fence_ibm_vpc-fix-missing-statuses.patch b/RHEL-145086-fence_ibm_vpc-fix-missing-statuses.patch
deleted file mode 100644
index 341a4cd..0000000
--- a/RHEL-145086-fence_ibm_vpc-fix-missing-statuses.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From fb50ca8a9e552a4b900c1101d49fb4ed9fa4144a Mon Sep 17 00:00:00 2001
-From: Ilias Romanos <ilias@rwx.gr>
-Date: Mon, 8 Dec 2025 16:57:48 +0100
-Subject: [PATCH] fence_ibm_vpc: fix missing statuses
-
----
- agents/ibm_vpc/fence_ibm_vpc.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py
-index a87e9e6dc..46cf9cc87 100755
---- a/agents/ibm_vpc/fence_ibm_vpc.py
-+++ b/agents/ibm_vpc/fence_ibm_vpc.py
-@@ -16,6 +16,8 @@
- "stopping": "unknown",
- "restarting": "unknown",
- "pending": "unknown",
-+ "deleting": "unknown",
-+ "failed": "unknown",
- }
-
- def get_list(conn, options):
diff --git a/RHEL-170614-fence_virtd-fix-discard-const-error-with-GCC-16.patch b/RHEL-170614-fence_virtd-fix-discard-const-error-with-GCC-16.patch
deleted file mode 100644
index e92975f..0000000
--- a/RHEL-170614-fence_virtd-fix-discard-const-error-with-GCC-16.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From d945ac94ce5b5dff3c74401f83b8422181cb529d Mon Sep 17 00:00:00 2001
-From: "Fabio M. Di Nitto" <fdinitto@redhat.com>
-Date: Tue, 9 Dec 2025 14:16:01 +0100
-Subject: [PATCH] Remove discards const qualifier warnings
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-gcc 15.2.1 started producing warning about "assignment discards
-‘const’ qualifier from pointer target type" so patch adds const
-qualifier to fix this warning.
-
-Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
----
- agents/virt/server/virt-serial.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/agents/virt/server/virt-serial.c b/agents/virt/server/virt-serial.c
-index bfcf4de26..17ac2b659 100644
---- a/agents/virt/server/virt-serial.c
-+++ b/agents/virt/server/virt-serial.c
-@@ -55,7 +55,7 @@ struct domain_info {
- static int
- is_in_directory(const char *dir, const char *pathspec)
- {
-- char *last_slash = NULL;
-+ const char *last_slash = NULL;
- size_t dirlen, pathlen;
-
- if (!dir || !pathspec)
diff --git a/RHEL-68322-1-fence_nutanix_ahv-handle-api-rate-limits.patch b/RHEL-68322-1-fence_nutanix_ahv-handle-api-rate-limits.patch
deleted file mode 100644
index 0d95125..0000000
--- a/RHEL-68322-1-fence_nutanix_ahv-handle-api-rate-limits.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 03c599c9d2d5a42b4aea6db66e3a50263fb78440 Mon Sep 17 00:00:00 2001
-From: Govindarajan Soundararajan <govindarajan.s@nutanix.com>
-Date: Thu, 30 Jan 2025 02:01:28 -0800
-Subject: [PATCH] fence_nutanix_ahv: Handle API rate limits (#604)
-
-Nutanix Prism Central has rate limits set on
-various API end points. The fence agent should
-handle such rate limit errors and retry API requests
-appropriately if it encounters any such errors. This
-change adds retries for HTTP error 429 (rate limit),
-and also for HTTP errors 500, and 503.
----
- agents/nutanix_ahv/fence_nutanix_ahv.py | 17 +++++++++++++----
- 1 file changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/agents/nutanix_ahv/fence_nutanix_ahv.py b/agents/nutanix_ahv/fence_nutanix_ahv.py
-index 1a422ddad..67e6d907c 100644
---- a/agents/nutanix_ahv/fence_nutanix_ahv.py
-+++ b/agents/nutanix_ahv/fence_nutanix_ahv.py
-@@ -10,6 +10,8 @@
- import time
- import uuid
- import requests
-+from requests.adapters import HTTPAdapter
-+from requests.packages.urllib3.util.retry import Retry
-
- sys.path.append("@FENCEAGENTSLIBDIR@")
- from fencing import *
-@@ -20,6 +22,7 @@
- MIN_TIMEOUT = 60
- PC_PORT = 9440
- POWER_STATES = {"ON": "on", "OFF": "off", "PAUSED": "off", "UNKNOWN": "unknown"}
-+MAX_RETRIES = 5
-
-
- class NutanixClientException(Exception):
-@@ -44,22 +47,28 @@ def __init__(self, username, password, disable_warnings=False):
- self.password = password
- self.valid_status_codes = [200, 202]
- self.disable_warnings = disable_warnings
-+ self.session = requests.Session()
-+ self.session.auth = (self.username, self.password)
-+
-+ retry_strategy = Retry(total=MAX_RETRIES,
-+ backoff_factor=1,
-+ status_forcelist=[429, 500, 503])
-+
-+ self.session.mount("https://", HTTPAdapter(max_retries=retry_strategy))
-
- def request(self, url, method='GET', headers=None, **kwargs):
-- session = requests.Session()
-- session.auth = (self.username, self.password)
-
- if self.disable_warnings:
- requests.packages.urllib3.disable_warnings()
-
- if headers:
-- session.headers.update(headers)
-+ self.session.headers.update(headers)
-
- response = None
-
- try:
- logging.debug("Sending %s request to %s", method, url)
-- response = session.request(method, url, **kwargs)
-+ response = self.session.request(method, url, **kwargs)
- response.raise_for_status()
- except requests.exceptions.SSLError as err:
- logging.error("Secure connection failed, verify SSL certificate")
diff --git a/RHEL-68322-2-fence_nutanix_ahv-update-metadata.patch b/RHEL-68322-2-fence_nutanix_ahv-update-metadata.patch
deleted file mode 100644
index ccd6867..0000000
--- a/RHEL-68322-2-fence_nutanix_ahv-update-metadata.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 345a609a34ea153e168b15d48eb8f2dd8d017f04 Mon Sep 17 00:00:00 2001
-From: Oyvind Albrigtsen <oalbrigt@redhat.com>
-Date: Wed, 23 Apr 2025 15:25:13 +0200
-Subject: [PATCH] fence_nutanix_ahv: update metadata to fix incorrect agent
- name and align with other agents metadata
-
----
- agents/nutanix_ahv/fence_nutanix_ahv.py | 4 ++--
- tests/data/metadata/fence_nutanix_ahv.xml | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/agents/nutanix_ahv/fence_nutanix_ahv.py b/agents/nutanix_ahv/fence_nutanix_ahv.py
-index 67e6d907c..c18d6a46e 100644
---- a/agents/nutanix_ahv/fence_nutanix_ahv.py
-+++ b/agents/nutanix_ahv/fence_nutanix_ahv.py
-@@ -563,8 +563,8 @@ def main():
- all_opt["power_timeout"]["default"] = str(MIN_TIMEOUT)
- options = check_input(device_opt, process_input(device_opt))
- docs = {}
-- docs["shortdesc"] = "Fencing agent for Nutanix AHV Cluster VMs."
-- docs["longdesc"] = """fence_ahv is a power fencing agent for \
-+ docs["shortdesc"] = "Fence agent for Nutanix AHV Cluster VMs."
-+ docs["longdesc"] = """fence_nutanix_ahv is a Power Fencing agent for \
- virtual machines deployed on Nutanix AHV cluster with the AHV cluster \
- being managed by Prism Central."""
- docs["vendorurl"] = "https://www.nutanix.com"
-diff --git a/tests/data/metadata/fence_nutanix_ahv.xml b/tests/data/metadata/fence_nutanix_ahv.xml
-index bbc307b1d..2de4b01ad 100644
---- a/tests/data/metadata/fence_nutanix_ahv.xml
-+++ b/tests/data/metadata/fence_nutanix_ahv.xml
-@@ -1,6 +1,6 @@
- <?xml version="1.0" ?>
--<resource-agent name="fence_nutanix_ahv" shortdesc="Fencing agent for Nutanix AHV Cluster VMs." >
--<longdesc>fence_ahv is a power fencing agent for virtual machines deployed on Nutanix AHV cluster with the AHV cluster being managed by Prism Central.</longdesc>
-+<resource-agent name="fence_nutanix_ahv" shortdesc="Fence agent for Nutanix AHV Cluster VMs." >
-+<longdesc>fence_nutanix_ahv is a Power Fencing agent for virtual machines deployed on Nutanix AHV cluster with the AHV cluster being managed by Prism Central.</longdesc>
- <vendor-url>https://www.nutanix.com</vendor-url>
- <parameters>
- <parameter name="action" unique="0" required="1">
diff --git a/RHEL-76495-fence_azure_arm-use-azure-identity.patch b/RHEL-76495-fence_azure_arm-use-azure-identity.patch
deleted file mode 100644
index b4926b5..0000000
--- a/RHEL-76495-fence_azure_arm-use-azure-identity.patch
+++ /dev/null
@@ -1,440 +0,0 @@
---- 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
--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
-@@ -88,6 +89,59 @@
-
- return resource
-
-+def azure_dep_versions(v):
-+ return tuple(map(int, (v.split("."))))
-+
-+# Do azure API call to list all virtual machines in a resource group
-+def get_vm_list(compute_client,rgName):
-+ return compute_client.virtual_machines.list(rgName)
-+
-+# Do azue API call to shutdown a virtual machine
-+def do_vm_power_off(compute_client,rgName,vmName, skipShutdown):
-+ try:
-+ # Version is not available in azure-mgmt-compute version 14.0.0 until 27.2.0
-+ from azure.mgmt.compute import __version__
-+ except ImportError:
-+ __version__ = "0.0.0"
-+
-+ # use different implementation call based on used version
-+ if (azure_dep_versions(__version__) == azure_dep_versions(AZURE_COMPUTE_VERSION_5)):
-+ logging.debug("{do_vm_power_off} azure.mgtm.compute version is to old to use 'begin_power_off' use 'power_off' function")
-+ compute_client.virtual_machines.power_off(rgName, vmName, skip_shutdown=skipShutdown)
-+ return
-+
-+ compute_client.virtual_machines.begin_power_off(rgName, vmName, skip_shutdown=skipShutdown)
-+
-+# Do azure API call to start a virtual machine
-+def do_vm_start(compute_client,rgName,vmName):
-+ try:
-+ # Version is not available in azure-mgmt-compute version 14.0.0 until 27.2.0
-+ from azure.mgmt.compute import __version__
-+ except ImportError:
-+ __version__ = "0.0.0"
-+
-+ # use different implementation call based on used version
-+ if (azure_dep_versions(__version__) == azure_dep_versions(AZURE_COMPUTE_VERSION_5)):
-+ logging.debug("{do_vm_start} azure.mgtm.compute version is to old to use 'begin_start' use 'start' function")
-+ compute_client.virtual_machines.start(rgName, vmName)
-+ return
-+
-+ compute_client.virtual_machines.begin_start(rgName, vmName)
-+
-+def get_vm_resource(compute_client, rgName, vmName):
-+ try:
-+ # Version is not available in azure-mgmt-compute version 14.0.0 until 27.2.0
-+ from azure.mgmt.compute import __version__
-+ except ImportError:
-+ __version__ = "0.0.0"
-+
-+ # use different implementation call based on used version
-+ if (azure_dep_versions(__version__) <= azure_dep_versions(AZURE_RHEL8_COMPUTE_VERSION)):
-+ return compute_client.virtual_machines.get(rgName, vmName, "instanceView")
-+
-+ return compute_client.virtual_machines.get(resource_group_name=rgName, vm_name=vmName,expand="instanceView")
-+
-+
- 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))
-@@ -154,7 +208,7 @@
- result = FENCE_STATE_ON
-
- try:
-- vm = compute_client.virtual_machines.get(rgName, vmName, "instanceView")
-+ vm = get_vm_resource(compute_client, rgName, vmName)
-
- allNICOK = True
- for nicRef in vm.network_profile.network_interfaces:
-@@ -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))
-
-- vm = compute_client.virtual_machines.get(rgName, vmName, "instanceView")
-+ vm = get_vm_resource(compute_client,rgName, vmName)
-
- operations = []
- for nicRef in vm.network_profile.network_interfaces:
-@@ -270,10 +324,72 @@
-
- return config
-
-+# Function to fetch endpoints from metadata endpoint for azure_stack
-+def get_cloud_from_arm_metadata_endpoint(arm_endpoint):
-+ try:
-+ import requests
-+ session = requests.Session()
-+ metadata_endpoint = arm_endpoint + "/metadata/endpoints?api-version=2015-01-01"
-+ response = session.get(metadata_endpoint)
-+ if response.status_code == 200:
-+ metadata = response.json()
-+ return {
-+ "resource_manager": arm_endpoint,
-+ "credential_scopes": [metadata.get("graphEndpoint") + "/.default"],
-+ "authority_hosts": metadata['authentication'].get('loginEndpoint').replace("https://","")
-+ }
-+ else:
-+ fail_usage("Failed to get cloud from metadata endpoint: %s - %s" % arm_endpoint, e)
-+ except Exception as e:
-+ fail_usage("Failed to get cloud from metadata endpoint: %s - %s" % arm_endpoint, e)
-+
-+def get_azure_arm_endpoints(cloudName, authority):
-+ cloudEnvironment = {
-+ "authority_hosts": authority
-+ }
-+
-+ if cloudName == "AZURE_CHINA_CLOUD":
-+ cloudEnvironment["resource_manager"] = "https://management.chinacloudapi.cn/"
-+ cloudEnvironment["credential_scopes"] = ["https://management.chinacloudapi.cn/.default"]
-+ return cloudEnvironment
-+
-+ if cloudName == "AZURE_US_GOV_CLOUD":
-+ cloudEnvironment["resource_manager"] = "https://management.usgovcloudapi.net/"
-+ cloudEnvironment["credential_scopes"] = ["https://management.core.usgovcloudapi.net/.default"]
-+ return cloudEnvironment
-+
-+ if cloudName == "AZURE_PUBLIC_CLOUD":
-+ cloudEnvironment["resource_manager"] = "https://management.azure.com/"
-+ cloudEnvironment["credential_scopes"] = ["https://management.azure.com/.default"]
-+ return cloudEnvironment
-+
-+
- def get_azure_cloud_environment(config):
-- cloud_environment = None
-- if config.Cloud:
-+ if (config.Cloud is None):
-+ config.Cloud = "public"
-+
-+ try:
-+ from azure.identity import AzureAuthorityHosts
-+
-+ azureCloudName = "AZURE_PUBLIC_CLOUD"
-+ authorityHosts = AzureAuthorityHosts.AZURE_PUBLIC_CLOUD
- if (config.Cloud.lower() == "china"):
-+ azureCloudName = "AZURE_CHINA_CLOUD"
-+ authorityHosts = AzureAuthorityHosts.AZURE_CHINA
-+ elif (config.Cloud.lower() == "usgov"):
-+ azureCloudName = "AZURE_US_GOV_CLOUD"
-+ authorityHosts = AzureAuthorityHosts.AZURE_GOVERNMENT
-+ elif (config.Cloud.lower() == "stack"):
-+ # use custom function to call the azuer stack metadata endpoint to get required configuration.
-+ return get_cloud_from_arm_metadata_endpoint(config.MetadataEndpoint)
-+
-+ return get_azure_arm_endpoints(azureCloudName, authorityHosts)
-+
-+ except ImportError:
-+ if (config.Cloud.lower() == "public"):
-+ from msrestazure.azure_cloud import AZURE_PUBLIC_CLOUD
-+ cloud_environment = AZURE_PUBLIC_CLOUD
-+ elif (config.Cloud.lower() == "china"):
- from msrestazure.azure_cloud import AZURE_CHINA_CLOUD
- cloud_environment = AZURE_CHINA_CLOUD
- elif (config.Cloud.lower() == "germany"):
-@@ -286,61 +402,44 @@
- from msrestazure.azure_cloud import get_cloud_from_metadata_endpoint
- cloud_environment = get_cloud_from_metadata_endpoint(config.MetadataEndpoint)
-
-- return cloud_environment
-+ authority_hosts = cloud_environment.endpoints.active_directory.replace("http://","")
-+ return {
-+ "resource_manager": cloud_environment.endpoints.resource_manager,
-+ "credential_scopes": [cloud_environment.endpoints.active_directory_resource_id + "/.default"],
-+ "authority_hosts": authority_hosts,
-+ "cloud_environment": cloud_environment,
-+ }
-
- def get_azure_credentials(config):
- credentials = None
- cloud_environment = get_azure_cloud_environment(config)
-- if config.UseMSI and cloud_environment:
-+ if config.UseMSI:
- 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
-- 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
-+
-+ 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,
-+ authority=cloud_environment["authority_hosts"]
-+ )
-+ 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["cloud_environment"]
-+ )
-
- return credentials
-
-@@ -350,39 +449,40 @@
- cloud_environment = get_azure_cloud_environment(config)
- 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:
-+ fail_usage("metadata-endpoint not specified")
-+
-+ try:
-+ from azure.profiles import KnownProfiles
-+ if (config.Cloud.lower() == "stack"):
-+ client_profile = KnownProfiles.v2020_09_01_hybrid
-+ else:
-+ client_profile = KnownProfiles.default
- compute_client = ComputeManagementClient(
- credentials,
- config.SubscriptionId,
-- 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
- )
-+ except TypeError:
-+ 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):
-@@ -391,37 +491,31 @@
- cloud_environment = get_azure_cloud_environment(config)
- 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:
-+ client_profile = KnownProfiles.default
-+
-+ try:
-+ 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
-+ )
-+ except TypeError:
- network_client = NetworkManagementClient(
- credentials,
- config.SubscriptionId,
-+ base_url=cloud_environment["resource_manager"],
- api_version=NETWORK_MGMT_CLIENT_API_VERSION
- )
- return network_client
---- 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"]
-- vms = compute_client.virtual_machines.list(rgName)
-+ vms = azure_fence.get_vm_list(compute_client,rgName)
- try:
- for vm in vms:
- result[vm.name] = ("", None)
-@@ -31,7 +31,7 @@
- rgName = options["--resourceGroup"]
-
- try:
-- vms = compute_client.virtual_machines.list(rgName)
-+ vms = azure_fence.get_vm_list(compute_client,rgName)
- except Exception as e:
- fail_usage("Failed: %s" % e)
-
-@@ -72,7 +72,7 @@
-
- powerState = "unknown"
- try:
-- 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)
-
-@@ -115,23 +115,10 @@
-
- if (options["--action"]=="off"):
- logging.info("Poweroff " + vmName + " in resource group " + rgName)
-- 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)
-- 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"] = {
diff --git a/RHEL-78241-fence_aws-add-skipshutdown-parameter.patch b/RHEL-78241-fence_aws-add-skipshutdown-parameter.patch
deleted file mode 100644
index ca1548b..0000000
--- a/RHEL-78241-fence_aws-add-skipshutdown-parameter.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 5cf006ffa3a948ccded3a55c15669f1d5efef5f5 Mon Sep 17 00:00:00 2001
-From: gguifelixamz <45173771+gguifelixamz@users.noreply.github.com>
-Date: Tue, 19 Aug 2025 02:04:53 -0700
-Subject: [PATCH] fence_aws: Add new skip_os_shutdown flag (#632)
-
----
- agents/aws/fence_aws.py | 29 ++++++++++++++++++++++++++---
- tests/data/metadata/fence_aws.xml | 5 +++++
- 2 files changed, 31 insertions(+), 3 deletions(-)
-
-diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py
-index 5459a06c4..cddca4580 100644
---- a/agents/aws/fence_aws.py
-+++ b/agents/aws/fence_aws.py
-@@ -12,7 +12,7 @@
-
- try:
- import boto3
-- from botocore.exceptions import ConnectionError, ClientError, EndpointConnectionError, NoRegionError
-+ from botocore.exceptions import ConnectionError, ClientError, EndpointConnectionError, NoRegionError, ParamValidationError
- except ImportError:
- pass
-
-@@ -120,14 +120,28 @@ def get_self_power_status(conn, instance_id):
- def set_power_status(conn, options):
- my_instance = get_instance_id(options)
- try:
-+ if options.get("--skip-os-shutdown", "false").lower() in ["1", "yes", "on", "true"]:
-+ shutdown_option = {
-+ "SkipOsShutdown": True,
-+ "Force": True
-+ }
-+ else:
-+ shutdown_option = {
-+ "SkipOsShutdown": False,
-+ "Force": True
-+ }
- if (options["--action"]=="off"):
- if "--skip-race-check" in options or get_self_power_status(conn,my_instance) == "ok":
-- conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True)
-+ conn.instances.filter(InstanceIds=[options["--plug"]]).stop(**shutdown_option)
- logger.debug("Called StopInstance API call for %s", options["--plug"])
- else:
- logger.debug("Skipping fencing as instance is not in running status")
- elif (options["--action"]=="on"):
- conn.instances.filter(InstanceIds=[options["--plug"]]).start()
-+ except ParamValidationError:
-+ if (options["--action"] == "off"):
-+ logger.warning(f"SkipOsShutdown not supported with the current boto3 version {boto3.__version__} - falling back to graceful shutdown")
-+ conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True)
- except Exception as e:
- logger.debug("Failed to power %s %s: %s", \
- options["--action"], options["--plug"], e)
-@@ -183,12 +197,21 @@ def define_new_opts():
- "required": "0",
- "order": 7
- }
-+ all_opt["skip_os_shutdown"] = {
-+ "getopt" : ":",
-+ "longopt" : "skip-os-shutdown",
-+ "help" : "--skip-os-shutdown=[true|false] Uses SkipOsShutdown flag",
-+ "shortdesc" : "Use SkipOsShutdown flag to stop the EC2 instance",
-+ "required" : "0",
-+ "default" : "true",
-+ "order" : 8
-+ }
-
- # Main agent method
- def main():
- conn = None
-
-- device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug", "skip_race_check"]
-+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug", "skip_race_check", "skip_os_shutdown"]
-
- atexit.register(atexit_handler)
-
-diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml
-index ad471c797..c53873bbe 100644
---- a/tests/data/metadata/fence_aws.xml
-+++ b/tests/data/metadata/fence_aws.xml
-@@ -51,6 +51,11 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht
- <content type="boolean" />
- <shortdesc lang="en">Skip race condition check</shortdesc>
- </parameter>
-+ <parameter name="skip_os_shutdown" unique="0" required="0">
-+ <getopt mixed="--skip-os-shutdown=[true|false]" />
-+ <content type="string" default="true" />
-+ <shortdesc lang="en">Use SkipOsShutdown flag to stop the EC2 instance</shortdesc>
-+ </parameter>
- <parameter name="quiet" unique="0" required="0">
- <getopt mixed="-q, --quiet" />
- <content type="boolean" />
diff --git a/RHEL-79799-fence_sbd-get-devices-from-SBD_DEVICE-if-devices-parameter-isnt-set.patch b/RHEL-79799-fence_sbd-get-devices-from-SBD_DEVICE-if-devices-parameter-isnt-set.patch
deleted file mode 100644
index f68fe0b..0000000
--- a/RHEL-79799-fence_sbd-get-devices-from-SBD_DEVICE-if-devices-parameter-isnt-set.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From f73b6b4465de1bf2b2887efd3b9767d3f36abd24 Mon Sep 17 00:00:00 2001
-From: xin liang <xliang@suse.com>
-Date: Fri, 26 Jul 2024 10:49:55 +0800
-Subject: [PATCH 1/3] fence_sbd: if sbd devices are not specified with option,
- read SBD_DEVICE
-
-from environment
----
- agents/sbd/fence_sbd.py | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/agents/sbd/fence_sbd.py b/agents/sbd/fence_sbd.py
-index bf95bb72e..c36220295 100644
---- a/agents/sbd/fence_sbd.py
-+++ b/agents/sbd/fence_sbd.py
-@@ -342,7 +342,7 @@ def define_new_opts():
- "longopt" : "devices",
- "help":"--devices=[device_a,device_b] \
- Comma separated list of sbd devices",
-- "required" : "1",
-+ "required" : "0",
- "shortdesc" : "SBD Device",
- "order": 1
- }
-@@ -382,10 +382,14 @@ def main():
- docs["vendorurl"] = ""
- show_docs(options, docs)
-
-- # We need to check if --devices is given and not empty.
-+ # If not specified then read SBD_DEVICE from environment
- if "--devices" not in options:
-- fail_usage("No SBD devices specified. \
-- At least one SBD device is required.")
-+ dev_list = os.getenv("SBD_DEVICE")
-+ if dev_list:
-+ options["--devices"] = ",".join(dev_list.split(";"))
-+ else:
-+ fail_usage("No SBD devices specified. \
-+ At least one SBD device is required.")
-
- run_delay(options)
-
-
-From 744d534225b51db26058660b753df2991b9356a0 Mon Sep 17 00:00:00 2001
-From: xin liang <xliang@suse.com>
-Date: Fri, 26 Jul 2024 17:45:07 +0800
-Subject: [PATCH 2/3] fence_sbd: Update fence_sbd.xml
-
----
- tests/data/metadata/fence_sbd.xml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/data/metadata/fence_sbd.xml b/tests/data/metadata/fence_sbd.xml
-index 82ded25b9..c2daf0c54 100644
---- a/tests/data/metadata/fence_sbd.xml
-+++ b/tests/data/metadata/fence_sbd.xml
-@@ -8,7 +8,7 @@
- <content type="string" default="reboot" />
- <shortdesc lang="en">Fencing action</shortdesc>
- </parameter>
-- <parameter name="devices" unique="0" required="1">
-+ <parameter name="devices" unique="0" required="0">
- <getopt mixed="--devices=[device_a,device_b]" />
- <content type="string" />
- <shortdesc lang="en">SBD Device</shortdesc>
-
-From 06457f95a4d89d4b6a856ae14ccbcda4d357bef6 Mon Sep 17 00:00:00 2001
-From: xin liang <xliang@suse.com>
-Date: Tue, 10 Dec 2024 10:00:00 +0800
-Subject: [PATCH 3/3] fence_sbd: Check if the sbd daemon is running before
- using SBD_DEVICE enviroment variable
-
-And add @SBDPID_PATH@ for the sbd daemon pid file path
----
- agents/sbd/fence_sbd.py | 31 ++++++++++++++++++++++++++++++-
- configure.ac | 2 ++
- make/fencebuild.mk | 1 +
- 3 files changed, 33 insertions(+), 1 deletion(-)
-
-diff --git a/agents/sbd/fence_sbd.py b/agents/sbd/fence_sbd.py
-index c36220295..bebc7fae1 100644
---- a/agents/sbd/fence_sbd.py
-+++ b/agents/sbd/fence_sbd.py
-@@ -14,6 +14,7 @@
- DEVICE_NOT_INIT = -3
- PATH_NOT_EXISTS = -1
- PATH_NOT_BLOCK = -2
-+SBD_PID_FILE = "@SBDPID_PATH@"
-
- def is_block_device(filename):
- """Checks if a given path is a valid block device
-@@ -356,6 +357,34 @@ def define_new_opts():
- "order": 200
- }
-
-+
-+def sbd_daemon_is_running():
-+ """Check if the sbd daemon is running
-+ """
-+ if not os.path.exists(SBD_PID_FILE):
-+ logging.info("SBD PID file %s does not exist", SBD_PID_FILE)
-+ return False
-+
-+ try:
-+ with open(SBD_PID_FILE, "r") as pid_file:
-+ pid = int(pid_file.read().strip())
-+ except Exception as e:
-+ logging.error("Failed to read PID file %s: %s", SBD_PID_FILE, e)
-+ return False
-+
-+ try:
-+ # send signal 0 to check if the process is running
-+ os.kill(pid, 0)
-+ except ProcessLookupError:
-+ logging.info("SBD daemon is not running")
-+ return False
-+ except Exception as e:
-+ logging.error("Failed to send signal 0 to PID %d: %s", pid, e)
-+ return False
-+
-+ return True
-+
-+
- def main():
- """Main function
- """
-@@ -385,7 +414,7 @@ def main():
- # If not specified then read SBD_DEVICE from environment
- if "--devices" not in options:
- dev_list = os.getenv("SBD_DEVICE")
-- if dev_list:
-+ if dev_list and sbd_daemon_is_running():
- options["--devices"] = ",".join(dev_list.split(";"))
- else:
- fail_usage("No SBD devices specified. \
-diff --git a/configure.ac b/configure.ac
-index 6b7322419..0425a9d21 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -145,6 +145,8 @@ eval FENCETMPDIR="`eval echo ${FENCETMPDIR}`"
- AC_DEFINE_UNQUOTED(FENCETMPDIR,"$FENCETMPDIR", Where Fence agents keep state files)
- AC_SUBST(FENCETMPDIR)
-
-+SBDPID_PATH=${localstatedir}/run/sbd.pid
-+AC_SUBST(SBDPID_PATH)
-
- if test "x$AGENTS_LIST" = x; then
- AC_ERROR([No agents selected])
-diff --git a/make/fencebuild.mk b/make/fencebuild.mk
-index 9a3c6d6dd..bc9259190 100644
---- a/make/fencebuild.mk
-+++ b/make/fencebuild.mk
-@@ -9,6 +9,7 @@ define gen_agent_from_py
- -e 's#@''SBINDIR@#${sbindir}#g' \
- -e 's#@''LIBEXECDIR@#${libexecdir}#g' \
- -e 's#@''FENCETMPDIR@#${FENCETMPDIR}#g' \
-+ -e 's#@''SBDPID_PATH@#${SBDPID_PATH}#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/RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch b/RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch
deleted file mode 100644
index eb8568f..0000000
--- a/RHEL-83520-fence_ibm_vpc-refresh-bearer-token.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 293b3961149f680ead9028e6719c405957abc6b7 Mon Sep 17 00:00:00 2001
-From: Oyvind Albrigtsen <oalbrigt@redhat.com>
-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/RHEL-88569-fence_ibm_powervs-fix-plaintext-token-file-support.patch b/RHEL-88569-fence_ibm_powervs-fix-plaintext-token-file-support.patch
deleted file mode 100644
index 3eeb9c7..0000000
--- a/RHEL-88569-fence_ibm_powervs-fix-plaintext-token-file-support.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 988cbd9fb600261106d5da1db6a7bf9cde218eaa Mon Sep 17 00:00:00 2001
-From: Oyvind Albrigtsen <oalbrigt@redhat.com>
-Date: Fri, 25 Apr 2025 16:38:03 +0200
-Subject: [PATCH] fence_ibm_powervs: fix plaintext token file support
-
----
- agents/ibm_powervs/fence_ibm_powervs.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py
-index ec9a0c11d..d408e8727 100755
---- a/agents/ibm_powervs/fence_ibm_powervs.py
-+++ b/agents/ibm_powervs/fence_ibm_powervs.py
-@@ -35,6 +35,7 @@ def get_token(conn, options):
- api_key = keys.get("apikey", "")
- # data is text, return as is
- except ValueError:
-+ f.seek(0)
- api_key = f.read().strip()
- except FileNotFoundError:
- logging.debug("Failed: Cannot open file {}".format(key_file))
diff --git a/RHEL-95379-fence_kubevirt-force-off.patch b/RHEL-95379-fence_kubevirt-force-off.patch
deleted file mode 100644
index ac2e281..0000000
--- a/RHEL-95379-fence_kubevirt-force-off.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From b6e05c57a73e5d9bdde7d133ba7ec43737a7c6b7 Mon Sep 17 00:00:00 2001
-From: Oyvind Albrigtsen <oalbrigt@redhat.com>
-Date: Tue, 25 Feb 2025 16:11:32 +0100
-Subject: [PATCH] fence_kubevirt: set grace_period_seconds=0 to immediately
- power off the node
-
----
- agents/kubevirt/fence_kubevirt.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_kubevirt.py
-index e3817b0fb..8ba8ce8db 100755
---- a/agents/kubevirt/fence_kubevirt.py
-+++ b/agents/kubevirt/fence_kubevirt.py
-@@ -108,7 +108,7 @@ def define_new_opts():
- 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': '*/*'})
-+ return conn.request('put', path, header_params={'accept': '*/*'}, body={'gracePeriod': 0} if action == 'stop' else None)
-
- # Main agent method
- def main():
diff --git a/bundled-kubevirt.patch b/bundled-kubevirt.patch
index 339bda5..495930f 100644
--- a/bundled-kubevirt.patch
+++ b/bundled-kubevirt.patch
@@ -1,7 +1,7 @@
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 @@
+@@ -8,12 +8,16 @@
from fencing import fail, fail_usage, run_delay, EC_STATUS, EC_FETCH_VM_UUID
try:
@@ -9,4 +9,12 @@ diff --color -uNr a/agents/kubevirt/fence_kubevirt.py b/agents/kubevirt/fence_ku
+ 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")
+ 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.rest import ApiException
+ except ImportError:
+ logging.error("Couldn\'t import kubernetes.client.exceptions.ApiException or kubernetes.client.rest.ApiException - not found or not accessible")
+
+ def _get_namespace(options):
+ from kubernetes import config
diff --git a/fence-agents.spec b/fence-agents.spec
index eb6dadc..1cb1ae7 100644
--- a/fence-agents.spec
+++ b/fence-agents.spec
@@ -12,8 +12,8 @@
Name: fence-agents
Summary: Set of unified programs capable of host isolation ("fencing")
-Version: 4.16.0
-Release: 35%{?alphatag:.%{alphatag}}%{?dist}
+Version: 4.17.0
+Release: 1%{?dist}
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
@@ -103,7 +103,6 @@ Source1603: websocket_client-1.9.0.tar.gz
### END
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
@@ -111,19 +110,6 @@ 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
-Patch10: RHEL-79799-fence_sbd-get-devices-from-SBD_DEVICE-if-devices-parameter-isnt-set.patch
-Patch11: RHEL-68322-1-fence_nutanix_ahv-handle-api-rate-limits.patch
-Patch12: RHEL-68322-2-fence_nutanix_ahv-update-metadata.patch
-Patch13: RHEL-88569-fence_ibm_powervs-fix-plaintext-token-file-support.patch
-Patch14: RHEL-95379-fence_kubevirt-force-off.patch
-Patch15: RHEL-107504-fence_ibm_vpc-add-apikey-file-support.patch
-Patch16: RHEL-78241-fence_aws-add-skipshutdown-parameter.patch
-Patch17: RHEL-114752-fence_ibm_powervs-update-api-type-description.patch
-Patch18: RHEL-128925-fence_gce-fix-node-list-limit.patch
-Patch19: RHEL-125959-fence_virt-print-errors-to-stderr.patch
-Patch20: RHEL-145086-fence_ibm_vpc-fix-missing-statuses.patch
-Patch21: RHEL-170614-fence_virtd-fix-discard-const-error-with-GCC-16.patch
Patch22: RHEL-81658-fence_kubevirt-report-Succeeded-and-Failed-as-OFF.patch
Patch23: RHEL-140160-fence_ibm_vpc-set-proxy-when-token-is-expired-as-well.patch
Patch24: RHEL-155007-fence_openstack-fix-list-action-to-avoid-timeout-with-large-number-of-VMs.patch
@@ -243,7 +229,6 @@ BuildRequires: %{systemd_units}
%prep
%setup -q -n %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
%patch -p1 -P 0
-%patch -p1 -P 1
%patch -p1 -P 2
%patch -p1 -P 3
%patch -p1 -P 4
@@ -251,19 +236,6 @@ BuildRequires: %{systemd_units}
%patch -p1 -P 6
%patch -p1 -P 7
%patch -p1 -P 8
-%patch -p1 -P 9
-%patch -p1 -P 10
-%patch -p1 -P 11
-%patch -p1 -P 12
-%patch -p1 -P 13
-%patch -p1 -P 14
-%patch -p1 -P 15
-%patch -p1 -P 16 -F2
-%patch -p1 -P 17
-%patch -p1 -P 18
-%patch -p1 -P 19
-%patch -p1 -P 20
-%patch -p1 -P 21
%patch -p1 -P 22
%patch -p1 -P 23
%patch -p1 -P 24
@@ -1250,6 +1222,9 @@ are located on corosync cluster nodes.
%endif
%changelog
+* Wed Oct 14 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 4.17.0-1
+- new upstream release
+
* Wed Oct 7 2026 Arslan Ahmad <arahmad@redhat.com> - 4.16.0-35
- fence_aws: support 'diag' option (NMI)
Resolves: RHEL-276888
diff --git a/ha-cloud-support-aws.patch b/ha-cloud-support-aws.patch
index 39f7353..47550de 100644
--- a/ha-cloud-support-aws.patch
+++ b/ha-cloud-support-aws.patch
@@ -6,5 +6,5 @@
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
+ from botocore.exceptions import ConnectionError, ClientError, EndpointConnectionError, NoRegionError, ParamValidationError
except ImportError:
diff --git a/sources b/sources
index faa9992..9890c0a 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (fence-agents-4.16.0.tar.gz) = d8ab992934f5dcf4301e65680798446ecc0f0ed40628e6053778d8ecb06ad06e03d08af46b7b257d1022a8f66908570fa395e2cb07b2ef895a7fe4d1287a4c20
+SHA512 (fence-agents-4.17.0.tar.gz) = 6095bd6524585b1b0228cbc0b6d75bb1d87d19dc728087d2ec007ff004241a0aee8a27e81b9b040709321fd332d31ee9cbfb1eba72e622a508956306b9a76f36
SHA512 (requirements-common.txt) = 27efb8655b5cb949ddbdaa1ef8bb0787349ad3173ae46d47110779a7588f6b03e3a6bd717cc7b9182dda3a0ed474715da9ca378031fed288fb9fb4dcae4b15f1
SHA512 (requirements-aliyun.txt) = 74ae6b3f7bb0c25b532f606d7dea3cf4e3a0d1c1abdce78d01e2ab8e81c9f346162142679bad884b2fa110d4d6a8c4692b678017eb1fc7d092907c0c063b1c79
SHA512 (requirements-aws.txt) = ca39604d09f4b05589ddaa437be13b7f5d1868218745df107564d73a6c32efb7e4761436197a69653edc47a78f40dd7d5f0894935ec21b8f23b7c7bc71dfd0d1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-16 7:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 7:44 [rpms/fence-agents] eln: new upstream release Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox