From 9174ad651f7253fbff3e472ed91a1121f52d0fd8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 11 Apr 2025 08:38:51 -0400 Subject: [PATCH] Fallback to mac Some systems do not have UUIDs. Which is unfortunate, but usually a system mac address does well enough. --- .../common/initramfs/opt/confluent/bin/apiclient | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient index 61eddf8b..efc0a562 100644 --- a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient @@ -91,8 +91,11 @@ def scan_confluents(): confluentuuid = line.split(': ')[1] msg += '/confluentuuid=' + confluentuuid break - with open('/sys/devices/virtual/dmi/id/product_uuid') as uuidin: - msg += '/uuid=' + uuidin.read().strip() + try: + with open('/sys/devices/virtual/dmi/id/product_uuid') as uuidin: + msg += '/uuid=' + uuidin.read().strip() + except Exception: + pass for addrf in glob.glob('/sys/class/net/*/address'): with open(addrf) as addrin: hwaddr = addrin.read().strip()