Skip to content

Commit

Permalink
qa/workunits/rbd: fix remove mirrored image race conditions
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit a0f65b9)
  • Loading branch information
Jason Dillaman committed Oct 11, 2016
1 parent 2ec5e93 commit 2f9e641
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qa/workunits/rbd/rbd_mirror.sh
Expand Up @@ -202,7 +202,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
Expand Down
1 change: 1 addition & 0 deletions qa/workunits/rbd/rbd_mirror_helpers.sh
Expand Up @@ -498,6 +498,7 @@ remove_image()
local pool=$2
local image=$3

rbd --cluster=${cluster} -p ${pool} snap purge ${image}
rbd --cluster=${cluster} -p ${pool} rm ${image}
}

Expand Down
6 changes: 3 additions & 3 deletions qa/workunits/rbd/rbd_mirror_stress.sh
Expand Up @@ -98,7 +98,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}
Expand All @@ -112,7 +112,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"
Expand Down Expand Up @@ -150,7 +150,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"
Expand Down

0 comments on commit 2f9e641

Please sign in to comment.