diff --git a/RHEL-143527-powervs-move-ip-powervs-subnet-fix-error-logging.patch b/RHEL-143527-powervs-move-ip-powervs-subnet-fix-error-logging.patch new file mode 100644 index 0000000..9558783 --- /dev/null +++ b/RHEL-143527-powervs-move-ip-powervs-subnet-fix-error-logging.patch @@ -0,0 +1,54 @@ +From 8f5c5a2a472ab404b6fd15ff492e72904dc8ac20 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 22 Jan 2026 07:37:40 +0100 +Subject: [PATCH] powervs-move-ip/powervs-subnet: fix error logging + +--- + heartbeat/powervs-move-ip.in | 4 ++-- + heartbeat/powervs-subnet.in | 10 ++++++---- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/heartbeat/powervs-move-ip.in b/heartbeat/powervs-move-ip.in +index e2250c998..0eea89f1d 100755 +--- a/heartbeat/powervs-move-ip.in ++++ b/heartbeat/powervs-move-ip.in +@@ -310,9 +310,9 @@ class PowerCloudTokenManager: + return json.load(f) + finally: + fcntl.flock(f, fcntl.LOCK_UN) +- except (json.JSONDecodeError, FileNotFoundError, PermissionError): ++ except (json.JSONDecodeError, FileNotFoundError, PermissionError) as e: + ocf.logger.warning( +- "[PowerCloudTokenManager] _read_cache: failed to read token cache read due to missing file or malformed JSON." ++ f"[PowerCloudTokenManager] _read_cache: failed to read token cache read due to missing file or malformed JSON: '{e}'" + ) + return {} + +diff --git a/heartbeat/powervs-subnet.in b/heartbeat/powervs-subnet.in +index 062b1235e..b8f3864e9 100755 +--- a/heartbeat/powervs-subnet.in ++++ b/heartbeat/powervs-subnet.in +@@ -837,8 +837,9 @@ def start_action( + if rc != ocf.OCF_SUCCESS: + return rc + +- if monitor_action(**res_options) != ocf.OCF_SUCCESS: +- raise PowerCloudAPIError(f"start_action: start subnet: {ws.subnet_name} failed") ++ rc = monitor_action(**res_options) ++ if rc != ocf.OCF_SUCCESS: ++ raise PowerCloudAPIError(f"start_action: start subnet: {ws.subnet_name} failed", rc) + + ocf.logger.info( + f"start_action: finished, added connection {conn_name} for subnet {ws.subnet_name}" +@@ -872,8 +873,9 @@ def stop_action( + + ws.subnet_remove() + +- if monitor_action(**res_options) != ocf.OCF_NOT_RUNNING: +- raise PowerCloudAPIError(f"stop_action: stop subnet {ws.subnet_name} failed") ++ rc = monitor_action(**res_options) ++ if rc != ocf.OCF_NOT_RUNNING: ++ raise PowerCloudAPIError(f"stop_action: stop subnet {ws.subnet_name} failed", rc) + + ocf.logger.info( + f"stop_action: finished, deleted connection for subnet {ws.subnet_name}" diff --git a/resource-agents.spec b/resource-agents.spec index f05f173..b928578 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -45,7 +45,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.10.0 -Release: 105%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 106%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: %{upstream_prefix}-%{upstream_version}.tar.gz @@ -196,6 +196,7 @@ Patch143: RHEL-132052-podman-etcd-prevent-retries-on-fatal-errors.patch Patch144: RHEL-133937-podman-etcd-align-variable-names-with-etcd-3.6-pod-manifest.patch Patch145: RHEL-139519-podman-etcd-verify-no-containers-running-or-being-deleted.patch Patch146: RHEL-42513-powervs-subnet-wait-for-IP.patch +Patch147: RHEL-143527-powervs-move-ip-powervs-subnet-fix-error-logging.patch # bundled ha-cloud-support libs Patch500: ha-cloud-support-aliyun.patch @@ -487,6 +488,7 @@ exit 1 %patch -p1 -P 144 %patch -p1 -P 145 %patch -p1 -P 146 +%patch -p1 -P 147 # bundled ha-cloud-support libs %patch -p1 -P 500 @@ -819,6 +821,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Thu Jan 22 2026 Oyvind Albrigtsen - 4.10.0-106 +- powervs-move-ip/powervs-subnet: fix error logging + + Resolves: RHEL-143527 + * Wed Jan 14 2026 Oyvind Albrigtsen - 4.10.0-105 - powervs-subnet: new resource agent