From: Mykola Golub Date: Tue, 28 Apr 2020 16:04:43 +0000 (+0100) Subject: qa/workunits/rbd: fix peer_add helper X-Git-Tag: v16.1.0~2483^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ad816ae0c2d4f0db3d26e0ae993947154bab6c8;p=ceph.git qa/workunits/rbd: fix peer_add helper 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 --- diff --git a/qa/workunits/rbd/rbd_mirror_helpers.sh b/qa/workunits/rbd/rbd_mirror_helpers.sh index 3befe1fb8c3..b5c0a68c515 100755 --- a/qa/workunits/rbd/rbd_mirror_helpers.sh +++ b/qa/workunits/rbd/rbd_mirror_helpers.sh @@ -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