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