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