From c63a42a661ece059d446c44ec0245a1006887465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 29 Apr 2021 17:18:00 +0200 Subject: [PATCH] ci: retry vgcreate on failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Try to mitigate the following error from the CI: ``` + sudo vgcreate test-rook-vg /dev/sdb Can't open /dev/sdb exclusively. Mounted filesystem? Error: Process completed with exit code 5. ``` Now we retry up to 3 times to create the volume group. Closes: https://github.com/rook/rook/issues/7487 Signed-off-by: Sébastien Han --- tests/scripts/github-action-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index 1447466c6..0ea7a777d 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -140,7 +140,7 @@ function create_LV_on_disk() { VG=test-rook-vg LV=test-rook-lv sudo pvcreate "$BLOCK" - sudo vgcreate "$VG" "$BLOCK" + sudo vgcreate "$VG" "$BLOCK" || sudo vgcreate "$VG" "$BLOCK" || sudo vgcreate "$VG" "$BLOCK" sudo lvcreate -l 100%FREE -n "${LV}" "${VG}" tests/scripts/localPathPV.sh /dev/"${VG}"/${LV} kubectl create -f cluster/examples/kubernetes/ceph/crds.yaml