mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4676] [Bug]: [Misc] SSD admin CLI tools rebuild full SSH handshake per remote command #1190
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#1190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thrower01 on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4676
Bug Report
ontext
Both
python/mooncake/mooncake_ssd_register.py::_execute_ssh_commandandmooncake_ssd_unregister.py::_execute_ssh_commandopen a freshparamiko.SSHClient, runconnect(), run one command, then callclose(). No connection reuse.The register tool calls this function for every SPDK target, and within one target the pattern is:
scripts/rpc.pylocation (up to 2test -fcommands)nvmf_get_subsystemsbdev_get_bdevsThat is 3 to 5 full SSH handshakes per target — TCP SYN → KEX → userauth → channel open → exec → channel close. Each target pays the handshake multiplier once per discovery run. The unregister tool has the same duplicated code path.
Fix direction
Introduce a process-wide
SSHConnectionPoolinpython/mooncake/_administration.pykeyed by(ip, port, username, password, key_file):_get_client(key)get_transport().is_active()health check before reuseexec_commandfailure (handles transient TCP drops)close_all()/reset_for_test()for cleanupBoth admin scripts delegate
_execute_ssh_command()to the pool. Each SPDK target now shares one SSH handshake across all commands in its discovery flow.Impact
Reduces per-target handshake count from
O(namespaces + 3)toO(1); eliminates repeated KEX CPU work on the remote node; and makes the discovery path resilient to a single transient SSH drop per target. Only affects the two admin CLI tools, which are operator-facing and off the inference / training data path.Acceptance
require_paramikolazy-import tests keep passingBefore submitting...
@github-actions[bot] commented on GitHub (Oct 15, 2026):
Thanks for opening this issue, @thrower01!
340463471A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide