--- /dev/null
+meta:
+- desc: run the rbd_mirror_stress.sh workunit to test the rbd-mirror daemon
+tasks:
+- workunit:
+ clients:
+ cluster1.client.mirror: [rbd/rbd_mirror_stress.sh]
+ env:
+ # override workunit setting of CEPH_ARGS='--cluster'
+ CEPH_ARGS: ''
+ RBD_MIRROR_INSTANCES: '4'
+ RBD_MIRROR_USE_EXISTING_CLUSTER: '1'
+ RBD_MIRROR_USE_RBD_MIRROR: '1'
+ MIRROR_POOL_MODE: 'pool'
+ MIRROR_IMAGE_MODE: 'journal'
+ timeout: 6h
--- /dev/null
+meta:
+- desc: run the rbd_mirror_stress.sh workunit to test the rbd-mirror daemon
+tasks:
+- workunit:
+ clients:
+ cluster1.client.mirror: [rbd/rbd_mirror_stress.sh]
+ env:
+ # override workunit setting of CEPH_ARGS='--cluster'
+ CEPH_ARGS: ''
+ MIRROR_POOL_MODE: 'image'
+ MIRROR_IMAGE_MODE: 'snapshot'
+ RBD_IMAGE_FEATURES: 'layering,exclusive-lock'
+ RBD_MIRROR_INSTANCES: '4'
+ RBD_MIRROR_USE_EXISTING_CLUSTER: '1'
+ RBD_MIRROR_USE_RBD_MIRROR: '1'
+ timeout: 6h
--- /dev/null
+meta:
+- desc: run the rbd_mirror_stress.sh workunit to test the rbd-mirror daemon
+tasks:
+- workunit:
+ clients:
+ cluster1.client.mirror: [rbd/rbd_mirror_stress.sh]
+ env:
+ # override workunit setting of CEPH_ARGS='--cluster'
+ CEPH_ARGS: ''
+ MIRROR_POOL_MODE: 'image'
+ MIRROR_IMAGE_MODE: 'snapshot'
+ RBD_IMAGE_FEATURES: 'layering,exclusive-lock,object-map,fast-diff'
+ RBD_MIRROR_INSTANCES: '4'
+ RBD_MIRROR_USE_EXISTING_CLUSTER: '1'
+ RBD_MIRROR_USE_RBD_MIRROR: '1'
+ timeout: 6h
--- /dev/null
+meta:
+- desc: run the rbd_mirror_stress.sh workunit to test the rbd-mirror daemon
+tasks:
+- workunit:
+ clients:
+ cluster1.client.mirror: [rbd/rbd_mirror_stress.sh]
+ env:
+ # override workunit setting of CEPH_ARGS='--cluster'
+ CEPH_ARGS: ''
+ MIRROR_POOL_MODE: 'image'
+ MIRROR_IMAGE_MODE: 'snapshot'
+ RBD_IMAGE_FEATURES: 'layering'
+ RBD_MIRROR_INSTANCES: '4'
+ RBD_MIRROR_USE_EXISTING_CLUSTER: '1'
+ RBD_MIRROR_USE_RBD_MIRROR: '1'
+ timeout: 6h
+++ /dev/null
-meta:
-- desc: run the rbd_mirror_stress.sh workunit to test the rbd-mirror daemon
-tasks:
-- workunit:
- clients:
- cluster1.client.mirror: [rbd/rbd_mirror_stress.sh]
- env:
- # override workunit setting of CEPH_ARGS='--cluster'
- CEPH_ARGS: ''
- RBD_MIRROR_INSTANCES: '4'
- RBD_MIRROR_USE_EXISTING_CLUSTER: '1'
- RBD_MIRROR_USE_RBD_MIRROR: '1'
- timeout: 6h
echo "image ${image} journal status"
rbd --cluster ${cluster} -p ${image_pool} --namespace "${image_ns}" journal status --image ${image}
echo
+ echo "image ${image} snapshots"
+ rbd --cluster ${cluster} -p ${image_pool} --namespace "${image_ns}" snap ls --all ${image}
+ echo
done
echo "${cluster} ${image_pool} ${image_ns} rbd_mirroring omap vals"
fi
create_image ${cluster} ${pool} ${image} $@
- enable_mirror ${cluster} ${pool} ${image} ${mode}
+ if [ "${MIRROR_POOL_MODE}" = "image" ] || [ "$pool" = "${PARENT_POOL}" ]; then
+ enable_mirror ${cluster} ${pool} ${image} ${mode}
+ fi
}
enable_journaling()
testlog "TEST: add image and test replay after client crashes"
image=test
-create_image ${CLUSTER2} ${POOL} ${image} '512M'
+create_image_and_enable_mirror ${CLUSTER2} ${POOL} ${image} ${MIRROR_IMAGE_MODE} '512M'
wait_for_image_replay_started ${CLUSTER1} ${POOL} ${image}
+clean_snap_name=
for i in `seq 1 10`
do
stress_write_image ${CLUSTER2} ${POOL} ${image}
wait_for_image_replay_started ${CLUSTER1} ${POOL} ${image}
wait_for_replay_complete ${CLUSTER1} ${CLUSTER2} ${POOL} ${image}
wait_for_snap_present ${CLUSTER1} ${POOL} ${image} ${snap_name}
+
+ if [ -n "${clean_snap_name}" ]; then
+ compare_image_snaps ${POOL} ${image} ${clean_snap_name}
+ fi
compare_image_snaps ${POOL} ${image} ${snap_name}
+
+ clean_snap_name="snap${i}-clean"
+ create_snap ${CLUSTER2} ${POOL} ${image} ${clean_snap_name}
done
+wait_for_image_replay_started ${CLUSTER1} ${POOL} ${image}
+wait_for_replay_complete ${CLUSTER1} ${CLUSTER2} ${POOL} ${image}
+wait_for_snap_present ${CLUSTER1} ${POOL} ${image} ${clean_snap_name}
+
for i in `seq 1 10`
do
snap_name="snap${i}"
+ compare_image_snaps ${POOL} ${image} ${snap_name}
+
+ snap_name="snap${i}-clean"
+ compare_image_snaps ${POOL} ${image} ${snap_name}
+done
+
+for i in `seq 1 10`
+do
+ snap_name="snap${i}"
+ remove_snapshot ${CLUSTER2} ${POOL} ${image} ${snap_name}
+
+ snap_name="snap${i}-clean"
remove_snapshot ${CLUSTER2} ${POOL} ${image} ${snap_name}
done
for i in `seq 1 ${IMAGE_COUNT}`
do
image="image_${i}"
- create_image ${CLUSTER2} ${POOL} ${image} '128M'
+ create_image_and_enable_mirror ${CLUSTER2} ${POOL} ${image} ${MIRROR_IMAGE_MODE} '128M'
if [ -n "${RBD_MIRROR_REDUCE_WRITES}" ]; then
write_image ${CLUSTER2} ${POOL} ${image} 100
else