Commit
e09f04669053 ("qa/workunits/rbd: mirror group functional tests")
moved the kill invocation in stop_mirror() from outside of the wait loop
to inside. This is wrong because the signal should be sent just once:
rbd-mirror daemon installs a oneshot handler for SIGINT and SIGTERM and
a subsequent signal immediately kills the process.
The same commit also erroneously changed RBD_MIRROR_INSTANCES default
for all rbd_mirror_helpers.sh users instead of just group tests.
This fixes sporadic failures in "TEST: no blocklists".
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
set -ex
fi
-MIRROR_POOL_MODE=image
-MIRROR_IMAGE_MODE=snapshot
+RBD_MIRROR_INSTANCES=${RBD_MIRROR_INSTANCES:-1}
+RBD_MIRROR_MODE=snapshot
. $(dirname $0)/rbd_mirror_helpers.sh
export RBD_MIRROR_NOCLEANUP=1
export RBD_MIRROR_TEMDIR=/tmp/tmp.rbd_mirror
-export RBD_MIRROR_MODE=snapshot
group0=test-group0
group1=test-group1
echo "Test name: $test_name"
echo "Features: $RBD_IMAGE_FEATURES"
+RBD_MIRROR_INSTANCES=${RBD_MIRROR_INSTANCES:-1}
+RBD_MIRROR_MODE=snapshot
+
# save and clear the cli args (can't call rbd_mirror_helpers with these defined)
args=("$@")
set --
exit 1
fi
-RBD_MIRROR_INSTANCES=${RBD_MIRROR_INSTANCES:-1}
+RBD_MIRROR_INSTANCES=${RBD_MIRROR_INSTANCES:-2}
CLUSTER1=cluster1
CLUSTER2=cluster2
local cluster=$1
CEPH_ARGS='' ${CEPH_SRC}/mstart.sh ${cluster} -n ${RBD_MIRROR_VARGS}
+
cd ${CEPH_ROOT}
rm -f ${TEMPDIR}/${cluster}.conf
ln -s $(readlink -f run/${cluster}/ceph.conf) \
pid=$(cat $(daemon_pid_file "${cluster}") 2>/dev/null) || :
if [ -n "${pid}" ]
then
+ kill ${sig} ${pid}
for s in 1 2 4 8 16 32; do
- kill ${sig} ${pid}
sleep $s
ps auxww | awk -v pid=${pid} '$2 == pid {print; exit 1}' && break
done