diff --git a/tests/scripts/create-bluestore-partitions.sh b/tests/scripts/create-bluestore-partitions.sh index c0d25517e..0c5f0891e 100755 --- a/tests/scripts/create-bluestore-partitions.sh +++ b/tests/scripts/create-bluestore-partitions.sh @@ -56,6 +56,7 @@ function create_block_partition { for osd in $(seq 1 "$osd_count"); do echo "$osd" create_partition osd-"$osd" + echo "SUBSYSTEM==\"block\", ATTR{size}==\"12582912\", ATTR{partition}==\"$osd\", ACTION==\"add\", RUN+=\"/bin/chown 167:167 ${DISK}${osd}\"" | sudo tee -a /etc/udev/rules.d/01-rook-"$osd".rules done fi } @@ -120,4 +121,4 @@ sudo udevadm settle # Print drives sudo lsblk -sudo parted "$DISK" -s print \ No newline at end of file +sudo parted "$DISK" -s print diff --git a/tests/scripts/validate_cluster.sh b/tests/scripts/validate_cluster.sh index 0b60a51fe..aac2333a8 100755 --- a/tests/scripts/validate_cluster.sh +++ b/tests/scripts/validate_cluster.sh @@ -88,12 +88,12 @@ function test_demo_pool { } function test_csi { - # shellcheck disable=SC2046 - timeout 180 sh -c 'until [ $(kubectl -n rook-ceph get pods --field-selector=status.phase=Running|grep -c ^csi-) -eq 4 ]; do sleep 1; done' - if [ $? -eq 0 ]; then - return 0 - fi - return 1 + timeout 180 bash <<-'EOF' + until [[ "$(kubectl -n rook-ceph get pods --field-selector=status.phase=Running|grep -c ^csi-)" -eq 4 ]]; do + echo "waiting for csi pods to be ready" + sleep 5 + done +EOF } function display_status {