From 6dadac498f437dc6ab19c3dc6d750c313d6478b1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 15 Jul 2020 15:20:17 -0400 Subject: [PATCH] Try another strategy for confluent initqueue We want to have each iteration try not much. But we also want to have a 'good' (primary network) match supersede a less successful guess. But we also want to keep guessing. So the first 'vague' guess gets to run full hook. If a future good guess happens, rerun the hook to update the data. --- .../usr/lib/dracut/hooks/initqueue/01-confluent.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh index a70beb92..145d0a6b 100644 --- a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh +++ b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh @@ -15,8 +15,10 @@ while ! grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}' /opt/confluent/bin/copernicus -t > /etc/confluent/confluent.info done cd / -grep ^EXTMGRINFO: /etc/confluent/confluent.info || return 0 -echo -n "" > /tmp/confluent.initq +grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}' | grep 1 >& /dev/null && echo -n "" > /tmp/confluent.initq +grep ^EXTMGRINFO: /etc/confluent/confluent.info || return 0 # Do absolutely nothing if no data at all yet +if [ -f /tmp/confluent.fellback ] && [ ! -f /tmp/confluent.initq ]; return 0; fi +echo -n "" > /tmp/confluent.fellback nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') #TODO: blkid --label to find mounted api