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