mcp/server: log ssh failures so silent empties are debuggable
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user