From 8a27cf7167578eda62c923ac39f4e0085aab68e7 Mon Sep 17 00:00:00 2001 From: LALLAU Bertrand Date: Tue, 5 Nov 2024 15:53:04 +0100 Subject: [PATCH] Fix vmedia network config drive handling The publisher ID generated by Ironic (using oslo.util) is actualy in lowercase, hence it will never match publisher ID generated by udevadm (uppercase). In order to compare these strings without case conflict, we put both in lowercase. Closes-Bug: #2085355 Change-Id: I501c8b46128de38c634b1c159a40ffb0d7a64f4c --- .../usr/local/bin/ironic-python-agent-resolve-configdrive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dib/ironic-python-agent-ramdisk/static/usr/local/bin/ironic-python-agent-resolve-configdrive.sh b/dib/ironic-python-agent-ramdisk/static/usr/local/bin/ironic-python-agent-resolve-configdrive.sh index 46cc273..84a91e0 100755 --- a/dib/ironic-python-agent-ramdisk/static/usr/local/bin/ironic-python-agent-resolve-configdrive.sh +++ b/dib/ironic-python-agent-ramdisk/static/usr/local/bin/ironic-python-agent-resolve-configdrive.sh @@ -33,7 +33,7 @@ else # We need to enumerate through the devices, and obtain the for device in $(lsblk -o PATH,LABEL|grep config-2|cut -f1 -d" "); do device_id=$(udevadm info --query=property --property=ID_FS_PUBLISHER_ID $device | sed s/ID_FS_PUBLISHER_ID=//) - if [[ "${publisher_id}" == "${device_id}" ]]; then + if [[ "${publisher_id,,}" == "${device_id,,}" ]]; then # SUCCESS! Valid device! Do it! echo "Device ${device} matches the ${publisher_id}. Mounting..." mount -t iso9660 -o ro,mode=0700 "${device}" /mnt/config || true