diff --git a/sky/backends/cloud_vm_ray_backend.py b/sky/backends/cloud_vm_ray_backend.py index be9ed23a740..3545b1a62dd 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -2325,7 +2325,8 @@ def is_provided_ips_valid( # Ensure head node is the first element, then sort based on the # external IPs for stableness. Skip for k8s nodes since pods # worker ids are already mapped. - if cluster_info is not None and cluster_info.provider_name == 'kubernetes': + if (cluster_info is not None and + cluster_info.provider_name == 'kubernetes'): stable_internal_external_ips = internal_external_ips else: stable_internal_external_ips = [internal_external_ips[0]] + sorted(