Skip to content

Commit

Permalink
ganesha-ha: revised regex exprs for --status
Browse files Browse the repository at this point in the history
better whitespace in regex

This has worked for years, but somehow no longer works on rhel8

Updates: gluster#1000
Change-Id: I2c1a3537573d125608334772ba1a263c55407dd4
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
  • Loading branch information
kalebskeithley authored and xhernandez committed Nov 10, 2020
1 parent 3f93be7 commit 4026fe9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extras/ganesha/scripts/ganesha-ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -948,18 +948,18 @@ status()
# check if the VIP and port block/unblock RAs are on the expected nodes
for n in ${nodes[*]}; do

grep -E -x "${n}-nfs_block \(ocf::heartbeat:portblock\): Started ${n}" > /dev/null 2>&1 ${scratch}
grep -E -x "${n}-nfs_block +\(ocf::heartbeat:portblock\): +Started ${n}" > /dev/null 2>&1 ${scratch}
result=$?
((healthy+=${result}))
grep -E -x "${n}-cluster_ip-1 \(ocf::heartbeat:IPaddr\): Started ${n}" > /dev/null 2>&1 ${scratch}
grep -E -x "${n}-cluster_ip-1 +\(ocf::heartbeat:IPaddr\): +Started ${n}" > /dev/null 2>&1 ${scratch}
result=$?
((healthy+=${result}))
grep -E -x "${n}-nfs_unblock \(ocf::heartbeat:portblock\): Started ${n}" > /dev/null 2>&1 ${scratch}
grep -E -x "${n}-nfs_unblock +\(ocf::heartbeat:portblock\): +Started ${n}" > /dev/null 2>&1 ${scratch}
result=$?
((healthy+=${result}))
done

grep -E "\):\ Stopped|FAILED" > /dev/null 2>&1 ${scratch}
grep -E "\): +Stopped|FAILED" > /dev/null 2>&1 ${scratch}
result=$?

if [ ${result} -eq 0 ]; then
Expand Down

0 comments on commit 4026fe9

Please sign in to comment.