From 1ad816ae0c2d4f0db3d26e0ae993947154bab6c8 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Tue, 28 Apr 2020 17:04:43 +0100 Subject: [PATCH] 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 --- qa/workunits/rbd/rbd_mirror_helpers.sh | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.5