Files
Nexus/docs/changelog/2026-06-13-ssh-watch-probe-quote-fix.md
T
Nexus Agent adee25deb6 fix(watch): repair SSH probe script broken by embedded quote in os_release parse
Use chr(34) inside the bash-wrapped python -c probe so monitor slots work again after hardware detail rollout.
2026-06-13 16:10:32 +08:00

640 B
Raw Blame History

修复 SSH 监测探针脚本语法错误

日期2026-06-13

变更摘要

修复 SSH_WATCH_METRICS_CMD.strip('"') 破坏 bash 双引号包裹导致探针全部 ssh_probe_failed、实时监测不可用的问题。

动机

硬件详情上线后监测插槽无数据;根因为嵌入脚本的 " 提前结束 python3 -c "..." 字符串。

涉及文件

  • server/infrastructure/ssh/remote_probe.py — 改用 strip(chr(34))
  • tests/test_watch_metrics.py — 本地执行探针脚本回归

验证

.venv/bin/pytest tests/test_watch_metrics.py::test_ssh_watch_metrics_cmd_runs_locally -q