From e5360b3b2f38644dcb055244eaa8de567c394c63 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 27 Sep 2022 08:33:00 -0400 Subject: [PATCH] Have suse give up after a minute If a network problem prevents the deployment nic from working, give up eventually --- confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh | 3 ++- confluent_osdeploy/suse15/profiles/server/scripts/firstboot.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh index 8cd7ac9b..dcb70e0d 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh @@ -20,7 +20,8 @@ confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|sed -e 's/ proto=$(grep ^protocol: /etc/confluent/confluent.deploycfg |awk '{print $2}') confluent_apikey=$(cat /etc/confluent/confluent.apikey) . /etc/confluent/functions -while ! ping -c 1 $confluent_mgr >& /dev/null; do +GIVUP=$(($(date +%s) + 60)) +while (! ping -c 1 $confluent_mgr >& /dev/null) && [ $(date +%s) -lt $GIVUP ]; do sleep 1 done diff --git a/confluent_osdeploy/suse15/profiles/server/scripts/firstboot.sh b/confluent_osdeploy/suse15/profiles/server/scripts/firstboot.sh index 8cd7ac9b..dcb70e0d 100644 --- a/confluent_osdeploy/suse15/profiles/server/scripts/firstboot.sh +++ b/confluent_osdeploy/suse15/profiles/server/scripts/firstboot.sh @@ -20,7 +20,8 @@ confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|sed -e 's/ proto=$(grep ^protocol: /etc/confluent/confluent.deploycfg |awk '{print $2}') confluent_apikey=$(cat /etc/confluent/confluent.apikey) . /etc/confluent/functions -while ! ping -c 1 $confluent_mgr >& /dev/null; do +GIVUP=$(($(date +%s) + 60)) +while (! ping -c 1 $confluent_mgr >& /dev/null) && [ $(date +%s) -lt $GIVUP ]; do sleep 1 done