[docker] Wrap more internal items with run_env="host" (#10078)

This commit is contained in:
Ian Rodney
2020-08-13 20:35:06 -07:00
committed by GitHub
parent 16f6ee4914
commit a252aa29da
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -556,6 +556,7 @@ class DockerCommandRunner(SSHCommandRunner):
ssh_options_override_ssh_key=ssh_options_override_ssh_key)
def run_rsync_up(self, source, target):
# TODO(ilr) Expose this to before NodeUpdater::sync_file_mounts
protected_path = target
if target.find("/root") == 0:
target = target.replace("/root", "/tmp/root")
+4 -3
View File
@@ -145,8 +145,9 @@ class NodeUpdater:
with LogTimer(self.log_prefix +
"Synced {} to {}".format(local_path, remote_path)):
self.cmd_runner.run("mkdir -p {}".format(
os.path.dirname(remote_path)))
self.cmd_runner.run(
"mkdir -p {}".format(os.path.dirname(remote_path)),
run_env="host")
sync_cmd(local_path, remote_path)
if remote_path not in nolog_paths:
@@ -188,7 +189,7 @@ class NodeUpdater:
"{}Waiting for remote shell...",
self.log_prefix)
self.cmd_runner.run("uptime")
self.cmd_runner.run("uptime", run_env="host")
cli_logger.old_debug(logger, "Uptime succeeded.")
cli_logger.success("Success.")
return True