Package: openstack-cluster-installer-common
Version: 42.3.0~bpo12+1
The oci-system-serial command is currently unable to determine the
serial number on my libirtd/QEMU VMs as the fallback dmidecode commands
do not return any data. I've attached a patch to use the system-uuid
instead.
I also noticed that openstack-cluster-installer-agent duplicates the
code from oci-system-serial so I've attached a patch to just call
oci-system-serial instead.
--
Regards
Jim
diff --git a/common/usr/bin/oci-system-serial b/common/usr/bin/oci-system-serial
index 43854085..317f0562 100755
--- a/common/usr/bin/oci-system-serial
+++ b/common/usr/bin/oci-system-serial
@@ -23,6 +23,9 @@ else
"Supermicro")
SYSTEM_SERIAL=$(dmidecode -s baseboard-serial-number)
;;
+ "QEMU")
+ SYSTEM_SERIAL=$(dmidecode -s system-uuid)
+ ;;
# Fallback for all other (possibly broken?) motherboards.
# Please contribute as you see issues.
*)
diff --git a/common/usr/bin/openstack-cluster-installer-agent b/common/usr/bin/openstack-cluster-installer-agent
index 85df5d6e..18a5c3ab 100755
--- a/common/usr/bin/openstack-cluster-installer-agent
+++ b/common/usr/bin/openstack-cluster-installer-agent
@@ -230,29 +230,7 @@ echo "===> Fetching baseboard info with dmidecode"
### Chassis serial number, product name, BIOS version, IPMI version, IPMI ip
SYSTEM_MANUFACTURER=$(dmidecode -s system-manufacturer)
-
-case $SYSTEM_MANUFACTURER in
- "HPE"|"Dell"|"Dell Inc."|"Acer"|"LinuxKVM"|"OpenStack Nova"|"GIGABYTE")
- SYSTEM_SERIAL=$(dmidecode -s system-serial-number)
- ;;
- "LENOVO"|"Lenovo")
- SYSTEM_SERIAL=$(dmidecode -s chassis-serial-number)
- ;;
- # Supermicro is stupid, dmidecode -s system-serial-number
- # will always return 1234567890
- "Supermicro")
- SYSTEM_SERIAL=$(dmidecode -s baseboard-serial-number)
- ;;
- # Fallback for all other (possibly broken?) motherboards.
- # Please contribute as you see issues.
- *)
- SYSTEM_SERIAL=$(dmidecode -s baseboard-serial-number)
- if [ -z "${SYSTEM_SERIAL}" ] ; then
- SYSTEM_SERIAL=$(dmidecode -s system-serial-number)
- fi
- ;;
-esac
-
+SYSTEM_SERIAL=$(oci-system-serial)
PRODUCT_NAME=$(dmidecode -t 1 | grep "Product Name" | sed -e "s/[ \t]*Product Name:[ ]*//" -e "s/,//g")
BIOS_VENDOR=$(dmidecode -s bios-vendor)
case ${BIOS_VENDOR} in