]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: resolve potential rbd-mirror race conditions 14154/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 21 Nov 2016 20:31:43 +0000 (15:31 -0500)
committerNathan Cutler <ncutler@suse.com>
Sun, 26 Mar 2017 16:11:26 +0000 (18:11 +0200)
Fixes: http://tracker.ceph.com/issues/18935
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 63eae97afc1a92412525468263fb8696a243ebac)

qa/workunits/rbd/rbd_mirror.sh

index 21e6021985948ea91471c3e3f79be27a82123fb6..830ef5604b0a1755f8f684309198a8ba0a3087c1 100755 (executable)
@@ -38,6 +38,7 @@ compare_images ${POOL} ${image1}
 
 testlog "TEST: test the first image is replaying after restart"
 write_image ${CLUSTER2} ${POOL} ${image} 100
+wait_for_image_replay_started ${CLUSTER1} ${POOL} ${image}
 wait_for_replay_complete ${CLUSTER1} ${CLUSTER2} ${POOL} ${image}
 wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'master_position'
 compare_images ${POOL} ${image}
@@ -247,7 +248,9 @@ stop_mirror ${CLUSTER1}
 stop_mirror ${CLUSTER2}
 set_pool_mirror_mode ${CLUSTER2} ${POOL} 'image'
 disable_mirror ${CLUSTER2} ${POOL} ${image}
-test_image_present ${CLUSTER1} ${POOL} ${image} 'present'
+if [ -z "${RBD_MIRROR_USE_RBD_MIRROR}" ]; then
+  test_image_present ${CLUSTER1} ${POOL} ${image} 'present'
+fi
 start_mirror ${CLUSTER1}
 wait_for_image_present ${CLUSTER1} ${POOL} ${image} 'deleted'
 set_pool_mirror_mode ${CLUSTER2} ${POOL} 'pool'
@@ -276,6 +279,7 @@ testlog "TEST: request image resync while daemon is offline"
 stop_mirror ${CLUSTER1}
 request_resync_image ${CLUSTER1} ${POOL} ${image} image_id
 start_mirror ${CLUSTER1}
+wait_for_image_present ${CLUSTER1} ${POOL} ${image} 'deleted' ${image_id}
 wait_for_image_replay_started ${CLUSTER1} ${POOL} ${image}
 wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'master_position'
 compare_images ${POOL} ${image}