[autoscaler] Make commands bash -i to support newer bash (#4181)

The generated command in autoscaler/updater.py throws non-zero exit status 127 on Ubuntu 18.04.

## Related issue number
Closes #4155, Closes #1444.
This commit is contained in:
Peiren Yang
2019-03-03 22:46:07 +01:00
committed by Richard Liaw
parent fb1369d96f
commit e2e6ef198b
+3 -2
View File
@@ -271,9 +271,10 @@ class NodeUpdater(object):
ssh.append("-tt")
if emulate_interactive:
force_interactive = (
"set -i || true && source ~/.bashrc && "
"true && source ~/.bashrc && "
"export OMP_NUM_THREADS=1 PYTHONWARNINGS=ignore && ")
cmd = "bash --login -c {}".format(quote(force_interactive + cmd))
cmd = "bash --login -c -i {}".format(
quote(force_interactive + cmd))
if port_forward is None:
ssh_opt = []