Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Serve] Change back from autodown to autostop #3535

Merged
merged 6 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions sky/serve/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
Loading