Skip to content

feat(admin): classify RustFS diagnostic capabilities - #298

Merged
cxymds merged 6 commits into
mainfrom
cxymds/issue-1403-diagnostic-capabilities
Jul 23, 2026
Merged

feat(admin): classify RustFS diagnostic capabilities#298
cxymds merged 6 commits into
mainfrom
cxymds/issue-1403-diagnostic-capabilities

Conversation

@cxymds

@cxymds cxymds commented Jul 23, 2026

Copy link
Copy Markdown
Member

Related issue

Closes rustfs/backlog#1403
Parent: rustfs/backlog#1383
Roadmap: rustfs/backlog#1361

Replaces closed #282 after its obsolete stacked base was removed.

Background and user impact

RustFS 1.0.0-beta.10 registers several diagnostic routes that are placeholders rather than real measurements. Route presence and HTTP 200 responses are therefore not sufficient evidence of support. Without probe-specific truth, rc could advertise or execute object, network, site, or site-replication performance tests that return misleading success.

The existing /v3/inspect-data endpoint returns reconstructed object bytes and is not an inspect archive.

Root cause

Runtime discovery exposed broad server capabilities but did not normalize individual diagnostic probe states or provide a reusable fail-closed guard. Unknown future server versions could not be distinguished safely from the pinned beta.10 contract.

Solution

  • add 10 stable diagnostic capability names
  • classify the pinned beta.10 contract:
    • available: health snapshot, cluster snapshot, extensions catalog, drive observations, and client-devnull
    • unsupported: inspect archive
    • stubbed: object, network, site, and site-replication netperf
  • mirror cluster and extension availability from their actual read-only discovery requests
  • treat unknown future versions as unknown and missing v4 discovery as version-gated
  • preserve permission-denied, disabled, unsupported, stubbed, version-gated, and unknown states
  • add a reusable CapabilityReport guard that permits only explicitly available diagnostics
  • verify discovery never executes an active diagnostic or speed-test request

Validation

Passed locally at exact head 18c2fb5 synchronized with current main:

  • cargo fmt --all --check
  • CARGO_BUILD_JOBS=2 cargo clippy --workspace -- -D warnings
  • CARGO_BUILD_JOBS=2 cargo test --workspace

Historical and current thread-aware audits found no reviews or unresolved review threads.

Review notes

This PR adds no diagnostic command and performs no active probe. Unknown versions remain fail-closed until a server-owned per-probe contract is available through rustfs/backlog#1402. Relative to current main, the implementation changes only core/S3 capability code and does not modify protected contracts.

@cxymds
cxymds requested a review from overtrue July 23, 2026 01:37
@cxymds
cxymds merged commit 83242b8 into main Jul 23, 2026
17 checks passed
@cxymds
cxymds deleted the cxymds/issue-1403-diagnostic-capabilities branch July 23, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant