- openstack-cinder-volume: wait for volume to be available
- All agents: use grep -E/-F - Filesystem: dont report warnings when creating resource - storage-mon: fix daemon mode bug that caused delayed initial score Resolves: RHEL-72954, RHEL-75574, RHEL-76007, RHEL-76037
This commit is contained in:
parent
6cc9f0480b
commit
8765ef2c32
@ -0,0 +1,63 @@
|
|||||||
|
From 71bc76dc4fa57726e80d0ddcc0bdcfe708af8763 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Fabio M. Di Nitto" <fdinitto@redhat.com>
|
||||||
|
Date: Thu, 5 Dec 2024 11:02:40 +0100
|
||||||
|
Subject: [PATCH] openstack-cinder-volume: wait for volume to be available
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
monitor the vol till it´s attached to the host and avoid a race between
|
||||||
|
openstack APIs receiving the request and completing the operation.
|
||||||
|
|
||||||
|
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||||
|
---
|
||||||
|
heartbeat/openstack-cinder-volume | 29 ++++++++++++++++++-----------
|
||||||
|
1 file changed, 18 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/openstack-cinder-volume b/heartbeat/openstack-cinder-volume
|
||||||
|
index 116442c41b..2b64d4d887 100755
|
||||||
|
--- a/heartbeat/openstack-cinder-volume
|
||||||
|
+++ b/heartbeat/openstack-cinder-volume
|
||||||
|
@@ -141,17 +141,19 @@ osvol_monitor() {
|
||||||
|
|
||||||
|
node_id=$(_get_node_id)
|
||||||
|
|
||||||
|
- if [ "$__OCF_ACTION" = "monitor" ] && ocf_is_true $OCF_RESKEY_volume_local_check ; then
|
||||||
|
- #
|
||||||
|
- # Is the volue attached?
|
||||||
|
- # We check the local devices
|
||||||
|
- #
|
||||||
|
- short_volume_id=$(echo $OCF_RESKEY_volume_id | awk '{print substr($0, 0, 20)}')
|
||||||
|
- if lsblk /dev/disk/by-id/virtio-$short_volume_id 1>/dev/null 2>&1; then
|
||||||
|
- return $OCF_SUCCESS
|
||||||
|
- else
|
||||||
|
- ocf_log warn "$OCF_RESKEY_volume_id is not attached to instance $node_id"
|
||||||
|
- return $OCF_NOT_RUNNING
|
||||||
|
+ if ocf_is_true $OCF_RESKEY_volume_local_check ; then
|
||||||
|
+ if [ "$__OCF_ACTION" = "monitor" ] || [ "$__OCF_ACTION" = "start" ] ; then
|
||||||
|
+ #
|
||||||
|
+ # Is the volue attached?
|
||||||
|
+ # We check the local devices
|
||||||
|
+ #
|
||||||
|
+ short_volume_id=$(echo $OCF_RESKEY_volume_id | awk '{print substr($0, 0, 20)}')
|
||||||
|
+ if lsblk /dev/disk/by-id/virtio-$short_volume_id 1>/dev/null 2>&1; then
|
||||||
|
+ return $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ ocf_log warn "$OCF_RESKEY_volume_id is not attached to instance $node_id"
|
||||||
|
+ return $OCF_NOT_RUNNING
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -247,6 +249,11 @@ osvol_start() {
|
||||||
|
return $OCF_ERR_GENERIC
|
||||||
|
fi
|
||||||
|
|
||||||
|
+ while ! osvol_monitor; do
|
||||||
|
+ ocf_log info "Waiting for cinder volume $OCF_RESKEY_volume_id to appear on $node_id"
|
||||||
|
+ sleep 1
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
From d89b3fb29033c3a60eb0896033af5981c7b9f64a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
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
|
243
RHEL-75574-all-agents-use-grep-E-F.patch
Normal file
243
RHEL-75574-all-agents-use-grep-E-F.patch
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
From 618ee5d013b6f4caeb703ffee6d2d696db887a1f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Tue, 21 Jan 2025 10:07:46 +0100
|
||||||
|
Subject: [PATCH] All agents: use detected grep -E/-F instead of egrep/fgrep
|
||||||
|
when detected
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.ac | 4 ++--
|
||||||
|
heartbeat/IPaddr2 | 2 +-
|
||||||
|
heartbeat/ManageVE.in | 2 +-
|
||||||
|
heartbeat/SAPInstance | 2 +-
|
||||||
|
heartbeat/VirtualDomain | 4 ++--
|
||||||
|
heartbeat/WAS | 2 +-
|
||||||
|
heartbeat/WAS6 | 2 +-
|
||||||
|
heartbeat/docker | 2 +-
|
||||||
|
heartbeat/eDir88.in | 2 +-
|
||||||
|
heartbeat/mysql-proxy | 2 +-
|
||||||
|
heartbeat/portblock | 2 +-
|
||||||
|
heartbeat/rabbitmq-server-ha | 2 +-
|
||||||
|
heartbeat/sapdb.sh | 2 +-
|
||||||
|
heartbeat/smb-share.in | 4 ++--
|
||||||
|
heartbeat/symlink | 2 +-
|
||||||
|
15 files changed, 18 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 951a05430f..bb2bbaded2 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -492,12 +492,12 @@ AC_PATH_PROGS(TEST, test)
|
||||||
|
AC_PATH_PROGS(PING, ping, /bin/ping)
|
||||||
|
AC_PATH_PROGS(IFCONFIG, ifconfig, /sbin/ifconfig)
|
||||||
|
AC_PATH_PROGS(MAILCMD, mailx mail, mail)
|
||||||
|
-AC_PATH_PROGS(EGREP, egrep)
|
||||||
|
AC_PATH_PROGS(RM, rm)
|
||||||
|
+AC_PROG_EGREP
|
||||||
|
+AC_PROG_FGREP
|
||||||
|
|
||||||
|
AC_SUBST(BASH_SHELL)
|
||||||
|
AC_SUBST(MAILCMD)
|
||||||
|
-AC_SUBST(EGREP)
|
||||||
|
AC_SUBST(SHELL)
|
||||||
|
AC_SUBST(PING)
|
||||||
|
AC_SUBST(RM)
|
||||||
|
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
||||||
|
index 27cae2d11a..489826b814 100755
|
||||||
|
--- a/heartbeat/IPaddr2
|
||||||
|
+++ b/heartbeat/IPaddr2
|
||||||
|
@@ -1028,7 +1028,7 @@ ip_served() {
|
||||||
|
echo "partial2"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
- if egrep -q "(^|,)${IP_INC_NO}(,|$)" $IP_CIP_FILE ; then
|
||||||
|
+ if $EGREP -q "(^|,)${IP_INC_NO}(,|$)" $IP_CIP_FILE ; then
|
||||||
|
echo "ok"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
diff --git a/heartbeat/ManageVE.in b/heartbeat/ManageVE.in
|
||||||
|
index f07ca5bdc6..540addd946 100644
|
||||||
|
--- a/heartbeat/ManageVE.in
|
||||||
|
+++ b/heartbeat/ManageVE.in
|
||||||
|
@@ -273,7 +273,7 @@ esac
|
||||||
|
declare -i veidtest1=$?
|
||||||
|
|
||||||
|
# really a number?
|
||||||
|
-`echo "$OCF_RESKEY_veid" | egrep -q '^[[:digit:]]+$'`
|
||||||
|
+`echo "$OCF_RESKEY_veid" | $EGREP -q '^[[:digit:]]+$'`
|
||||||
|
|
||||||
|
if [[ $veidtest1 != 1 || $? != 0 ]]; then
|
||||||
|
ocf_log err "OCF_RESKEY_veid not set or not a number."
|
||||||
|
diff --git a/heartbeat/SAPInstance b/heartbeat/SAPInstance
|
||||||
|
index 26fd541361..95140e9c45 100755
|
||||||
|
--- a/heartbeat/SAPInstance
|
||||||
|
+++ b/heartbeat/SAPInstance
|
||||||
|
@@ -795,7 +795,7 @@ sapinstance_monitor() {
|
||||||
|
esac
|
||||||
|
|
||||||
|
SEARCH=`echo "$OCF_RESKEY_MONITOR_SERVICES" | sed 's/\+/\\\+/g' | sed 's/\./\\\./g'`
|
||||||
|
- if [ `echo "$SERVICE" | egrep -c "$SEARCH"` -eq 1 ]
|
||||||
|
+ if [ `echo "$SERVICE" | $EGREP -c "$SEARCH"` -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ $STATE -eq $OCF_NOT_RUNNING ]
|
||||||
|
then
|
||||||
|
diff --git a/heartbeat/VirtualDomain b/heartbeat/VirtualDomain
|
||||||
|
index 3905695ae1..7db42bd12e 100755
|
||||||
|
--- a/heartbeat/VirtualDomain
|
||||||
|
+++ b/heartbeat/VirtualDomain
|
||||||
|
@@ -975,7 +975,7 @@ VirtualDomain_migrate_to() {
|
||||||
|
sed "s/%n/$target_node/g"`
|
||||||
|
|
||||||
|
# extract migrationuri from options
|
||||||
|
- elif echo "$migrate_opts" | fgrep -qs -- "--migrateuri="; then
|
||||||
|
+ elif echo "$migrate_opts" | $FGREP -qs -- "--migrateuri="; then
|
||||||
|
migrateuri=`echo "$migrate_opts" |
|
||||||
|
sed "s/.*--migrateuri=\([^ ]*\).*/\1/;s/%n/$target_node/g"`
|
||||||
|
|
||||||
|
@@ -1148,7 +1148,7 @@ VirtualDomain_getconfig() {
|
||||||
|
VIRSH_OPTIONS="--connect=${OCF_RESKEY_hypervisor} --quiet"
|
||||||
|
|
||||||
|
# Retrieve the domain name from the xml file.
|
||||||
|
- DOMAIN_NAME=`egrep '[[:space:]]*<name>.*</name>[[:space:]]*$' ${OCF_RESKEY_config} 2>/dev/null | sed -e 's/[[:space:]]*<name>\(.*\)<\/name>[[:space:]]*$/\1/'`
|
||||||
|
+ DOMAIN_NAME=`$EGREP '[[:space:]]*<name>.*</name>[[:space:]]*$' ${OCF_RESKEY_config} 2>/dev/null | sed -e 's/[[:space:]]*<name>\(.*\)<\/name>[[:space:]]*$/\1/'`
|
||||||
|
|
||||||
|
EMULATOR_STATE="${HA_RSCTMP}/VirtualDomain-${DOMAIN_NAME}-emu.state"
|
||||||
|
}
|
||||||
|
diff --git a/heartbeat/WAS b/heartbeat/WAS
|
||||||
|
index 15b56e99e0..44aa83e20a 100755
|
||||||
|
--- a/heartbeat/WAS
|
||||||
|
+++ b/heartbeat/WAS
|
||||||
|
@@ -227,7 +227,7 @@ WASPortInfo() {
|
||||||
|
esac
|
||||||
|
PortCount=`expr $PortCount + 1`
|
||||||
|
done
|
||||||
|
- netstat -ltnp 2>/dev/null| egrep -i "($pat) .*LISTEN" | sed 's%.*LISTEN *%%'
|
||||||
|
+ netstat -ltnp 2>/dev/null| $EGREP -i "($pat) .*LISTEN" | sed 's%.*LISTEN *%%'
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
diff --git a/heartbeat/WAS6 b/heartbeat/WAS6
|
||||||
|
index 9e18cd682d..e71eec9305 100755
|
||||||
|
--- a/heartbeat/WAS6
|
||||||
|
+++ b/heartbeat/WAS6
|
||||||
|
@@ -196,7 +196,7 @@ WASPortInfo() {
|
||||||
|
esac
|
||||||
|
PortCount=`expr $PortCount + 1`
|
||||||
|
done
|
||||||
|
- netstat -ltnp 2>/dev/null| egrep -i "($pat) .*LISTEN" | sed 's%.*LISTEN *%%'
|
||||||
|
+ netstat -ltnp 2>/dev/null| $EGREP -i "($pat) .*LISTEN" | sed 's%.*LISTEN *%%'
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
diff --git a/heartbeat/docker b/heartbeat/docker
|
||||||
|
index 50523db934..d51c468977 100755
|
||||||
|
--- a/heartbeat/docker
|
||||||
|
+++ b/heartbeat/docker
|
||||||
|
@@ -512,7 +512,7 @@ image_exists()
|
||||||
|
# - image
|
||||||
|
# - repository:port/image
|
||||||
|
# - docker.io/image (some distro will display "docker.io/" as prefix)
|
||||||
|
- docker images | awk '{print $1 ":" $2}' | egrep -q -s "^(docker.io\/|${SERVER_NAME}\/)?${IMAGE_NAME}:${IMAGE_TAG}\$"
|
||||||
|
+ docker images | awk '{print $1 ":" $2}' | $EGREP -q -s "^(docker.io\/|${SERVER_NAME}\/)?${IMAGE_NAME}:${IMAGE_TAG}\$"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
# image found
|
||||||
|
return 0
|
||||||
|
diff --git a/heartbeat/eDir88.in b/heartbeat/eDir88.in
|
||||||
|
index cd945d2c31..9a21ff852d 100644
|
||||||
|
--- a/heartbeat/eDir88.in
|
||||||
|
+++ b/heartbeat/eDir88.in
|
||||||
|
@@ -331,7 +331,7 @@ eDir_monitor() {
|
||||||
|
|
||||||
|
# Monitor IDM first, as it will start before LDAP
|
||||||
|
if [ $MONITOR_IDM -eq 1 ]; then
|
||||||
|
- RET=$($NDSTRACE --config-file "$NDSCONF" -c modules | egrep -i '^vrdim.*Running' | awk '{print $1}')
|
||||||
|
+ RET=$($NDSTRACE --config-file "$NDSCONF" -c modules | $EGREP -i '^vrdim.*Running' | awk '{print $1}')
|
||||||
|
if [ "$RET" != "vrdim" ]; then
|
||||||
|
ocf_log err "eDirectory IDM engine isn't running ($NDSCONF)."
|
||||||
|
return $OCF_ERR_GENERIC
|
||||||
|
diff --git a/heartbeat/mysql-proxy b/heartbeat/mysql-proxy
|
||||||
|
index 013c5e4ec3..2815860d72 100755
|
||||||
|
--- a/heartbeat/mysql-proxy
|
||||||
|
+++ b/heartbeat/mysql-proxy
|
||||||
|
@@ -572,7 +572,7 @@ mysqlproxy_validate_all()
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check for valid log-level
|
||||||
|
- echo $log_level | egrep -q "^(error|warning|info|message|debug|)$"
|
||||||
|
+ echo $log_level | $EGREP -q "^(error|warning|info|message|debug|)$"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
ocf_log err "MySQL Proxy log level '$log_level' not in valid range error|warning|info|message|debug"
|
||||||
|
return $OCF_ERR_CONFIGURED
|
||||||
|
diff --git a/heartbeat/portblock b/heartbeat/portblock
|
||||||
|
index e88ecc2a13..450e372081 100755
|
||||||
|
--- a/heartbeat/portblock
|
||||||
|
+++ b/heartbeat/portblock
|
||||||
|
@@ -529,7 +529,7 @@ IptablesStop()
|
||||||
|
CheckPort() {
|
||||||
|
# Examples of valid port: "1080", "1", "0080"
|
||||||
|
# Examples of invalid port: "1080bad", "0", "0000", ""
|
||||||
|
- echo $1 |egrep -qx '[0-9]+(:[0-9]+)?(,[0-9]+(:[0-9]+)?)*'
|
||||||
|
+ echo $1 | $EGREP -qx '[0-9]+(:[0-9]+)?(,[0-9]+(:[0-9]+)?)*'
|
||||||
|
}
|
||||||
|
|
||||||
|
IptablesValidateAll()
|
||||||
|
diff --git a/heartbeat/rabbitmq-server-ha b/heartbeat/rabbitmq-server-ha
|
||||||
|
index 8b3cd9ee90..f483380359 100755
|
||||||
|
--- a/heartbeat/rabbitmq-server-ha
|
||||||
|
+++ b/heartbeat/rabbitmq-server-ha
|
||||||
|
@@ -529,7 +529,7 @@ proc_stop()
|
||||||
|
pid="none"
|
||||||
|
else
|
||||||
|
# check if provide just a number
|
||||||
|
- echo "${pid_param}" | egrep -q '^[0-9]+$'
|
||||||
|
+ echo "${pid_param}" | $EGREP -q '^[0-9]+$'
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
pid="${pid_param}"
|
||||||
|
elif [ -e "${pid_param}" ]; then # check if passed in a pid file
|
||||||
|
diff --git a/heartbeat/sapdb.sh b/heartbeat/sapdb.sh
|
||||||
|
index 66e9854b6c..dccd36e172 100755
|
||||||
|
--- a/heartbeat/sapdb.sh
|
||||||
|
+++ b/heartbeat/sapdb.sh
|
||||||
|
@@ -238,7 +238,7 @@ sapdatabase_monitor() {
|
||||||
|
esac
|
||||||
|
|
||||||
|
SEARCH=`echo "$OCF_RESKEY_MONITOR_SERVICES" | sed 's/\+/\\\+/g' | sed 's/\./\\\./g'`
|
||||||
|
- if [ `echo "$SERVICE" | egrep -c "$SEARCH"` -eq 1 ]
|
||||||
|
+ if [ `echo "$SERVICE" | $EGREP -c "$SEARCH"` -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ $STATE -eq $OCF_NOT_RUNNING ]
|
||||||
|
then
|
||||||
|
diff --git a/heartbeat/smb-share.in b/heartbeat/smb-share.in
|
||||||
|
index 8a1a0a8604..3e5bf60bf1 100755
|
||||||
|
--- a/heartbeat/smb-share.in
|
||||||
|
+++ b/heartbeat/smb-share.in
|
||||||
|
@@ -435,7 +435,7 @@ smb_share_stop() {
|
||||||
|
smb_share_monitor() {
|
||||||
|
RES=$(smbcontrol smbd ping > /dev/null 2>&1)
|
||||||
|
if [ $? -eq 0 ];then
|
||||||
|
- if [ $(testparm -s 2>/dev/null| egrep -c \\[$OCF_RESKEY_share\\]) -eq 1 ];then
|
||||||
|
+ if [ $(testparm -s 2>/dev/null| $EGREP -c \\[$OCF_RESKEY_share\\]) -eq 1 ];then
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
return $OCF_NOT_RUNNING
|
||||||
|
@@ -449,7 +449,7 @@ smb_share_state() {
|
||||||
|
smb_share_checktmpmount
|
||||||
|
RES=$(smbcontrol smbd ping > /dev/null 2>&1)
|
||||||
|
if [ $? -eq 0 ];then
|
||||||
|
- if [ $(testparm -s 2>/dev/null| egrep -c \\[$OCF_RESKEY_share\\]) -eq 1 ];then
|
||||||
|
+ if [ $(testparm -s 2>/dev/null| $EGREP -c \\[$OCF_RESKEY_share\\]) -eq 1 ];then
|
||||||
|
ocf_log info "Samba share $OCF_RESKEY_share is active"
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
diff --git a/heartbeat/symlink b/heartbeat/symlink
|
||||||
|
index decd9f74e5..82a667a01f 100755
|
||||||
|
--- a/heartbeat/symlink
|
||||||
|
+++ b/heartbeat/symlink
|
||||||
|
@@ -123,7 +123,7 @@ symlink_monitor() {
|
||||||
|
ocf_log debug "$OCF_RESKEY_link exists but is not a symbolic link, will be moved to ${OCF_RESKEY_link}${OCF_RESKEY_backup_suffix} on start"
|
||||||
|
rc=$OCF_NOT_RUNNING
|
||||||
|
fi
|
||||||
|
- elif readlink -m "$OCF_RESKEY_link" | egrep -q "^$(readlink -m ${OCF_RESKEY_target})$"; then
|
||||||
|
+ elif readlink -m "$OCF_RESKEY_link" | $EGREP -q "^$(readlink -m ${OCF_RESKEY_target})$"; then
|
||||||
|
ocf_log debug "$OCF_RESKEY_link exists and is a symbolic link to ${OCF_RESKEY_target}."
|
||||||
|
rc=$OCF_SUCCESS
|
||||||
|
else
|
@ -0,0 +1,23 @@
|
|||||||
|
From 2ba4b0c05902da4520a8931b9417b74c5659b5d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Satomi OSAWA <satomi.t.osawa@gmail.com>
|
||||||
|
Date: Thu, 23 Jan 2025 10:55:28 +0900
|
||||||
|
Subject: [PATCH] To avoid the Warning when executing the pcs resource create
|
||||||
|
command, the INFO log message in validate-all operation will be suppressed.
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/Filesystem | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
||||||
|
index b48bee142..0c43220df 100755
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -1145,7 +1145,7 @@ check_binary $FSCK
|
||||||
|
check_binary $MOUNT
|
||||||
|
check_binary $UMOUNT
|
||||||
|
|
||||||
|
-if [ "$OP" != "monitor" ]; then
|
||||||
|
+if [ "$OP" != "monitor" ] && [ "$OP" != "validate-all" ]; then
|
||||||
|
ocf_log info "Running $OP for $DEVICE on $MOUNTPOINT"
|
||||||
|
fi
|
||||||
|
|
23
RHEL-76037-1-storage_mon-remove-unused-variables.patch
Normal file
23
RHEL-76037-1-storage_mon-remove-unused-variables.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From a1e22c5c612f369bac0830588642560dcea92e7c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fujii Masao <fujii@postgresql.org>
|
||||||
|
Date: Sat, 9 Nov 2024 02:33:37 +0900
|
||||||
|
Subject: [PATCH] Remove unused macro variables from storage_mon.c.
|
||||||
|
|
||||||
|
---
|
||||||
|
tools/storage_mon.c | 3 ---
|
||||||
|
1 file changed, 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/storage_mon.c b/tools/storage_mon.c
|
||||||
|
index f94268f6f..2519a9e72 100644
|
||||||
|
--- a/tools/storage_mon.c
|
||||||
|
+++ b/tools/storage_mon.c
|
||||||
|
@@ -33,9 +33,6 @@
|
||||||
|
#define DEFAULT_PIDFILE HA_VARRUNDIR "storage_mon.pid"
|
||||||
|
#define DEFAULT_ATTRNAME "#health-storage_mon"
|
||||||
|
#define SMON_GET_RESULT_COMMAND "get_check_value"
|
||||||
|
-#define SMON_RESULT_OK "green"
|
||||||
|
-#define SMON_RESULT_NG "red"
|
||||||
|
-#define SMON_RESULT_COMMAND_ERROR "unknown command"
|
||||||
|
#define SMON_BUFF_1MEG 1048576
|
||||||
|
#define SMON_MAX_IPCSNAME 256
|
||||||
|
#define SMON_MAX_MSGSIZE 128
|
@ -0,0 +1,79 @@
|
|||||||
|
From 46715c638829598d949dffab0898fe4c07074895 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
|
||||||
|
Date: Thu, 21 Nov 2024 15:21:19 +0900
|
||||||
|
Subject: [PATCH 1/2] High: storage-mon: Correct the timing of setting
|
||||||
|
notification values to storage-mon(RA) clients.
|
||||||
|
|
||||||
|
---
|
||||||
|
tools/storage_mon.c | 17 ++++++++---------
|
||||||
|
1 file changed, 8 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/storage_mon.c b/tools/storage_mon.c
|
||||||
|
index 2519a9e72..27d2ff1d1 100644
|
||||||
|
--- a/tools/storage_mon.c
|
||||||
|
+++ b/tools/storage_mon.c
|
||||||
|
@@ -320,7 +320,14 @@ static int32_t sigchld_handler(int32_t sig, void *data)
|
||||||
|
|
||||||
|
finished_count++;
|
||||||
|
test_forks[index] = 0;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ /* Update the result value for the client response once all checks have completed. */
|
||||||
|
+ if (device_count == finished_count) {
|
||||||
|
+ response_final_score = final_score;
|
||||||
|
+ if (!daemon_check_first_all_devices) {
|
||||||
|
+ daemon_check_first_all_devices = TRUE;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
@@ -441,15 +448,7 @@ static int test_device_main(gpointer data)
|
||||||
|
if (is_child_runnning()) {
|
||||||
|
device_check = FALSE;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- if (device_count == finished_count && device_check) {
|
||||||
|
- /* Update the result value for the client response once all checks have completed. */
|
||||||
|
- response_final_score = final_score;
|
||||||
|
|
||||||
|
- if (!daemon_check_first_all_devices) {
|
||||||
|
- daemon_check_first_all_devices = TRUE;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (device_check) {
|
||||||
|
|
||||||
|
From 1201390fb219d1b566c5d31463daacef60c31ab4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
|
||||||
|
Date: Thu, 21 Nov 2024 15:43:33 +0900
|
||||||
|
Subject: [PATCH 2/2] Mid: storage-mon RA: Wait until monitor confirms the
|
||||||
|
startup pid according to the OCF resource specification.
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/storage-mon.in | 11 +++++++++++
|
||||||
|
1 file changed, 11 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/storage-mon.in b/heartbeat/storage-mon.in
|
||||||
|
index 284dec30f..7c9943d4f 100644
|
||||||
|
--- a/heartbeat/storage-mon.in
|
||||||
|
+++ b/heartbeat/storage-mon.in
|
||||||
|
@@ -325,6 +325,17 @@ storage-mon_start() {
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
return $OCF_ERR_GENERIC
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
+ #Wait until monitor confirms the startup pid according to the ocf resource specification.
|
||||||
|
+ while true; do
|
||||||
|
+ storage-mon_monitor pid_check_only
|
||||||
|
+ rc="$?"
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]; then
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ sleep 1
|
||||||
|
+ ocf_log debug "storage-mon daemon still hasn't started yet. Waiting..."
|
||||||
|
+ done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
@ -45,7 +45,7 @@
|
|||||||
Name: resource-agents
|
Name: resource-agents
|
||||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||||
Version: 4.16.0
|
Version: 4.16.0
|
||||||
Release: 1%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
Release: 2%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
URL: https://github.com/ClusterLabs/resource-agents
|
URL: https://github.com/ClusterLabs/resource-agents
|
||||||
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
||||||
@ -53,6 +53,12 @@ Patch0: pgsqlms-ra.patch
|
|||||||
Patch1: RHEL-66293-1-aws-agents-reuse-imds-token-until-it-expires.patch
|
Patch1: RHEL-66293-1-aws-agents-reuse-imds-token-until-it-expires.patch
|
||||||
Patch2: RHEL-66293-2-aws-agents-reuse-imds-token-improvements.patch
|
Patch2: RHEL-66293-2-aws-agents-reuse-imds-token-improvements.patch
|
||||||
Patch3: RHEL-68740-awsvip-add-interface-parameter.patch
|
Patch3: RHEL-68740-awsvip-add-interface-parameter.patch
|
||||||
|
Patch4: RHEL-72954-1-openstack-cinder-volume-wait-for-volume-to-be-available.patch
|
||||||
|
Patch5: RHEL-72954-2-openstack-cinder-volume-fix-detach-not-working-during-start-action.patch
|
||||||
|
Patch6: RHEL-75574-all-agents-use-grep-E-F.patch
|
||||||
|
Patch7: RHEL-76007-Filesystem-dont-report-warnings-when-creating-resource.patch
|
||||||
|
Patch8: RHEL-76037-1-storage_mon-remove-unused-variables.patch
|
||||||
|
Patch9: RHEL-76037-2-fix-daemon-mode-bug-that-caused-delayed-initial-score.patch
|
||||||
|
|
||||||
# bundled ha-cloud-support libs
|
# bundled ha-cloud-support libs
|
||||||
Patch500: ha-cloud-support-aliyun.patch
|
Patch500: ha-cloud-support-aliyun.patch
|
||||||
@ -114,14 +120,14 @@ Requires: /usr/sbin/fuser
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Filesystem / fs.sh / netfs.sh
|
# Filesystem / fs.sh / netfs.sh
|
||||||
%if 0%{?fedora} > 39 || 0%{?centos} > 9 || 0%{?rhel} > 9 || 0%{?suse_version}
|
%if 0%{?fedora} > 39 || 0%{?rhel} > 9 || 0%{?suse_version}
|
||||||
Requires: /usr/sbin/fsck
|
Requires: /usr/sbin/fsck
|
||||||
%else
|
%else
|
||||||
Requires: /sbin/fsck
|
Requires: /sbin/fsck
|
||||||
%endif
|
%endif
|
||||||
Requires: /usr/sbin/fsck.ext2 /usr/sbin/fsck.ext3 /usr/sbin/fsck.ext4
|
Requires: /usr/sbin/fsck.ext2 /usr/sbin/fsck.ext3 /usr/sbin/fsck.ext4
|
||||||
Requires: /usr/sbin/fsck.xfs
|
Requires: /usr/sbin/fsck.xfs
|
||||||
%if 0%{?fedora} > 40 || 0%{?centos} > 9 || 0%{?rhel} > 9 || 0%{?suse_version}
|
%if 0%{?fedora} > 40 || 0%{?rhel} > 9 || 0%{?suse_version}
|
||||||
Requires: /usr/sbin/mount.nfs /usr/sbin/mount.nfs4
|
Requires: /usr/sbin/mount.nfs /usr/sbin/mount.nfs4
|
||||||
%else
|
%else
|
||||||
Requires: /sbin/mount.nfs /sbin/mount.nfs4
|
Requires: /sbin/mount.nfs /sbin/mount.nfs4
|
||||||
@ -141,7 +147,7 @@ Requires: /sbin/ip
|
|||||||
Requires: /usr/sbin/lvm
|
Requires: /usr/sbin/lvm
|
||||||
|
|
||||||
# nfsserver / netfs.sh
|
# nfsserver / netfs.sh
|
||||||
%if 0%{?fedora} > 40 || 0%{?centos} > 9 || 0%{?rhel} > 9 || 0%{?suse_version}
|
%if 0%{?fedora} > 40 || 0%{?rhel} > 9 || 0%{?suse_version}
|
||||||
Requires: /usr/sbin/rpc.statd
|
Requires: /usr/sbin/rpc.statd
|
||||||
%else
|
%else
|
||||||
Requires: /sbin/rpc.statd
|
Requires: /sbin/rpc.statd
|
||||||
@ -161,7 +167,7 @@ Requires: /usr/sbin/ethtool
|
|||||||
Requires: /sbin/rdisc /usr/sbin/arping /bin/ping /bin/ping6
|
Requires: /sbin/rdisc /usr/sbin/arping /bin/ping /bin/ping6
|
||||||
|
|
||||||
# nfsexport.sh
|
# nfsexport.sh
|
||||||
%if 0%{?fedora} > 39 || 0%{?centos} > 9 || 0%{?rhel} > 9
|
%if 0%{?fedora} > 39 || 0%{?rhel} > 9
|
||||||
Requires: /usr/sbin/findfs
|
Requires: /usr/sbin/findfs
|
||||||
Requires: /usr/sbin/quotaon /usr/sbin/quotacheck
|
Requires: /usr/sbin/quotaon /usr/sbin/quotacheck
|
||||||
%else
|
%else
|
||||||
@ -213,6 +219,12 @@ exit 1
|
|||||||
%patch -p1 -P 1
|
%patch -p1 -P 1
|
||||||
%patch -p1 -P 2
|
%patch -p1 -P 2
|
||||||
%patch -p1 -P 3
|
%patch -p1 -P 3
|
||||||
|
%patch -p1 -P 4
|
||||||
|
%patch -p1 -P 5
|
||||||
|
%patch -p1 -P 6
|
||||||
|
%patch -p1 -P 7
|
||||||
|
%patch -p1 -P 8
|
||||||
|
%patch -p1 -P 9
|
||||||
|
|
||||||
# bundled ha-cloud-support libs
|
# bundled ha-cloud-support libs
|
||||||
%patch -p1 -P 500
|
%patch -p1 -P 500
|
||||||
@ -531,6 +543,14 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
|
|||||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 23 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.16.0-2
|
||||||
|
- openstack-cinder-volume: wait for volume to be available
|
||||||
|
- All agents: use grep -E/-F
|
||||||
|
- Filesystem: dont report warnings when creating resource
|
||||||
|
- storage-mon: fix daemon mode bug that caused delayed initial score
|
||||||
|
|
||||||
|
Resolves: RHEL-72954, RHEL-75574, RHEL-76007, RHEL-76037
|
||||||
|
|
||||||
* Tue Nov 26 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.16.0-1
|
* Tue Nov 26 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.16.0-1
|
||||||
- Rebase to resource-agents 4.16.0 upstream release
|
- Rebase to resource-agents 4.16.0 upstream release
|
||||||
- AWS agents: reuse IMDS token until it expires
|
- AWS agents: reuse IMDS token until it expires
|
||||||
|
Loading…
Reference in New Issue
Block a user