]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/workunits/rbd: fix peer_add helper
authorMykola Golub <mgolub@suse.com>
Tue, 28 Apr 2020 16:04:43 +0000 (17:04 +0100)
committerMykola Golub <mgolub@suse.com>
Tue, 28 Apr 2020 16:04:43 +0000 (17:04 +0100)
We need to temporary disable "exit on error" mode so it does not
abort when `rbd mirror pool peer add` returns "already exists"
error code.

Signed-off-by: Mykola Golub <mgolub@suse.com>
qa/workunits/rbd/rbd_mirror_helpers.sh

index 3befe1fb8c33ac60bdd2343acc49f108607710a7..b5c0a68c515ce7a3e4649cd26401fbfbdd35eb62 100755 (executable)
@@ -248,9 +248,11 @@ peer_add()
     local peer_uuid
 
     for s in 1 2 4 8 16 32; do
+        set +e
         peer_uuid=$(rbd --cluster ${cluster} mirror pool peer add \
             ${pool} ${client_cluster} $@)
         error_code=$?
+        set -e
 
         if [ $error_code -eq 17 ]; then
             # raced with a remote heartbeat ping -- remove and retry