mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
qa/workunits/cephadm/test_cephadm.sh: systemctl stop nfs-server
stop any running nfs servers before attempting a deploy of nfs-ganesha Signed-off-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
parent
606b79b19f
commit
8543e2e50b
@ -89,7 +89,7 @@ fi
|
||||
function expect_false()
|
||||
{
|
||||
set -x
|
||||
if "$@"; then return 1; else return 0; fi
|
||||
if eval "$@"; then return 1; else return 0; fi
|
||||
}
|
||||
|
||||
function is_available()
|
||||
@ -138,6 +138,20 @@ function dump_all_logs()
|
||||
done
|
||||
}
|
||||
|
||||
function nfs_stop()
|
||||
{
|
||||
# stop the running nfs server
|
||||
local units="nfs-server nfs-kernel-server"
|
||||
for unit in $units; do
|
||||
if systemctl status $unit; then
|
||||
$SUDO systemctl stop $unit
|
||||
fi
|
||||
done
|
||||
|
||||
# ensure the NFS port is no longer in use
|
||||
expect_false "$SUDO ss -tlnp '( sport = :nfs )' | grep LISTEN"
|
||||
}
|
||||
|
||||
## prepare + check host
|
||||
$SUDO $CEPHADM check-host
|
||||
|
||||
@ -279,6 +293,7 @@ cond="curl --insecure 'https://localhost:3000' | grep -q 'grafana'"
|
||||
is_available "grafana" "$cond" 30
|
||||
|
||||
# add nfs-ganesha
|
||||
nfs_stop
|
||||
nfs_rados_pool=$(cat ${CEPHADM_SAMPLES_DIR}/nfs.json | jq -r '.["pool"]')
|
||||
$CEPHADM shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \
|
||||
ceph osd pool create $nfs_rados_pool 64
|
||||
|
Loading…
Reference in New Issue
Block a user