Merge pull request #9932 from rook/mergify/bp/release-1.8/pr-9930

test: avoid potential data inconsistency on zapping disk (backport #9930)
This commit is contained in:
mergify[bot] authored and GitHub committed 2022-03-18 15:36:15 +00:00
commit 162322ab08
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ function use_local_disk() {
else
# it's the hosted runner!
sudo sgdisk --zap-all --clear --mbrtogpt -g -- "${BLOCK}"
sudo dd if=/dev/zero of="${BLOCK}" bs=1M count=10 oflag=direct
sudo dd if=/dev/zero of="${BLOCK}" bs=1M count=10 oflag=direct,dsync
sudo parted -s "${BLOCK}" mklabel gpt
fi
sudo lsblk
+1 -1
View File
@@ -50,7 +50,7 @@ function purge_ceph_vms {
vagrant ssh "$i" -c "cat << 'EOF' > /tmp/purge-ceph.sh
sudo rm -rf /var/lib/rook
for disk in \$(sudo blkid | awk '/ROOK/ {print \$1}' | sed 's/[0-9]://' | uniq); do
sudo dd if=/dev/zero of=\$disk bs=1M count=20 oflag=direct
sudo dd if=/dev/zero of=\$disk bs=1M count=20 oflag=direct,dsync
done
EOF"
vagrant ssh "$i" -c "bash /tmp/purge-ceph.sh"