From 82f2e6391c3192c74fe4f16a6ef349dbc9d6ee5e Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Thu, 6 Nov 2025 10:59:08 +0100 Subject: [PATCH] Add debug logs related to SSH connection establishment In order to obtain more information about the issue #TOBIKO-171, related to ssh commands that get stuck forever, this patch adds some debug logs. Related-ticket: #TOBIKO-171 Change-Id: Ic4703effafdffe9647af4e4fbcd4b60ad0ab1763 Signed-off-by: Eduardo Olivares --- tobiko/shell/sh/_ssh.py | 3 +++ tobiko/shell/ssh/_client.py | 1 + 2 files changed, 4 insertions(+) diff --git a/tobiko/shell/sh/_ssh.py b/tobiko/shell/sh/_ssh.py index e491bc9ed..3d26ea6be 100644 --- a/tobiko/shell/sh/_ssh.py +++ b/tobiko/shell/sh/_ssh.py @@ -135,8 +135,11 @@ class SSHShellProcessFixture(_process.ShellProcessFixture): LOG.debug(f"Create remote process... ({details})") try: client = ssh_client.connect() + LOG.debug("SSH client connected - Establishing session with " + f"timeout = {self.open_session_timeout}") process = client.get_transport().open_session( timeout=self.open_session_timeout) + LOG.debug("Remote session created") if environment: variables = " ".join( f"{name}={shlex.quote(value)}" diff --git a/tobiko/shell/ssh/_client.py b/tobiko/shell/ssh/_client.py index 1993dbfef..84c268a53 100644 --- a/tobiko/shell/ssh/_client.py +++ b/tobiko/shell/ssh/_client.py @@ -398,6 +398,7 @@ class SSHClientFixture(tobiko.SharedFixture): else: break + LOG.debug("SSH connection ensured") return client def close(self):