Skip to content

Commit

Permalink
common-ha: ensure shared_storage is mounted before setup (gluster#2296)
Browse files Browse the repository at this point in the history
If gluster shared-storage isn't mounted, ganesha will fail to start

Change-Id: I6ed7044ea6b6c61b013ebe17088bfde311b109b7
fixes: gluster#2278
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
  • Loading branch information
kalebskeithley authored Mar 26, 2021
1 parent 51c91be commit a249b90
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions extras/ganesha/scripts/ganesha-ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,22 @@ setup_cluster()
local servers=${3}
local unclean=""
local quorum_policy="stop"
local dfresult=""

logger "setting up cluster ${name} with the following ${servers}"

# check that shared_storage is mounted
dfresult=$(df -T ${HA_VOL_MNT})
if [[ -z "${dfresult}" ]]; then
logger "gluster shared_storage is not mounted, exiting..."
exit 1
fi

if [[ "${dfresult}" != *"fuse.glusterfs"* ]]; then
logger "gluster shared_storage is not mounted, exiting..."
exit 1
fi

# pcs cluster setup --force ${PCS9OR10_PCS_CNAME_OPTION} ${name} ${servers}
pcs cluster setup --force ${PCS9OR10_PCS_CNAME_OPTION} ${name} --enable ${servers}
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit a249b90

Please sign in to comment.