From 4265cc1decb62d027abeaef016de7f8c2075531d Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Fri, 10 Jan 2025 12:58:32 +0100 Subject: [PATCH] - openstack-cinder-volume: wait for volume to be available Resolves: RHEL-72956 --- ...lume-wait-for-volume-to-be-available.patch | 0 ...tach-not-working-during-start-action.patch | 44 +++++++++++++++++++ resource-agents.spec | 8 ++-- 3 files changed, 49 insertions(+), 3 deletions(-) rename RHEL-72956-openstack-cinder-volume-wait-for-volume-to-be-available.patch => RHEL-72956-1-openstack-cinder-volume-wait-for-volume-to-be-available.patch (100%) create mode 100644 RHEL-72956-2-openstack-cinder-volume-fix-detach-not-working-during-start-action.patch diff --git a/RHEL-72956-openstack-cinder-volume-wait-for-volume-to-be-available.patch b/RHEL-72956-1-openstack-cinder-volume-wait-for-volume-to-be-available.patch similarity index 100% rename from RHEL-72956-openstack-cinder-volume-wait-for-volume-to-be-available.patch rename to RHEL-72956-1-openstack-cinder-volume-wait-for-volume-to-be-available.patch diff --git a/RHEL-72956-2-openstack-cinder-volume-fix-detach-not-working-during-start-action.patch b/RHEL-72956-2-openstack-cinder-volume-fix-detach-not-working-during-start-action.patch new file mode 100644 index 0000000..079359b --- /dev/null +++ b/RHEL-72956-2-openstack-cinder-volume-fix-detach-not-working-during-start-action.patch @@ -0,0 +1,44 @@ +From d89b3fb29033c3a60eb0896033af5981c7b9f64a Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Fri, 10 Jan 2025 11:39:48 +0100 +Subject: [PATCH] openstack-cinder-volume: fix detach not working during + start-action after #2000 + +--- + heartbeat/openstack-cinder-volume | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/heartbeat/openstack-cinder-volume b/heartbeat/openstack-cinder-volume +index 2b64d4d88..5bb1acddd 100755 +--- a/heartbeat/openstack-cinder-volume ++++ b/heartbeat/openstack-cinder-volume +@@ -142,9 +142,9 @@ osvol_monitor() { + node_id=$(_get_node_id) + + if ocf_is_true $OCF_RESKEY_volume_local_check ; then +- if [ "$__OCF_ACTION" = "monitor" ] || [ "$__OCF_ACTION" = "start" ] ; then ++ if [ "$__OCF_ACTION" = "monitor" ] || [ "$1" = "quick" ]; then + # +- # Is the volue attached? ++ # Is the volume attached? + # We check the local devices + # + short_volume_id=$(echo $OCF_RESKEY_volume_id | awk '{print substr($0, 0, 20)}') +@@ -158,7 +158,7 @@ osvol_monitor() { + fi + + # +- # Is the volue attached? ++ # Is the volume attached? + # We use the API + # + result=$(run_openstackcli "volume show \ +@@ -249,7 +249,7 @@ osvol_start() { + return $OCF_ERR_GENERIC + fi + +- while ! osvol_monitor; do ++ while ! osvol_monitor quick; do + ocf_log info "Waiting for cinder volume $OCF_RESKEY_volume_id to appear on $node_id" + sleep 1 + done diff --git a/resource-agents.spec b/resource-agents.spec index 528a3d2..f9fe6fe 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -73,7 +73,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.9.0 -Release: 54%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.7 +Release: 54%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.8 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -165,7 +165,8 @@ Patch68: RHEL-32828-db2-fix-OCF_SUCESS-typo.patch Patch69: RHEL-61138-nfsserver-also-stop-rpc-statd-for-nfsv4_only.patch Patch70: RHEL-69297-1-Filesystem-dont-kill-unrelated-processes.patch Patch71: RHEL-69297-2-Filesystem-update-bsd-logic.patch -Patch72: RHEL-72956-openstack-cinder-volume-wait-for-volume-to-be-available.patch +Patch72: RHEL-72956-1-openstack-cinder-volume-wait-for-volume-to-be-available.patch +Patch73: RHEL-72956-2-openstack-cinder-volume-fix-detach-not-working-during-start-action.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -422,6 +423,7 @@ exit 1 %patch -p1 -P 70 %patch -p1 -P 71 %patch -p1 -P 72 +%patch -p1 -P 73 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -1011,7 +1013,7 @@ ccs_update_schema > /dev/null 2>&1 ||: %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog -* Tue Jan 7 2025 Oyvind Albrigtsen - 4.9.0-54.7 +* Fri Jan 10 2025 Oyvind Albrigtsen - 4.9.0-54.8 - openstack-cinder-volume: wait for volume to be available Resolves: RHEL-72956