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

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