]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: simplify split-brain test to avoid potential race
authorJason Dillaman <dillaman@redhat.com>
Tue, 19 Dec 2017 21:29:18 +0000 (16:29 -0500)
committerVasu Kulkarni <vasu@redhat.com>
Mon, 19 Feb 2018 23:59:16 +0000 (15:59 -0800)
Fixes: http://tracker.ceph.com/issues/22485
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 8c2ee6dd0f4c77b9fbbc24a673841b04d3e175d6)

Conflicts:
qa/workunits/rbd/rbd_mirror.sh: trivial resolution

qa/workunits/rbd/rbd_mirror.sh

index 618ae10e6a23f1361cf17b7779c3a975066c9756..3e7f844faeaf948e3bd73d1c15ec4bd1b52a26db 100755 (executable)
@@ -420,12 +420,11 @@ testlog "TEST: split-brain"
 image=split-brain
 create_image ${CLUSTER2} ${POOL} ${image}
 wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'master_position'
-demote_image ${CLUSTER2} ${POOL} ${image}
-wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+unknown'
-promote_image ${CLUSTER1} ${POOL} ${image}
+promote_image ${CLUSTER1} ${POOL} ${image} --force
+wait_for_image_replay_stopped ${CLUSTER1} ${POOL} ${image}
+wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+stopped'
 write_image ${CLUSTER1} ${POOL} ${image} 10
 demote_image ${CLUSTER1} ${POOL} ${image}
-promote_image ${CLUSTER2} ${POOL} ${image}
 wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+error' 'split-brain'
 request_resync_image ${CLUSTER1} ${POOL} ${image} image_id
 wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'master_position'