mirror of
https://github.com/ceph/ceph
synced 2025-01-19 01:21:49 +00:00
qa/workunits/rbd: tweaks to use RBD_MIRROR_USE_EXISTING_CLUSTER locally
This var is mostly used when running rbd_mirror test scripts on teuthology. It can be used locally though to speedup re-running the tests: Set a test temp directory: export RBD_MIRROR_TEMDIR=/tmp/tmp.rbd_mirror Run the tests the first time with NOCLEANUP flag (the cluster and daemons are not stopped on finish): RBD_MIRROR_NOCLEANUP=1 ../qa/workunits/rbd/rbd_mirror.sh Now, to re-run the test without restarting the cluster, run cleanup with USE_EXISTING_CLUSTER flag: RBD_MIRROR_USE_EXISTING_CLUSTER=1 \ ../qa/workunits/rbd/rbd_mirror_ha.sh cleanup and then run the tests: RBD_MIRROR_USE_EXISTING_CLUSTER=1 ../qa/workunits/rbd/rbd_mirror_ha.sh Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
parent
c802b9df0b
commit
2bb480e8c3
@ -180,8 +180,10 @@ setup()
|
||||
trap cleanup INT TERM EXIT
|
||||
|
||||
if [ -n "${RBD_MIRROR_TEMDIR}" ]; then
|
||||
test -d "${RBD_MIRROR_TEMDIR}" ||
|
||||
mkdir "${RBD_MIRROR_TEMDIR}"
|
||||
TEMPDIR="${RBD_MIRROR_TEMDIR}"
|
||||
cd ${TEMPDIR}
|
||||
else
|
||||
TEMPDIR=`mktemp -d`
|
||||
fi
|
||||
@ -191,8 +193,10 @@ setup()
|
||||
${CEPH_SRC}/mstart.sh ${CLUSTER1} -n ${RBD_MIRROR_VARGS}
|
||||
${CEPH_SRC}/mstart.sh ${CLUSTER2} -n ${RBD_MIRROR_VARGS}
|
||||
|
||||
rm -f ${TEMPDIR}/${CLUSTER1}.conf
|
||||
ln -s $(readlink -f run/${CLUSTER1}/ceph.conf) \
|
||||
${TEMPDIR}/${CLUSTER1}.conf
|
||||
rm -f ${TEMPDIR}/${CLUSTER2}.conf
|
||||
ln -s $(readlink -f run/${CLUSTER2}/ceph.conf) \
|
||||
${TEMPDIR}/${CLUSTER2}.conf
|
||||
|
||||
@ -238,6 +242,7 @@ cleanup()
|
||||
ceph --cluster ${CLUSTER1} osd pool rm ${PARENT_POOL} ${PARENT_POOL} --yes-i-really-really-mean-it
|
||||
ceph --cluster ${CLUSTER2} osd pool rm ${PARENT_POOL} ${PARENT_POOL} --yes-i-really-really-mean-it
|
||||
fi
|
||||
test "${RBD_MIRROR_TEMDIR}" = "${TEMPDIR}" ||
|
||||
rm -Rf ${TEMPDIR}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user