mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4561] [RFC]: [Store] NoF Storage Device Control Plane (Metadata Model, Health State Machine, and Admin Observability) #1163
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#1163
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 @zxpdemonio on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4561
Changes proposed
Summary
Mooncake Store supports offloading objects to NVMe-oF (NoF) SSD targets and local SSDs. While the master server manages segments via
NoFSegmentManagerand periodically executes heartbeat probes against mounted targets, it previously managed storage primarily at the coarse segment/allocator level without a formalized storage device control plane.Storage device health lifecycles, real capacity utilization across active allocators, degradation detection, and maintenance planning were unexposed to cluster operators and automated maintenance pipelines.
This RFC proposes a unified, lightweight NoF Storage Device Control Plane for Mooncake Store:
StorageDeviceHealthstates with a pure-function derivation model and automated maintenance planning (recovery vs. GC candidacy).NoFSegmentManager::GetSegmentUsages(), coupled with on-demand operator probe triggering./api/v1/devices,/api/v1/devices/maintenance_plan,/api/v1/devices/probe) for integration with Kubernetes operators, cluster dashboards, and automated node evacuations.An implementation of Phase 1 is already available in PR #4560.
Motivation & Gaps
Current State
MountedSegmentand allocates chunks via allocators, but does not correlate these segments back to their underlying storage device identity, health status, or physical capacity limits.DEGRADEDstate to warn operators or trigger graceful draining before unmounting.Proposed Design
1. Storage Device Metadata & Health State Machine
Health Lifecycle
A storage device transitions across five explicit health states:
DeriveStorageDeviceHealth: Pure function mapping probe accounting (is_unmounting,consecutive_probe_failures,consecutive_probe_successes) and threshold policies (degraded_threshold,failed_threshold) toStorageDeviceHealth.failed_threshold = nof_heartbeat_failures_threshold_anddegraded_threshold = max(1, failed_threshold / 2).Maintenance Planner
BuildStorageDeviceMaintenancePlan()inspects active devices and categorizes them into two actionable sets:recovery_candidates: Devices inDEGRADEDorFAILEDstate, detailing consecutive probe failures, last error message, and schedulability.gc_candidates: Devices flagged asUNMOUNTING, or devices whose allocated capacity utilization exceeds the critical high-water mark (\ge 95\%).2. MasterService & Segment Engine Integration
NoFSegmentManager::GetSegmentUsages()inspects each active segment allocator, returning:MasterService::ListStorageDevices()combines:device_id,target_name,uri,capacity).MasterService::RequestStorageDeviceProbe(device_id)schedules an immediate asynchronous heartbeat probe against the specified device.3. Admin REST APIs
/api/v1/devicesGET/api/v1/devices/maintenance_planGETrecovery_candidatesandgc_candidatesfor maintenance schedulers./api/v1/devices/probe?device_id=<id>POSTSample Maintenance Plan Output
Phased Implementation Plan
storage_device_metadata.h/.cppwith core data types and pure derivation logic.NoFSegmentManager::GetSegmentUsagesandMasterService::ListStorageDevices./api/v1/devices,/api/v1/devices/maintenance_plan,/api/v1/devices/probe).storage_device_metadata_test,master_admin_server_test,nof_heartbeat_test).maintenance_plan(e.g. automatically trigger segment drain when a device entersDEGRADED).Compatibility & Impact
USE_NOF=OFF) remain fully functional and tested.ListStorageDevicesuses cached probe accounting and reader locks over segment managers, avoiding locks on the hot I/O data path.Before submitting a new issue...
@github-actions[bot] commented on GitHub (Oct 10, 2026):
Thanks for opening this issue, @zxpdemonio!
16206312A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide
@zxpdemonio commented on GitHub (Oct 10, 2026):
Phase 2 from the phased plan above is now specified in #4565 and implemented in #4566, stacked on #4560.
Scope delivered:
DEGRADED, self-healing on the first successful probe.DrainJobmachinery, so no second migration lifecycle is introduced.maintenance_planintegration:device_isolatedin recovery candidates,drainingin GC candidates.isolate,unisolate,drain,drain_status, plusisolated/draining/draining_job_idonGET /api/v1/devices.--nof_auto_isolate_degraded_devices(defaulttrue) as an operator off-switch.One refinement relative to the state machine drawn above is worth flagging for reviewers of #4560: the fence triggers at
DEGRADEDrather than atFAILED.FAILEDis derived from the same threshold as the alive timeout, so a device that is only fenced atFAILEDis unmounted in the same heartbeat iteration and the fence never gets a window to act. The alive-timeout unmount rule itself is unchanged, and fencing a device never delays it.