Skip to content

Commit

Permalink
fix back compat for provisioner update
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Jul 5, 2024
1 parent 2bb3bcc commit 2b4495b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,12 @@ def get_command_runners(self,
zip(ip_list, port_list), **ssh_credentials)
return runners
if self.cached_cluster_info is None:
assert not force_cached, 'cached_cluster_info is None.'
# When a cluster's cloud is just upgraded to the new provsioner,
# although it has the cached_external_ips, the cached_cluster_info
# can be None. We need to update it here, even when force_cached is
# set to True.
assert not force_cached or self.cached_external_ips is not None, (
force_cached, self.cached_external_ips)
self._update_cluster_info()
assert self.cached_cluster_info is not None, self
runners = provision_lib.get_command_runners(
Expand Down Expand Up @@ -2497,13 +2502,6 @@ def __setstate__(self, state):
# This occurs when an old cluster from was autostopped,
# so the head IP in the database is not updated.
pass

if (self.cached_external_ips is not None and self.cached_cluster_info is None):
# When a cluster's cloud is just upgraded to the new provsioner,
# even if the cluster is alive with the cached_external_ips, the
# cached_cluster_info is None. We need to update it here.
self._update_cluster_info()



class CloudVmRayBackend(backends.Backend['CloudVmRayResourceHandle']):
Expand Down

0 comments on commit 2b4495b

Please sign in to comment.