diff --git a/RHEL-143524-powervs-move-ip-powervs-subnet-fix-error-logging.patch b/RHEL-143524-powervs-move-ip-powervs-subnet-fix-error-logging.patch new file mode 100644 index 0000000..9558783 --- /dev/null +++ b/RHEL-143524-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 103cd18..6343b2c 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.16.0 -Release: 49%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 50%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPL-2.0-or-later AND LGPL-2.1-or-later URL: https://github.com/ClusterLabs/resource-agents Source0: %{upstream_prefix}-%{upstream_version}.tar.gz @@ -114,6 +114,7 @@ Patch61: RHEL-132047-podman-etcd-prevent-retries-on-fatal-errors.patch Patch62: RHEL-133928-podman-etcd-align-variable-names-with-etcd-3.6-pod-manifest.patch Patch63: RHEL-139066-podman-etcd-verify-no-containers-running-or-being-deleted.patch Patch64: RHEL-50380-powervs-subnet-wait-for-IP.patch +Patch65: RHEL-143524-powervs-move-ip-powervs-subnet-fix-error-logging.patch # bundled ha-cloud-support libs Patch500: ha-cloud-support-aliyun.patch @@ -349,6 +350,7 @@ exit 1 %patch -p1 -P 62 %patch -p1 -P 63 %patch -p1 -P 64 +%patch -p1 -P 65 # bundled ha-cloud-support libs %patch -p1 -P 500 @@ -681,6 +683,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Thu Jan 22 2026 Oyvind Albrigtsen - 4.16.0-50 +- powervs-move-ip/powervs-subnet: fix error logging + + Resolves: RHEL-143524 + * Mon Jan 12 2026 Oyvind Albrigtsen - 4.16.0-49 - powervs-subnet: new resource agent