Skip to content

fix(admin): return 503 when health deps are not ready#1824

Merged
houseme merged 4 commits intorustfs:mainfrom
yash27-lab:codex/health-readiness-503
Feb 15, 2026
Merged

fix(admin): return 503 when health deps are not ready#1824
houseme merged 4 commits intorustfs:mainfrom
yash27-lab:codex/health-readiness-503

Conversation

@yash27-lab
Copy link
Contributor

@yash27-lab yash27-lab commented Feb 14, 2026

Summary

  • Fixed admin health behavior to return 503 Service Unavailable when health dependencies are not ready.
  • Prevents reporting a false healthy state during startup or dependency-degraded conditions.
  • Improves readiness signaling for operators and automation.

Testing

  • Verified through repository CI checks on the merged PR.

@CLAassistant
Copy link

CLAassistant commented Feb 14, 2026

CLA assistant check
All committers have signed the CLA.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@yash27-lab
Copy link
Contributor Author

yash27-lab commented Feb 14, 2026

I’ve signed the CLA. Could a maintainer please approve workflows so CI can run? Thanks!

@houseme
Copy link
Contributor

houseme commented Feb 15, 2026

@yash27-lab Thank you for your contribution, please add the relevant content of the PR improvement for everyone to understand and review.

@houseme houseme requested a review from majinghe February 15, 2026 00:46
@yash27-lab
Copy link
Contributor Author

Thanks for the feedback. I’ve updated the PR description with full context:

  • Problem statement
  • Root cause
  • What changed
  • Behavior changes (HTTP 200/503)
  • Validation details

Please take another look. Happy to adjust anything else needed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/ready endpoint and constant (HEALTH_READY_PATH) across server/admin/console routing.
  • Update health handlers to compute dependency readiness (storage + IAM) and return 503 Service Unavailable for 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.

@houseme houseme merged commit 715cf33 into rustfs:main Feb 15, 2026
13 checks passed
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.

5 participants