From c3635fba810fe57c71ca6bf203676b35a4c6cb54 Mon Sep 17 00:00:00 2001 From: Zhanghao Wu Date: Fri, 1 Mar 2024 01:30:05 +0000 Subject: [PATCH] rename --- sky/provision/instance_setup.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sky/provision/instance_setup.py b/sky/provision/instance_setup.py index 46adb96c889..e13415bf3bc 100644 --- a/sky/provision/instance_setup.py +++ b/sky/provision/instance_setup.py @@ -200,17 +200,16 @@ def _setup_node(runner: command_runner.SSHCommandRunner, stream_logs=False, log_path=log_path, require_outputs=True) - max_retry = 3 - cnt = 0 - while returncode == 255 and cnt < max_retry: - # Network connection issue occur during setup. This could happen - # when a setup step requires a reboot, e.g. nvidia-driver + retry_cnt = 0 + while returncode == 255 and retry_cnt < _MAX_RETRY: + # Got network connection issue occur during setup. This could + # happen when a setup step requires a reboot, e.g. nvidia-driver # installation (happens for fluidstack). We should retry for it. logger.info('Network connection issue during setup, this is ' 'likely due to the reboot of the instance. ' 'Retrying setup in 10 seconds.') time.sleep(10) - cnt += 1 + retry_cnt += 1 returncode, stdout, stderr = runner.run(cmd, stream_logs=False, log_path=log_path,