Blame SOURCES/bz2116941-ethmonitor-ovsmonitor-pgsql-fix-attrd_updater-q.patch

4ff291
From 0063164d72bbaca68f12a2f0a7dbae9ccb41fa39 Mon Sep 17 00:00:00 2001
4ff291
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
4ff291
Date: Tue, 26 Jul 2022 09:08:26 +0200
4ff291
Subject: [PATCH] ethmonitor/ovsmonitor/pgsql: remove ignored attrd_updater
4ff291
 "-q" parameter
4ff291
4ff291
attrd_updater in 2.1.3 no longer ignores the -q parameter, which makes
4ff291
these agents break. It never did anything in attrd_updater, and is
4ff291
probably left-over from copy/paste crm_attribute code that got changed
4ff291
to attrd_updater.
4ff291
---
4ff291
 heartbeat/ethmonitor | 2 +-
4ff291
 heartbeat/ovsmonitor | 2 +-
4ff291
 heartbeat/pgsql      | 8 ++++----
4ff291
 3 files changed, 6 insertions(+), 6 deletions(-)
4ff291
4ff291
diff --git a/heartbeat/ethmonitor b/heartbeat/ethmonitor
4ff291
index ba8574131..451738a0b 100755
4ff291
--- a/heartbeat/ethmonitor
4ff291
+++ b/heartbeat/ethmonitor
4ff291
@@ -464,7 +464,7 @@ END
4ff291
 
4ff291
 set_cib_value() {
4ff291
 	local score=`expr $1 \* $OCF_RESKEY_multiplier`
4ff291
-	attrd_updater -n $ATTRNAME -v $score -q
4ff291
+	attrd_updater -n $ATTRNAME -v $score
4ff291
 	local rc=$?
4ff291
 	case $rc in
4ff291
 		0) ocf_log debug "attrd_updater: Updated $ATTRNAME = $score" ;;
4ff291
diff --git a/heartbeat/ovsmonitor b/heartbeat/ovsmonitor
4ff291
index 872ce86eb..6765da4b9 100755
4ff291
--- a/heartbeat/ovsmonitor
4ff291
+++ b/heartbeat/ovsmonitor
4ff291
@@ -355,7 +355,7 @@ END
4ff291
 
4ff291
 set_cib_value() {
4ff291
 	local score=`expr $1 \* $OCF_RESKEY_multiplier`
4ff291
-	attrd_updater -n $ATTRNAME -v $score -q
4ff291
+	attrd_updater -n $ATTRNAME -v $score
4ff291
 	local rc=$?
4ff291
 	case $rc in
4ff291
 		0) ocf_log debug "attrd_updater: Updated $ATTRNAME = $score" ;;
4ff291
diff --git a/heartbeat/pgsql b/heartbeat/pgsql
4ff291
index 94aceb324..e93d66855 100755
4ff291
--- a/heartbeat/pgsql
4ff291
+++ b/heartbeat/pgsql
4ff291
@@ -808,7 +808,7 @@ pgsql_real_stop() {
4ff291
     local stop_escalate
4ff291
 
4ff291
     if ocf_is_true ${OCF_RESKEY_check_wal_receiver}; then
4ff291
-        attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -D -q
4ff291
+        attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -D
4ff291
     fi
4ff291
 
4ff291
     if ! pgsql_status
4ff291
@@ -937,16 +937,16 @@ pgsql_wal_receiver_status() {
4ff291
     receiver_parent_pids=`ps -ef | tr -s " " | grep "[w]al\s*receiver" | cut -d " " -f 3`
4ff291
 
4ff291
     if echo "$receiver_parent_pids" | grep -q -w "$PID" ; then
4ff291
-        attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -v "normal" -q
4ff291
+        attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -v "normal"
4ff291
         return 0
4ff291
     fi
4ff291
 
4ff291
     if [ $pgsql_real_monitor_status -eq "$OCF_RUNNING_MASTER" ]; then
4ff291
-        attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -v "normal (master)" -q
4ff291
+        attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -v "normal (master)"
4ff291
         return 0
4ff291
     fi
4ff291
 
4ff291
-    attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -v "ERROR" -q
4ff291
+    attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -v "ERROR"
4ff291
     ocf_log warn "wal receiver process is not running"
4ff291
     return 1
4ff291
 }