diff --git a/sky/backends/cloud_vm_ray_backend.py b/sky/backends/cloud_vm_ray_backend.py index a0f746a7098..6d2447fe89b 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -2011,10 +2011,10 @@ def provision_with_retries( cloud_user = to_provision.cloud.get_current_user_identity() requested_features = self._requested_features.copy() - # Skip stop feature for Kubernetes jobs controller. + # Skip stop feature for Kubernetes controllers. if (isinstance(to_provision.cloud, clouds.Kubernetes) and controller_utils.Controllers.from_name(cluster_name) - == controller_utils.Controllers.JOBS_CONTROLLER): + is not None): assert (clouds.CloudImplementationFeatures.STOP in requested_features), requested_features requested_features.remove( @@ -4152,11 +4152,10 @@ def set_autostop(self, # Skip auto-stop for Kubernetes clusters. if (isinstance(handle.launched_resources.cloud, clouds.Kubernetes) and not down and idle_minutes_to_autostop >= 0): - # We should hit this code path only for the jobs controller on + # We should hit this code path only for the controllers on # Kubernetes clusters. assert (controller_utils.Controllers.from_name( - handle.cluster_name) == controller_utils.Controllers. - JOBS_CONTROLLER), handle.cluster_name + handle.cluster_name) is not None), handle.cluster_name logger.info('Auto-stop is not supported for Kubernetes ' 'clusters. Skipping.') return diff --git a/sky/serve/core.py b/sky/serve/core.py index f193a85285b..0252437d0e2 100644 --- a/sky/serve/core.py +++ b/sky/serve/core.py @@ -186,14 +186,13 @@ def up( # whether the service is already running. If the id is the same # with the current job id, we know the service is up and running # for the first time; otherwise it is a name conflict. - idle_minutes_to_autodown = constants.CONTROLLER_IDLE_MINUTES_TO_AUTOSTOP + idle_minutes_to_autostop = constants.CONTROLLER_IDLE_MINUTES_TO_AUTOSTOP controller_job_id, controller_handle = sky.launch( task=controller_task, stream_logs=False, cluster_name=controller_name, detach_run=True, - idle_minutes_to_autostop=idle_minutes_to_autodown, - down=True, + idle_minutes_to_autostop=idle_minutes_to_autostop, retry_until_up=True, _disable_controller_check=True, )