cead9d
From 05bd0226716516d37ead173c7d6924225bd474db Mon Sep 17 00:00:00 2001
cead9d
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
cead9d
Date: Wed, 6 May 2020 07:24:38 -0400
cead9d
Subject: [PATCH 371/375] common-ha: cluster status shows "FAILOVER" when
cead9d
 actually HEALTHY
cead9d
cead9d
pacemaker devs change the format of the ouput of `pcs status`
cead9d
cead9d
Expected to find a line in the format:
cead9d
cead9d
    Online: ....
cead9d
cead9d
but now it's
cead9d
cead9d
    * Online: ...
cead9d
cead9d
And the `grep -E "^Online:" no longer finds the list of nodes that
cead9d
are online.
cead9d
cead9d
Also other lines now have '*' in first few characters of the line
cead9d
throwing off `grep -x ...`
cead9d
cead9d
https://review.gluster.org/#/c/glusterfs/+/24403/
cead9d
cead9d
Change-Id: Ia04a89e76914f2a455a755f0a93fa415f60aefd0
cead9d
BUG: 1823706
cead9d
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
cead9d
Reviewed-on: https://code.engineering.redhat.com/gerrit/199442
cead9d
Tested-by: RHGS Build Bot <nigelb@redhat.com>
cead9d
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
cead9d
---
cead9d
 extras/ganesha/scripts/ganesha-ha.sh | 5 +++--
cead9d
 1 file changed, 3 insertions(+), 2 deletions(-)
cead9d
cead9d
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
cead9d
index df333a1..4ecf91b 100644
cead9d
--- a/extras/ganesha/scripts/ganesha-ha.sh
cead9d
+++ b/extras/ganesha/scripts/ganesha-ha.sh
cead9d
@@ -919,8 +919,9 @@ status()
cead9d
     local index=1
cead9d
     local nodes
cead9d
 
cead9d
-    # change tabs to spaces, strip leading spaces
cead9d
-    pcs status | sed -e "s/\t/ /g" -e "s/^[ ]*//" > ${scratch}
cead9d
+    # change tabs to spaces, strip leading spaces, including any 
cead9d
+    # new '*' at the beginning of a line introduced in pcs-0.10.x
cead9d
+    pcs status | sed -e "s/\t/ /g" -e "s/^[ ]*\*//" -e "s/^[ ]*//" > ${scratch}
cead9d
 
cead9d
     nodes[0]=${1}; shift
cead9d
 
cead9d
-- 
cead9d
1.8.3.1
cead9d