]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: demote/promote image on same cluster
authorJason Dillaman <dillaman@redhat.com>
Mon, 8 Aug 2016 14:39:01 +0000 (10:39 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 16 Aug 2016 13:09:52 +0000 (09:09 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/workunits/rbd/rbd_mirror.sh

index 6084cf758dd639eb3b78dbe7420a771007c8f114..f071c64e12e98b72a5bdbf26639ef6f443a9d4a3 100755 (executable)
@@ -99,6 +99,19 @@ admin_daemon ${CLUSTER1} rbd mirror status
 testlog "TEST: failover and failback"
 start_mirror ${CLUSTER2}
 
+# demote and promote same cluster
+demote_image ${CLUSTER2} ${POOL} ${image}
+wait_for_image_replay_stopped ${CLUSTER1} ${POOL} ${image}
+test_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+stopped'
+test_status_in_pool_dir ${CLUSTER2} ${POOL} ${image} 'up+stopped'
+promote_image ${CLUSTER2} ${POOL} ${image}
+wait_for_image_replay_started ${CLUSTER1} ${POOL} ${image}
+write_image ${CLUSTER2} ${POOL} ${image} 100
+wait_for_replay_complete ${CLUSTER1} ${CLUSTER2} ${POOL} ${image}
+test_status_in_pool_dir ${CLUSTER2} ${POOL} ${image} 'up+stopped'
+test_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'master_position'
+compare_images ${POOL} ${image}
+
 # failover
 demote_image ${CLUSTER2} ${POOL} ${image}
 wait_for_image_replay_stopped ${CLUSTER1} ${POOL} ${image}