ci: fix osd disk permission on provisioning

When the OSD is prepared, systemd-udev kicks in since the device has
been exclusively opened and thus reverts the permissions to root:disk.
We need a udev rule to force re-applying the correct ceph permission so
we can consume the disk.

Closes: https://github.com/rook/rook/issues/8942
Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han committed 2021-10-11 16:50:28 +02:00
1 parent 4f9c31fa8b
commit abc5c635a6
1 file changed
+2 -1
+2 -1
View File
@@ -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
sudo parted "$DISK" -s print