]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerNathan Cutler <ncutler@suse.com>
Wed, 29 Apr 2020 11:04:45 +0000 (13:04 +0200)
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>
(cherry picked from commit 1ad816ae0c2d4f0db3d26e0ae993947154bab6c8)

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