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

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