From 8fa584a445975ee689836abcecc8ad7ad78bc8b4 Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 20 Jun 2020 17:02:34 -0700 Subject: [PATCH] [autoscaler] Run ray stop on cluster before tearing it down (#8922) Co-authored-by: Allen Yin --- python/ray/autoscaler/commands.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index 00968be57..d69922891 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -79,6 +79,10 @@ def teardown_cluster(config_file, yes, workers_only, override_cluster_name, confirm("This will destroy your cluster", yes) + if not workers_only: + exec_cluster(config_file, "ray stop", False, False, False, False, + False, override_cluster_name, None, False) + provider = get_node_provider(config["provider"], config["cluster_name"]) try: