Browse Source

[fix] Detect virtio-scsi volumes correctly

When the Cinder volume is presented as a virtio-scsi volume, the
device_name detection fails. This change allows the device name to be
retrieved correctly for both virtio-pci and virtio-scsi cases.

Story: 2008618
Task: 41808
Change-Id: Ia6a848eae11bc38ff71ef4575247010a8ffaa47b
(cherry picked from commit 68e6c0e48d)
(cherry picked from commit 31b0aec56b)
changes/40/814140/1 11.2.0
Bharat Kunwar 2 years ago committed by Tobias Urdin
parent
commit
7b6c844d92
  1. 2
      magnum/drivers/common/templates/fragments/configure-docker-storage.sh
  2. 2
      magnum/drivers/common/templates/kubernetes/fragments/configure-etcd.sh

2
magnum/drivers/common/templates/fragments/configure-docker-storage.sh

@ -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} | head -n1)
if [ -n "${device_name}" ]; then
break
fi

2
magnum/drivers/common/templates/kubernetes/fragments/configure-etcd.sh

@ -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} | head -n1)
if [ -n "${device_name}" ]; then
break
fi

Loading…
Cancel
Save