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