]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/workunits/rbd: fix remove mirrored image race conditions
authorJason Dillaman <dillaman@redhat.com>
Wed, 14 Sep 2016 12:49:39 +0000 (08:49 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 23 Sep 2016 13:01:52 +0000 (09:01 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/workunits/rbd/rbd_mirror.sh
qa/workunits/rbd/rbd_mirror_helpers.sh
qa/workunits/rbd/rbd_mirror_stress.sh

index 78dbc26775f09e1efccbfc06290b332e8beae583..361c78fc4b4841da08b375525820c2052db91177 100755 (executable)
@@ -211,7 +211,7 @@ for i in ${image3} ${image5}; do
   remove_snapshot ${CLUSTER2} ${POOL} ${i} 'snap2'
   # workaround #16555: before removing make sure it is not still bootstrapped
   wait_for_image_replay_started ${CLUSTER1} ${POOL} ${i}
-  remove_image ${CLUSTER2} ${POOL} ${i}
+  remove_image_retry ${CLUSTER2} ${POOL} ${i}
 done
 
 for i in ${image2} ${image3} ${image4} ${image5}; do
index f227f02a392d12564b279794e53b4bc3c0d699c9..1088ae24b0d01e1f0ff91f4ffd832858b71d5538 100755 (executable)
@@ -535,6 +535,7 @@ remove_image()
     local pool=$2
     local image=$3
 
+    rbd --cluster=${cluster} -p ${pool} snap purge ${image}
     rbd --cluster=${cluster} -p ${pool} rm ${image}
 }
 
index c7cd75ad33141f67d4757356ea9256b9bc1cefeb..229169ba2c71d4c2093f6ce2a2f578aa9919946f 100755 (executable)
@@ -100,7 +100,7 @@ for i in `seq 1 10`
 do
   stress_write_image ${CLUSTER2} ${POOL} ${image}
 
-  test_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'master_position'
+  wait_for_status_in_pool_dir ${CLUSTER1} ${POOL} ${image} 'up+replaying' 'master_position'
 
   snap_name="snap${i}"
   create_snap ${CLUSTER2} ${POOL} ${image} ${snap_name}
@@ -114,7 +114,7 @@ do
   remove_snapshot ${CLUSTER2} ${POOL} ${image} ${snap_name}
 done
 
-remove_image ${CLUSTER2} ${POOL} ${image}
+remove_image_retry ${CLUSTER2} ${POOL} ${image}
 wait_for_image_present ${CLUSTER1} ${POOL} ${image} 'deleted'
 
 testlog "TEST: create many images"
@@ -152,7 +152,7 @@ for i in `seq 1 ${IMAGE_COUNT}`
 do
   image="image_${i}"
   remove_snapshot ${CLUSTER2} ${POOL} ${image} ${snap_name}
-  remove_image ${CLUSTER2} ${POOL} ${image}
+  remove_image_retry ${CLUSTER2} ${POOL} ${image}
 done
 
 testlog "TEST: image deletions should propagate"