From 7ba1798848d609ed81763425b53cbbef3f0e5a1c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 31 Aug 2026 12:05:45 -0400 Subject: [PATCH] Fix SUSE16 identity image deployment First, give an additional grace period in case identity image is slow to appear compared to other disks. Also, set hostname according to nodename. --- .../var/lib/dracut/hooks/pre-trigger/01-confluent.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/confluent_osdeploy/suse16/initramfs/var/lib/dracut/hooks/pre-trigger/01-confluent.sh b/confluent_osdeploy/suse16/initramfs/var/lib/dracut/hooks/pre-trigger/01-confluent.sh index f94a9c54..ed2176bd 100644 --- a/confluent_osdeploy/suse16/initramfs/var/lib/dracut/hooks/pre-trigger/01-confluent.sh +++ b/confluent_osdeploy/suse16/initramfs/var/lib/dracut/hooks/pre-trigger/01-confluent.sh @@ -37,6 +37,14 @@ while [ ! -e /dev/disk/by-label ] && [ $TRIES -gt 0 ]; do sleep 2 TRIES=$((TRIES - 1)) done +if [ -e /dev/disk/by-label ]; then + # We detected disks, but CNFLNT_IDNT may be slower than other devices to appear + TRIES=3 + while [ ! -e /dev/disk/by-label/CNFLNT_IDNT ] && [ $TRIES -gt 0 ]; do + sleep 1 + TRIES=$((TRIES - 1)) + done +fi if [ -e /dev/disk/by-label/CNFLNT_IDNT ]; then tmnt=/tmp/idntmnt mkdir -p $tmnt @@ -224,6 +232,7 @@ echo $ifname > /run/confluent/ifname dnsdomain=$(grep ^dnsdomain: /etc/confluent/confluent.deploycfg) dnsdomain=${dnsdomain#dnsdomain: } hostname=$nodename +hostname $nodename if [ ! -z "$dnsdomain" ] && [ "$dnsdomain" != "null" ]; then hostname=$hostname.$dnsdomain fi