-
-
Notifications
You must be signed in to change notification settings - Fork 362
Closed
Description
Hello,
After updating to release v9.0.0, we've noticed a regression. When the "~/.ansible/cp" path is missing, tests seem to fail with the following error:
self = <testinfra.backend.ssh.SshBackend object at 0x10199f3d0>
command = 'uname -s'
def run_ssh(self, command: str) -> base.CommandResult:
cmd, cmd_args = self._build_ssh_command(command)
out = self.run_local(" ".join(cmd), *cmd_args)
out.command = self.encode(command)
if out.rc == 255:
# ssh exits with the exit status of the remote command or with 255
# if an error occurred.
> raise RuntimeError(out)
E RuntimeError: CommandResult(command=b'uname -s', exit_status=255, stdout=None, stderr=b"Warning: Permanently added '192.168.1.87' (ED25519) to the list of known hosts.\r\nunix_listener: cannot bind to path /Users/user/.ansible/cp/192.168.1.87-22-some-user.8yRLDJr64HeCjBh0: No such file or directory\r\n")
cmd = ['ssh',
'-F %s',
'-o User=%s',
'-o Port=%s',
'-o ConnectTimeout=10',
'-o ControlMaster=auto -o ControlPersist=60s',
'-o ControlPath=~/.ansible/cp/%%h-%%p-%%r',
'%s %s']
cmd_args = ['../../../_molecule_resources/default/ssh_config',
'some-user',
'22',
'192.168.1.87',
'uname -s']
command = 'uname -s'
out = CommandResult(command=b'uname -s', exit_status=255, stdout=None, stderr=b"Warning: Permanently added '192.168.1.87' (ED25519) to the list of known hosts.\r\nunix_listener: cannot bind to path /Users/user/.ansible/cp/192.168.1.87-22-some-user.8yRLDJr64HeCjBh0: No such file or directory\r\n")
self = <testinfra.backend.ssh.SshBackend object at 0x10199f3d0>
I believe the root cause might be associated with PR #713.
It might be beneficial for Testinfra to verify if the "directory" exists prior to it's utilization.
Thank you for looking into this.
vanyasvl
Metadata
Metadata
Assignees
Labels
No labels