Wait for minio to initialize before running integration tests - #7867
Merged
CharlieTLe merged 1 commit intoSep 29, 2026
Merged
Conversation
The e2e readiness probe for minio polled /minio/health/live, which minio answers with 200 as soon as its HTTP server is up, before the object layer, bucket metadata and IAM are initialized. /minio/health/ready does the same. A test that talks to S3 right after the probe passes can get "Server not initialized yet, please try again", as TestLoadRuntimeConfigFromCloudStorage did on the amd64 requires_docker job for cortexproject#7863. Probe /minio/health/cluster instead, which returns 503 until all three are initialized. Signed-off-by: Charlie Le <charlie_le@apple.com>
SungJin1212
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The e2e readiness probe for minio polls
/minio/health/live. MinIO answers that with 200 as soon as its HTTP server is up, before it can serve S3 requests. A test that uploads right after the probe passes can fail withServer not initialized yet, please try again.This hit
TestLoadRuntimeConfigFromCloudStorageon the amd64requires_dockerjob for #7863 (run 36196173168); a re-run passed.Failure output
Root cause
In MinIO's
cmd/healthcheck-handler.go(identical inRELEASE.2024-05-28T17-19-04ZandRELEASE.2024-07-04T14-25-45Z, so this predates #7864):LivenessCheckHandler(/minio/health/live) andReadinessCheckHandler(/minio/health/ready) only set anx-minio-server-status: offlineheader while the object layer is nil, and still return 200.ClusterCheckHandler(/minio/health/cluster) goes throughcheckHealth, which returns 503 until the object layer, bucket metadata and IAM are all initialized.Reproduced locally by polling both endpoints from container start: in 6 of 6 trials,
/livereturned 200 for 3 to 8 consecutive polls while/clusterdid not.Change
Probe
/minio/health/cluster.Testing
Against the
v1.22.0-rc.2image:TestLoadRuntimeConfigFromCloudStorage, 20 of 20 passed (-count=20).TestGettingStartedSingleProcessConfigWithBlocksStorage,TestGettingStartedWithGossipedRing,TestLoadRuntimeConfigFromStorageBackendpass.