d2787b
From fcfd40132624df5e888d53b4a8c4ce1cf7087413 Mon Sep 17 00:00:00 2001
d2787b
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
d2787b
Date: Wed, 2 Jun 2021 07:40:04 -0400
d2787b
Subject: [PATCH 551/584] common-ha: ensure shared_storage is mounted before
d2787b
 setup (#2296)
d2787b
d2787b
If gluster shared-storage isn't mounted, ganesha will fail to start
d2787b
d2787b
commit a249b9020d281d0482db0aeb52e8856acd931e02
d2787b
https://github.com/gluster/glusterfs/issues/2278
d2787b
https://github.com/gluster/glusterfs/pull/2296
d2787b
d2787b
Change-Id: I6ed7044ea6b6c61b013ebe17088bfde311b109b7
d2787b
BUG: 1918018
d2787b
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
d2787b
Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/244592
d2787b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
d2787b
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
d2787b
---
d2787b
 extras/ganesha/scripts/ganesha-ha.sh | 13 +++++++++++++
d2787b
 1 file changed, 13 insertions(+)
d2787b
d2787b
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
d2787b
index 491c61d..012084f 100644
d2787b
--- a/extras/ganesha/scripts/ganesha-ha.sh
d2787b
+++ b/extras/ganesha/scripts/ganesha-ha.sh
d2787b
@@ -195,9 +195,22 @@ setup_cluster()
d2787b
     local servers=${3}
d2787b
     local unclean=""
d2787b
     local quorum_policy="stop"
d2787b
+    local dfresult=""
d2787b
 
d2787b
     logger "setting up cluster ${name} with the following ${servers}"
d2787b
 
d2787b
+    # check that shared_storage is mounted
d2787b
+    dfresult=$(df -T ${HA_VOL_MNT})
d2787b
+    if [[ -z "${dfresult}" ]]; then
d2787b
+        logger "gluster shared_storage is not mounted, exiting..."
d2787b
+        exit 1
d2787b
+    fi
d2787b
+
d2787b
+    if [[ "${dfresult}" != *"fuse.glusterfs"* ]]; then
d2787b
+        logger "gluster shared_storage is not mounted, exiting..."
d2787b
+        exit 1
d2787b
+    fi
d2787b
+
d2787b
     # pcs cluster setup --force ${PCS9OR10_PCS_CNAME_OPTION} ${name} ${servers}
d2787b
     pcs cluster setup --force ${PCS9OR10_PCS_CNAME_OPTION} ${name} --enable ${servers}
d2787b
     if [ $? -ne 0 ]; then
d2787b
-- 
d2787b
1.8.3.1
d2787b