From 49ef6ef77e861faf5d0d6b8bf24a2051778b0c99 Mon Sep 17 00:00:00 2001 From: cblmemo Date: Mon, 18 Sep 2023 10:30:04 -0700 Subject: [PATCH] fix --- sky/execution.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sky/execution.py b/sky/execution.py index e680c48198a..d983e8e6ff0 100644 --- a/sky/execution.py +++ b/sky/execution.py @@ -1323,5 +1323,13 @@ def serve_down( os.remove(controller_yaml_path) handle = global_user_state.get_handle_from_service_name(service_name) assert handle is not None - handle.cleanup_ephemeral_storage() + try: + handle.cleanup_ephemeral_storage() + # same as above. + except Exception as e: # pylint: disable=broad-except + if purge: + logger.warning('Ignoring error when cleaning up ephemeral storage ' + f'of service {service_name}: {e}') + else: + raise RuntimeError(e) from e global_user_state.remove_service(service_name)