From 39eb32df38eb80dd84bc0814142861bfb7fa9826 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 25 Sep 2025 15:18:18 -0400 Subject: [PATCH] Test connection on net cfg apply When network configuration is applied, wait until we can reach the deployment server again before exiting. This should make us more robust against various potential delays after changing the nature of network interfaces. --- confluent_osdeploy/common/profile/scripts/confignet | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/confluent_osdeploy/common/profile/scripts/confignet b/confluent_osdeploy/common/profile/scripts/confignet index bb52eed2..18945a3d 100644 --- a/confluent_osdeploy/common/profile/scripts/confignet +++ b/confluent_osdeploy/common/profile/scripts/confignet @@ -567,4 +567,13 @@ if __name__ == '__main__': if havefirewall: subprocess.check_call(['systemctl', 'start', 'firewalld']) await_tentative() + maxwait = 10 + while maxwait: + try: + tclient = apiclient.HTTPSClient(checkonly=True) + tclient.check_connections() + break + except Exception: + maxwait -= 1 + time.sleep(1)