ci: retry vgcreate on failure

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 <seb@redhat.com>
This commit is contained in:
Sébastien Han committed 2021-04-29 18:24:48 +02:00
1 parent 2b9bd2af1a
commit c63a42a661
1 file changed
+1 -1
+1 -1
View File
@@ -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