kvcache-ai / kvcache-ai/Mooncake
[Feature Request]: Support querying and registering namespaces over NVMe-oF
- Dominant language
- C++
- Stars
- 6.6k
- Forks
- 1.2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 312
Description
### Describe your feature request
## Background
`mooncake_ssd_register` currently discovers namespaces by connecting to the target over SSH and invoking SPDK management RPCs. It retrieves subsystem and bdev information, calculates namespace capacity, and registers the resulting NoF segments with the master.
This couples namespace discovery to the target's SPDK management interface, even though the storage data path uses NVMe-oF.
## Current limitations
The existing discovery flow cannot be used directly in several deployment scenarios:
- The NVMe-oF target uses an implementation other than SPDK.
- The target does not expose its SPDK management RPC interface.
- SSH access to the target is unavailable or restricted.
In these cases, the namespace may be accessible over NVMe-oF, but users still need to obtain its capacity separately and provide it to the explicit registration API. This introduces additional manual steps and requires information that should be discoverable through the storage protocol.
## Proposed behavior
Provide a registration mode based on the namespace's NVMe-oF connection information:
- Accept the target address, transport type, port, subsystem NQN, and namespace ID.
- Have the master query the namespace's logical capacity and block size directly over NVMe-oF.
- Register the namespace's full logical range as a NoF segment.
- Return an error without creating a registration if the namespace query fails.
The registration client should only need access to the master. The master would handle the NVMe-oF connection and namespace query using its SPDK environment.
This would allow existing NVMe-oF namespaces to be registered without requiring SSH access or SPDK management RPCs on the target.
### Before submitting a new issue...
- [x] Make sure you already searched for relevant issues and read the [documentation](https://kvcache-ai.github.io/Mooncake/)
Contributor guide
Research direction
Start by tracing mooncake_ssd_register and the explicit registration API, then follow the master's registration path and its SPDK environment. Confirm how target address, transport, port, subsystem NQN, and namespace ID reach the master. Done means the master queries logical capacity and block size over NVMe-oF, registers the full logical range only after success, and returns an error without registering when the query fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100