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