- powervs-subnet: wait until IP is activated before running
monitor-check Resolves: RHEL-42513
This commit is contained in:
parent
284f06e7c4
commit
c67f12fc45
43
RHEL-42513-powervs-subnet-wait-for-IP.patch
Normal file
43
RHEL-42513-powervs-subnet-wait-for-IP.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 0b4bf9c23eb60455da6c6a16c1df19282ab2a8b5 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Fri, 9 Jan 2026 12:56:14 +0100
|
||||
Subject: [PATCH] powervs-subnet: wait until IP is activated before running
|
||||
monitor-check
|
||||
|
||||
---
|
||||
heartbeat/powervs-subnet.in | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/powervs-subnet.in b/heartbeat/powervs-subnet.in
|
||||
index 84e86c0c4..062b1235e 100755
|
||||
--- a/heartbeat/powervs-subnet.in
|
||||
+++ b/heartbeat/powervs-subnet.in
|
||||
@@ -243,7 +243,16 @@ class nmcli:
|
||||
|
||||
@staticmethod
|
||||
def up(name, **kwargs):
|
||||
- return nmcli._nmcli_cmd("connection", "up", name, **kwargs)
|
||||
+ nmcli._nmcli_cmd("connection", "up", name, **kwargs)
|
||||
+
|
||||
+ for i in range(1, 10):
|
||||
+ time.sleep(1)
|
||||
+ status = nmcli._nmcli_cmd("connection", "show", name, **kwargs)
|
||||
+ if len(status.get("IP4.ADDRESS[1]", "")) > 0:
|
||||
+ return ocf.OCF_SUCCESS
|
||||
+ ocf.logger.warning(f"nmcli.connection.up: check {i} of 10: IP not yet available.")
|
||||
+
|
||||
+ return ocf.OCF_ERR_GENERIC
|
||||
|
||||
@staticmethod
|
||||
def find(match_key, match_value):
|
||||
@@ -824,7 +833,9 @@ def start_action(
|
||||
conn_options.update({"802-3-ethernet.mtu": "9000", "ethtool.feature-tso": "on"})
|
||||
|
||||
nmcli.connection.add(conn_name, options=conn_options)
|
||||
- nmcli.connection.up(conn_name)
|
||||
+ rc = nmcli.connection.up(conn_name)
|
||||
+ 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")
|
||||
@ -45,7 +45,7 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.10.0
|
||||
Release: 104%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
Release: 105%{?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
|
||||
@ -195,6 +195,7 @@ Patch142: RHEL-131185-podman-etcd-prevent-learner-from-starting-before-cluster-i
|
||||
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
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
Patch500: ha-cloud-support-aliyun.patch
|
||||
@ -485,6 +486,7 @@ exit 1
|
||||
%patch -p1 -P 143
|
||||
%patch -p1 -P 144
|
||||
%patch -p1 -P 145
|
||||
%patch -p1 -P 146
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
%patch -p1 -P 500
|
||||
@ -817,6 +819,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
|
||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||
|
||||
%changelog
|
||||
* Wed Jan 14 2026 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-105
|
||||
- powervs-subnet: new resource agent
|
||||
|
||||
Resolves: RHEL-42513
|
||||
|
||||
* Thu Jan 8 2026 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-104
|
||||
- podman-etcd: verify that no static pod containers are running or
|
||||
being deleted before starting
|
||||
|
||||
Loading…
Reference in New Issue
Block a user