|
|
f065e8 |
From 64f434014bc198055478a139532c7cc133967c5d Mon Sep 17 00:00:00 2001
|
|
|
f065e8 |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
f065e8 |
Date: Fri, 8 Jul 2022 15:41:34 +0200
|
|
|
f065e8 |
Subject: [PATCH] openstack-agents: fixes
|
|
|
f065e8 |
|
|
|
f065e8 |
- openstack-cinder-volume: dont do volume_local_check during start/stop-action
|
|
|
f065e8 |
- openstack-floating-ip/openstack-virtual-ip: dont fail in validate()
|
|
|
f065e8 |
during probe-calls
|
|
|
f065e8 |
- openstack-floating-ip: fix awk only catching last id for node_port_ids
|
|
|
f065e8 |
---
|
|
|
f065e8 |
heartbeat/openstack-cinder-volume | 2 +-
|
|
|
f065e8 |
heartbeat/openstack-floating-ip | 4 ++--
|
|
|
f065e8 |
heartbeat/openstack-virtual-ip | 4 ++--
|
|
|
f065e8 |
3 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
f065e8 |
|
|
|
f065e8 |
diff --git a/heartbeat/openstack-cinder-volume b/heartbeat/openstack-cinder-volume
|
|
|
f065e8 |
index cc12e58ae..19bf04faf 100755
|
|
|
f065e8 |
--- a/heartbeat/openstack-cinder-volume
|
|
|
f065e8 |
+++ b/heartbeat/openstack-cinder-volume
|
|
|
f065e8 |
@@ -138,7 +138,7 @@ osvol_monitor() {
|
|
|
f065e8 |
|
|
|
f065e8 |
node_id=$(_get_node_id)
|
|
|
f065e8 |
|
|
|
f065e8 |
- if ocf_is_true $OCF_RESKEY_volume_local_check ; then
|
|
|
f065e8 |
+ if [ "$__OCF_ACTION" = "monitor" ] && ocf_is_true $OCF_RESKEY_volume_local_check ; then
|
|
|
f065e8 |
#
|
|
|
f065e8 |
# Is the volue attached?
|
|
|
f065e8 |
# We check the local devices
|
|
|
f065e8 |
diff --git a/heartbeat/openstack-floating-ip b/heartbeat/openstack-floating-ip
|
|
|
f065e8 |
index 8c135cc24..6e2895654 100755
|
|
|
f065e8 |
--- a/heartbeat/openstack-floating-ip
|
|
|
f065e8 |
+++ b/heartbeat/openstack-floating-ip
|
|
|
f065e8 |
@@ -111,7 +111,7 @@ osflip_validate() {
|
|
|
f065e8 |
fi
|
|
|
f065e8 |
|
|
|
f065e8 |
${HA_SBIN_DIR}/attrd_updater --query -n openstack_ports -N $(crm_node -n) > /dev/null 2>&1
|
|
|
f065e8 |
- if [ $? -ne 0 ] ; then
|
|
|
f065e8 |
+ if [ $? -ne 0 ] && ! ocf_is_probe; then
|
|
|
f065e8 |
ocf_log warn "attr_updater failed to get openstack_ports attribute of node $OCF_RESOURCE_INSTANCE"
|
|
|
f065e8 |
return $OCF_ERR_GENERIC
|
|
|
f065e8 |
fi
|
|
|
f065e8 |
@@ -129,7 +129,7 @@ osflip_monitor() {
|
|
|
f065e8 |
node_port_ids=$(${HA_SBIN_DIR}/attrd_updater --query -n openstack_ports -N $(crm_node -n) \
|
|
|
f065e8 |
| awk -F= '{gsub("\"","");print $NF}' \
|
|
|
f065e8 |
| tr ',' ' ' \
|
|
|
f065e8 |
- | awk -F: '{print $NF}')
|
|
|
f065e8 |
+ | awk '{gsub("[^ ]*:", "");print}')
|
|
|
f065e8 |
|
|
|
f065e8 |
# Is the IPÂ active and attached?
|
|
|
f065e8 |
result=$($OCF_RESKEY_openstackcli floating ip show \
|
|
|
f065e8 |
diff --git a/heartbeat/openstack-virtual-ip b/heartbeat/openstack-virtual-ip
|
|
|
f065e8 |
index a1084c420..c654d980a 100755
|
|
|
f065e8 |
--- a/heartbeat/openstack-virtual-ip
|
|
|
f065e8 |
+++ b/heartbeat/openstack-virtual-ip
|
|
|
f065e8 |
@@ -119,7 +119,7 @@ osvip_validate() {
|
|
|
f065e8 |
get_config
|
|
|
f065e8 |
|
|
|
f065e8 |
${HA_SBIN_DIR}/attrd_updater --query -n openstack_ports -N $(crm_node -n) > /dev/null 2>&1
|
|
|
f065e8 |
- if [ $? -ne 0 ] ; then
|
|
|
f065e8 |
+ if [ $? -ne 0 ] && ! ocf_is_probe; then
|
|
|
f065e8 |
ocf_log warn "attr_updater failed to get openstack_ports attribute of node $OCF_RESOURCE_INSTANCE"
|
|
|
f065e8 |
return $OCF_ERR_GENERIC
|
|
|
f065e8 |
fi
|
|
|
f065e8 |
@@ -136,7 +136,7 @@ osvip_monitor() {
|
|
|
f065e8 |
--format value \
|
|
|
f065e8 |
--column allowed_address_pairs \
|
|
|
f065e8 |
${node_port_id})
|
|
|
f065e8 |
- if echo $result | grep -q $OCF_RESKEY_ip ; then
|
|
|
f065e8 |
+ if echo $result | grep -q "$OCF_RESKEY_ip"; then
|
|
|
f065e8 |
${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n openstack_virtual_ip -v $OCF_RESKEY_ip
|
|
|
f065e8 |
|
|
|
f065e8 |
return $OCF_SUCCESS
|