Fix Fedora CoreOS 31 Cinder volume on virtio-scsi disk

When using a >= Victoria release with Fedora CoreOS 31
using Cinder and overlay2 with the instance being spawned
on disk using virtio-scsi the name of the disk in by-id is
different.

[root@test-x7kpb2b2lm5j-master-0 ~]# ls /dev/disk/by-id | grep 'c7ba029d-1c6a-4392-9'
scsi-0QEMU_QEMU_HARDDISK_c7ba029d-1c6a-4392-992d-dbff27214740
[root@test-x7kpb2b2lm5j-master-0 ~]# ls /dev/disk/by-id | grep 'c7ba029d-1c6a-4392-9$'
[root@test-x7kpb2b2lm5j-master-0 ~]# cat /etc/fedora-release
Fedora release 31 (Thirty One)

Change-Id: I5a05cdebe59178d4e9362ce6e6f026d397c93725
This commit is contained in:
Tobias Urdin 2021-04-22 15:56:05 +02:00
parent 6a42e1246f
commit 04ab48e8cf
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ if [ -n "$DOCKER_VOLUME_SIZE" ] && [ "$DOCKER_VOLUME_SIZE" -gt 0 ]; then
else
attempts=60
while [ ${attempts} -gt 0 ]; do
device_name=$($ssh_cmd ls /dev/disk/by-id | grep ${DOCKER_VOLUME:0:20}$)
device_name=$($ssh_cmd ls /dev/disk/by-id | grep ${DOCKER_VOLUME:0:20})
if [ -n "${device_name}" ]; then
break
fi

View File

@ -20,7 +20,7 @@ if [ -n "$ETCD_VOLUME_SIZE" ] && [ "$ETCD_VOLUME_SIZE" -gt 0 ]; then
attempts=60
while [ ${attempts} -gt 0 ]; do
device_name=$($ssh_cmd ls /dev/disk/by-id | grep ${ETCD_VOLUME:0:20}$)
device_name=$($ssh_cmd ls /dev/disk/by-id | grep ${ETCD_VOLUME:0:20})
if [ -n "${device_name}" ]; then
break
fi