Skip to content

Commit efe359b

Browse files
vyadavmsftCopilot
andauthored
Update lisa/sut_orchestrator/openvmm/node.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1fe106e commit efe359b

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

  • lisa/sut_orchestrator/openvmm

lisa/sut_orchestrator/openvmm/node.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,20 @@ def configure_connection(self, node: RemoteNode, log: Logger) -> None:
120120
port=runbook.network.ssh_port,
121121
public_port=runbook.network.ssh_port,
122122
)
123-
try:
124-
wait_tcp_port_ready(
125-
runbook.network.connection_address,
126-
runbook.network.ssh_port,
127-
log=log,
128-
timeout=OPENVMM_CONNECTION_TIMEOUT,
129-
)
130-
except Exception as identifier_error:
123+
is_ready, error_code = wait_tcp_port_ready(
124+
runbook.network.connection_address,
125+
runbook.network.ssh_port,
126+
log=log,
127+
timeout=OPENVMM_CONNECTION_TIMEOUT,
128+
)
129+
if not is_ready:
131130
raise LisaException(
132131
"OpenVMM guest SSH port did not become reachable at "
133-
f"{runbook.network.connection_address}:{runbook.network.ssh_port}"
134-
) from identifier_error
132+
f"{runbook.network.connection_address}:{runbook.network.ssh_port} "
133+
f"(error code: {error_code}). Verify the guest is running, "
134+
"networking is configured correctly, and the SSH service is "
135+
"listening on the expected port."
136+
)
135137

136138
def stop_node(self, node: Node, wait: bool = True) -> None:
137139
node_context = get_node_context(node)

0 commit comments

Comments
 (0)