Skip to content

Report readiness from startup state and load Raft options - #38

Merged
loverustfs merged 2 commits into
mainfrom
cursor/production-operability-12a1
Nov 19, 2026
Merged

loverustfs merged 2 commits into
mainfrom
cursor/production-operability-12a1

Conversation

@loverustfs

@loverustfs loverustfs commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Dependency

#35 is merged. main is 9b152ae4f820fa5f8e6971eab0862d23e5ca385f (parent 36d8e950926b9e1f34c43e3f377031ff54963a2a). GitHub restacked this pull request onto that commit as 588e666fa57c5bd308d9bbc3d7b2a520777701fb. That restack has the same tree as the reviewed f55cc6cf653a475a41de6846bbf2d03d749acdca (452e0d1291f34aa8a69d663c6629383a512e9f86). The earlier integration point 8b276d3714ef8aef02179d93baefb1cdb0a933e1 is the pre-merge head of #35, not the current base.

This head is 5f9a50e555653b51685ab76c9af9936a46296f57, one documentation commit on 588e666. It does not rewrite that history. #36 is not imported.

What this pull request changes

[raft] is loaded. /readyz and /healthz are HTTP 200 only when startup has finished, shutdown has not started, and every local Raft group has finished startup replay, applied a log entry, is a voter, and knows a leader. A bound socket is not enough. /livez stays 200 during startup and graceful shutdown. gRPC stays open when the probe is 503.

Authentication is the behavior now on main at 9b152ae4:

  • classify_secret: whitespace-only credentials return HTTP 401 on /metrics, /livez, /readyz, and /healthz before any bearer compare. An exact Bearer plus those spaces is still 401. A configured secret still requires an exact match. An empty secret does not challenge probes, and startup reaches that state only with the opt-in.
  • allow_unauthenticated accepts only a literal loopback IP (127.0.0.0/8 or ::1). localhost is not accepted and is not resolved.
  • The gRPC bound address is checked again after accept. A busy saved port rechecks the fallback string before binding it. The metrics listener checks the bound address again inside spawn_metrics_listener before it is served.
  • Unknown security aliases still fail closed. from_toml_str still runs that rejection, then raft_options.validate(). reject_unauthenticated_bind still calls validate_for_startup().

docs/en/operability.md now states those resulting-tree rules and pins the authentication baseline to 9b152ae4. It no longer says #35 is unmerged. Locale pages that still describe the raft skip are left for a separate documentation change.

Source-level checks

On the pre-restack tree, identical to 588e666: cargo test -p metadb-server --lib -- operability:: metrics:: metrics_http:: config:: auth_tests — 17 passed. The documentation commit 5f9a50e was not tested. No product, test, or workflow file changed in it.

Not run

Integration tests, workspace tests, stress, prefix-load, and GitHub Actions. No deploy, Aliyun access, auto-merge, or CI subscription. This pull request is left for an independent check before merge.

Leftovers

  • Locale pages outside docs/en/operability.md still say raft_options is skipped. That reconciliation is separate and is not imported here.
  • No gRPC health RPC. TxnRecoveryWorker is not a readiness gate. Raft options apply at group start only.
Open in Web Open in Cursor 

@cursor
cursor Bot force-pushed the cursor/production-operability-12a1 branch from d197c70 to dbd792b Compare November 19, 2026 19:41
@cursor
cursor Bot changed the base branch from main to cursor/explicit-auth-opt-in-f050 November 19, 2026 19:42
@loverustfs
loverustfs added this pull request to stack #41 November 19, 2026 19:42
@cursor
cursor Bot force-pushed the cursor/production-operability-12a1 branch from dbd792b to f55cc6c Compare November 19, 2026 19:43
Base automatically changed from cursor/explicit-auth-opt-in-f050 to main November 19, 2026 19:53
Load the [raft] table instead of ignoring raft_options, and publish
unlabeled probes and gauges that stay not-ready until local shards
can actually take traffic.

Co-authored-by: RustFS <hello@rustfs.com>
The page no longer says pull request 35 is unmerged or pins the old
8b276d3 baseline. Authentication rules are those on main at 9b152ae.

Co-authored-by: RustFS <hello@rustfs.com>
@loverustfs
loverustfs merged commit f9425f3 into main Nov 19, 2026
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.

2 participants