HDDS-14349. Adding startupProbe for helm HA deployments#42
Open
shuan1026 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
PTAL @adoroszlai Thank you! |
Contributor
|
@dnskr please review if you have time |
chungen0126
reviewed
Jul 21, 2026
| - sh | ||
| - -c | ||
| - | | ||
| ozone admin scm roles 2>/dev/null | grep -q $(hostname -f) && exit 0 || exit 1 |
There was a problem hiding this comment.
Thanks @shuan1026 for working on this. I think we should also check if SCM leaves safe mode.
Contributor
Author
There was a problem hiding this comment.
Thanks for the suggestion! I've updated the SCM startupProbe to also check that SCM has left safe mode, and increased failureThreshold so the probe has enough time before the pod is restarted.
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.
What changes were proposed in this pull request?
This change adds a
startupProbefor HA OM/SCM deployments so longer initialization is not treated as a liveness failure and does not restart the container.The chart currently relies on an HTTP
livenessProbeagainst the UI port. Under HA (replicas > 1), OM/SCM startup can take longer; a short liveness window can kill the process while it is still bootstrapping.A
startupProbeaddresses that failure mode: until startup succeeds, kubelet does not apply liveness-based restarts for probe failures.In scope
replicas > 1):startupProbeviaozone admin om roles, checking that the local hostname appears in the roles outputstartupProbeviaozone admin scm roles(same idea; hostname match follows SCM roles format)podManagementPolicy: Parallelon the OM StatefulSet — avoids OrderedReady stalling at onlyom-0while startup waits for peerspublishNotReadyAddresses: trueon the OM headless Service — peer DNS must exist before startup passes; default headless only publishes Ready pods, and roles startup keeps pods NotReady until the probe succeedstimeoutSecondsmust be larger than the sample value of5, becauseozone admin * rolesoften blocks while peers / DNS / Ratis are not ready yetOut of scope
readinessProbe(moved to [HDDS-15874])Why readiness is not in this PR
The Jira issue and [reviewer sample]) included both
startupProbeandreadinessProbe. After kind testing, readiness was split to [HDDS-15874]; this PR delivers startup only.Different problem, different tool
The pain is HA deployments take longer to initialize → avoid premature liveness restarts →
startupProbe. AreadinessProbedoes not fix that; it controls Service endpoint membership, not “do not kill me while starting”.Historical concern for quorum OM may still applies
[HDDS-1668] suggested skipping readiness on the OM HA: Ready-gated Endpoints can fight peer DNS needed at OM HA startup (
OzoneManager.loadOMHAConfigs).Cost of roles-based readiness on kind
Using
ozone admin * rolesas a recurring readiness probe has ongoing cost (fork JVM/CLI + RPC). That is acceptable for a bounded startup window; as a lifelong readiness check the cost is amplified.Follow-up
httpGet, or document deferral).Probe shape (illustrative; OM)
SCM HA uses
ozone admin scm roleswith a hostname form that matches SCM roles output ($(hostname -f)in testing).Non-HA (
replicas == 1) does not add a roles exec probe, to avoid assuming multi-node Ratis roles output.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14349
How was this patch tested?
1. kind — default install (OM HA)
On a fresh kind cluster:
Results:
timed out after 20sevents while peers/roles are not ready; withinfailureThresholdthe probe succeeds and Ready is reached without repeated liveness Killingtime ozone admin om roles -id cluster1is about 2s (belowtimeoutSeconds: 20)2. kind — SCM HA (
scm.replicas=3, fresh install)On a new release/cluster (do not scale an existing
scm.replicas=1in place):Same pass criteria: Ready, no restart storm.
Out of scope for this issue/PR:
kubectl scaleorhelm upgrade --set scm.replicas=3migrating an existing scm 1→3 deployment (known STS revision /addSCMissues; track separately).