Blame SOURCES/bz2029706-2-db2-fixes.patch

4f1eaf
From 75eaf06eea8957aa3941823955d1c8fa7933ab1d Mon Sep 17 00:00:00 2001
4f1eaf
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
4f1eaf
Date: Wed, 23 Feb 2022 16:32:21 +0100
4f1eaf
Subject: [PATCH] db2: only warn when notify isnt set, and use
4f1eaf
 ocf_local_nodename() to get node name
4f1eaf
4f1eaf
---
4f1eaf
 heartbeat/db2 | 4 ++--
4f1eaf
 1 file changed, 2 insertions(+), 2 deletions(-)
4f1eaf
4f1eaf
diff --git a/heartbeat/db2 b/heartbeat/db2
4f1eaf
index fa2a45a5d..ea24d33fc 100755
4f1eaf
--- a/heartbeat/db2
4f1eaf
+++ b/heartbeat/db2
4f1eaf
@@ -267,7 +267,7 @@ db2_fal_attrib() {
4f1eaf
 
4f1eaf
     case "$2" in
4f1eaf
         set)
4f1eaf
-        me=$(uname -n)
4f1eaf
+        me=$(ocf_local_nodename)
4f1eaf
 
4f1eaf
         # loop over all member nodes and set attribute
4f1eaf
         crm_node -l |
4f1eaf
@@ -284,7 +284,7 @@ db2_fal_attrib() {
4f1eaf
         get)
4f1eaf
         crm_attribute -l forever -n $attr -G --quiet 2>&1
4f1eaf
         rc=$?
4f1eaf
-        if [ $rc != 0 ]
4f1eaf
+        if ! ocf_is_true "$OCF_RESKEY_CRM_meta_notify" && [ $rc != 0 ]
4f1eaf
         then
4f1eaf
             ocf_log warn "DB2 instance $instance($db2node/$db: can't retrieve attribute $attr, are you sure notifications are enabled ?"
4f1eaf
         fi