mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[autoscaler] Clean up error messages on setup failure (#5210)
This commit is contained in:
parent
53fb876a5f
commit
7fc15dbf7f
2 changed files with 15 additions and 7 deletions
|
@ -379,7 +379,7 @@ def exec_cluster(config_file, cmd, docker, screen, tmux, stop, start,
|
|||
cmd,
|
||||
screen,
|
||||
tmux,
|
||||
expect_error=stop,
|
||||
expect_error=True,
|
||||
port_forward=port_forward)
|
||||
|
||||
if tmux or screen:
|
||||
|
|
|
@ -291,12 +291,20 @@ class NodeUpdater(object):
|
|||
"-L", "{}:localhost:{}".format(port_forward, port_forward)
|
||||
]
|
||||
|
||||
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)
|
||||
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)
|
||||
|
||||
|
||||
class NodeUpdaterThread(NodeUpdater, Thread):
|
||||
|
|
Loading…
Add table
Reference in a new issue