Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Jul 2, 2024
1 parent b197a93 commit 79e117d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions sky/skylet/providers/azure/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

UNIQUE_ID_LEN = 4
_WAIT_NSG_CREATION_NUM_TIMEOUT_SECONDS = 600
_WAIT_FOR_RESOURCE_GROUP_DELETION_TIMEOUT = 480 # 8 minutes
_WAIT_FOR_RESOURCE_GROUP_DELETION_TIMEOUT_SECONDS = 480 # 8 minutes


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -84,7 +84,10 @@ def _configure_resource_group(config):
)
rg_creation_start = time.time()
retry = 0
while time.time() - rg_creation_start < _WAIT_FOR_RESOURCE_GROUP_DELETION_TIMEOUT:
while (
time.time() - rg_creation_start
< _WAIT_FOR_RESOURCE_GROUP_DELETION_TIMEOUT_SECONDS
):
try:
rg_create_or_update(resource_group_name=resource_group, parameters=params)
break
Expand All @@ -95,9 +98,10 @@ def _configure_resource_group(config):
# UX, which will be achieved after we move Azure to use
# SkyPilot provisioner.
logger.warning(
f"Azure resource group {resource_group} is being deleted. "
"It can only be provisioned after it is fully deleted. "
"Waiting..."
f"Azure resource group {resource_group} of a recent "
"terminated cluster {config['cluster_name']} is being "
"deleted. It can only be provisioned after it is fully"
"deleted. Waiting..."
)
time.sleep(1)
retry += 1
Expand Down

0 comments on commit 79e117d

Please sign in to comment.