mcp/server: log ssh failures so silent empties are debuggable

This commit is contained in:
root
2026-05-20 20:23:03 +02:00
parent 2d2446b36e
commit 3f41416805

View File

@@ -99,10 +99,17 @@ def _run_via_hubris(remote_host: str, cmd: list[str],
f"{SSH_USER}@{HUBRIS_HOST}",
joined,
]
return subprocess.run(
proc = subprocess.run(
ssh_args, capture_output=True, text=True,
timeout=timeout or SSH_TIMEOUT * 3,
)
if proc.returncode != 0:
import logging as _l
_l.getLogger("homelab-mcp").warning(
"ssh failed rc=%s host=%s cmd=%r stderr=%r",
proc.returncode, remote_host, joined, proc.stderr.strip(),
)
return proc
def _service_to_host(service: str) -> str: