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