Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Jul 1, 2024
1 parent 1c1477f commit 5526176
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sky/provision/aws/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ def _get_head_instance_id(instances: List) -> Optional[str]:
logger.warning(
'There are multiple head nodes in the cluster '
f'(current head instance id: {head_instance_id}, '
f'newly discovered id: {inst.id}). It is likely '
f'newly discovered id: {inst.name}). It is likely '
f'that something goes wrong.')
head_instance_id = inst.id
head_instance_id = inst.name
break
return head_instance_id

Expand Down
5 changes: 3 additions & 2 deletions sky/provision/azure/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,9 @@ def _create_instance_tag(target_instance, is_head: bool = True) -> str:
head_instance_id = _create_instance_tag(instances_to_tag[0])
instances_to_tag = instances_to_tag[1:]
else:
instances_to_tag = [inst for inst in instances_to_tag
if inst.name != head_instance_id]
instances_to_tag = [
inst for inst in instances_to_tag if inst.name != head_instance_id
]

if instances_to_tag:
# Tag the instances in case the old resumed instances are not correctly
Expand Down

0 comments on commit 5526176

Please sign in to comment.