45ca57bf3f
修复宝塔批量引导因仅关联密码预设、行内 password 为空而全部 ssh_command_failed。 Co-authored-by: Cursor <cursoragent@cursor.com>
848 B
848 B
Changelog — SSH 预设凭据解析修复(2026-06-21)
日期:2026-06-21
摘要
修复仅设置 preset_id、未复制 password 字段时 SSH/宝塔批量引导全部失败(ssh_command_failed)。
动机
任务 #113 等 10/10 失败:服务器关联密码预设「商城默认密码」,但 asyncssh_pool 只读行内 password,未解析预设。
涉及文件
server/infrastructure/ssh/resolve_server_auth.py(新)server/infrastructure/ssh/asyncssh_pool.py—acquire前物化凭据server/infrastructure/btpanel/ssh_bootstrap.py—ssh_no_credentials错误码tests/test_resolve_server_auth.py
迁移 / 重启
- 需重启 API 容器
验证
.venv/bin/pytest tests/test_resolve_server_auth.py tests/test_btpanel_*.py -q
# 重跑宝塔批量 SSH 获取 API