fix(admin): return 503 when health deps are not ready#1824
fix(admin): return 503 when health deps are not ready#1824houseme merged 4 commits intorustfs:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42cb6f9625
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
I’ve signed the CLA. Could a maintainer please approve workflows so CI can run? Thanks! |
|
@yash27-lab Thank you for your contribution, please add the relevant content of the PR improvement for everyone to understand and review. |
|
Thanks for the feedback. I’ve updated the PR description with full context:
Please take another look. Happy to adjust anything else needed. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated readiness endpoint so orchestrators (e.g., Kubernetes) can distinguish “process is up” from “dependencies are ready,” returning HTTP 503 until core dependencies are initialized.
Changes:
- Add
/health/readyendpoint and constant (HEALTH_READY_PATH) across server/admin/console routing. - Update health handlers to compute dependency readiness (storage + IAM) and return
503 Service Unavailablefor readiness checks when not ready. - Update Helm chart readinessProbe paths to use
/health/ready.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rustfs/src/server/readiness.rs | Exempts /health/ready from the global readiness gate so the probe remains reachable during startup. |
| rustfs/src/server/prefix.rs | Adds HEALTH_READY_PATH constant (/health/ready). |
| rustfs/src/server/layer.rs | Treats /health/ready as a non-S3 path for conditional CORS handling. |
| rustfs/src/admin/router.rs | Allows unauthenticated GET/HEAD access for both /health and /health/ready. |
| rustfs/src/admin/route_registration_test.rs | Extends route registration tests to include /health/ready. |
| rustfs/src/admin/handlers/health.rs | Implements readiness vs liveness behavior and returns 503 for readiness when deps are not ready; adds unit tests for helper logic. |
| rustfs/src/admin/console.rs | Adds console-side /rustfs/console/health/ready route and reuses shared readiness logic. |
| helm/rustfs/values.yaml | Updates default readinessProbe path to /health/ready. |
| helm/rustfs/templates/deployment.yaml | Updates Deployment readinessProbe path to /health/ready. |
Summary
503 Service Unavailablewhen health dependencies are not ready.Testing