daemon: adjustments to fix terminal command string generation for docker/lxd nodes to account for being on a distributed server
This commit is contained in:
parent
9c69881aad
commit
3c28ea373a
2 changed files with 10 additions and 2 deletions
|
@ -188,7 +188,11 @@ class DockerNode(CoreNode):
|
|||
:param sh: shell to execute command in
|
||||
:return: str
|
||||
"""
|
||||
return f"{DOCKER} exec -it {self.name} {sh}"
|
||||
terminal = f"{DOCKER} exec -it {self.name} {sh}"
|
||||
if self.server is None:
|
||||
return terminal
|
||||
else:
|
||||
return f"ssh -X -f {self.server.host} xterm -e {terminal}"
|
||||
|
||||
def create_dir(self, dir_path: Path) -> None:
|
||||
"""
|
||||
|
|
|
@ -130,7 +130,11 @@ class LxcNode(CoreNode):
|
|||
:param sh: shell to execute command in
|
||||
:return: str
|
||||
"""
|
||||
return f"lxc exec {self.name} -- {sh}"
|
||||
terminal = f"lxc exec {self.name} -- {sh}"
|
||||
if self.server is None:
|
||||
return terminal
|
||||
else:
|
||||
return f"ssh -X -f {self.server.host} xterm -e {terminal}"
|
||||
|
||||
def create_dir(self, dir_path: Path) -> None:
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue