From 6f2c5b2819ef2e7742e7dd58508a456a53b54b3a Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Sat, 27 Jul 2019 16:53:47 -0700 Subject: [PATCH] Revert "[autoscaler] Clean up error messages on setup failure (#5210)" (#5299) This reverts commit 7fc15dbf7fa0769eecbe1692ed3a97b5c8b918dd. --- python/ray/autoscaler/commands.py | 2 +- python/ray/autoscaler/updater.py | 20 ++++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index 25544c3bd..be1b5a144 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -379,7 +379,7 @@ def exec_cluster(config_file, cmd, docker, screen, tmux, stop, start, cmd, screen, tmux, - expect_error=True, + expect_error=stop, port_forward=port_forward) if tmux or screen: diff --git a/python/ray/autoscaler/updater.py b/python/ray/autoscaler/updater.py index f34d4d600..9ddf9b56f 100644 --- a/python/ray/autoscaler/updater.py +++ b/python/ray/autoscaler/updater.py @@ -291,20 +291,12 @@ class NodeUpdater(object): "-L", "{}:localhost:{}".format(port_forward, port_forward) ] - final_cmd = ssh + ssh_opt + get_default_ssh_options( - self.ssh_private_key, connect_timeout, self.ssh_control_path) + [ - "{}@{}".format(self.ssh_user, self.ssh_ip), cmd - ] - - try: - self.get_caller(expect_error)( - final_cmd, - stdout=redirect or sys.stdout, - stderr=redirect or sys.stderr) - except subprocess.CalledProcessError: - logger.error("Command failed: \n\n {}\n".format( - " ".join(final_cmd))) - sys.exit(1) + self.get_caller(expect_error)( + ssh + ssh_opt + get_default_ssh_options( + self.ssh_private_key, connect_timeout, self.ssh_control_path) + + ["{}@{}".format(self.ssh_user, self.ssh_ip), cmd], + stdout=redirect or sys.stdout, + stderr=redirect or sys.stderr) class NodeUpdaterThread(NodeUpdater, Thread):