From abc5c635a67b0d1d18b39b1efd9e4039cc5882d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 11 Oct 2021 16:47:49 +0200 Subject: [PATCH] ci: fix osd disk permission on provisioning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/scripts/create-bluestore-partitions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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