HDDS-15874. Adding readinessProbe for helm HA deployments#43
Open
shuan1026 wants to merge 1 commit into
Open
Conversation
Contributor
|
@dnskr please review if you have time |
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
readinessProbefor HA OM/SCM deployments so pods are removed from Service endpoints until they have a stable Ratis role (LEADERorFOLLOWER).The chart already has (or will have via [HDDS-14349]) an HTTP
livenessProbeand a roles-basedstartupProbe. Startup answers “still initializing do not treat liveness failures as fatal.” Readiness answers “should this pod receive client traffic via Service endpoints now?”A roles exec
readinessProbematches the [reviewer sample] and is stricter than UIhttpGet: a process can respond on the UI port before OM/SCM has joined the HA ring in a follower/leader role.In scope
replicas > 1):readinessProbeviaozone admin om roles, requiringLEADER|FOLLOWERon the line that matches$(hostname)replicas > 1):readinessProbeviaozone admin scm roles, with$(hostname -f)to match SCM roles output formattimeoutSeconds: 20(sample5is too low while peers/DNS/Ratis are still forming)publishNotReadyAddresses: trueonscm-service-headlesswhenscm.replicas > 1— same peer-DNS requirement as OM during bootstrap/readinessWhy add readiness (Things to confirm)
[HDDS-1668] warned against readiness on the OM HA example: Ready-gated endpoints can fight peer DNS needed during startup (
OzoneManager.loadOMHAConfigs). That concern is may still valid if readiness is added without companions.This PR follows the reviewer sample and addresses former by:
Parallel+ OM headlesspublishNotReadyAddressesso peers are discoverable while pods are not ReadypublishNotReadyAddressesis setTrade-off:
ozone admin * rolesas a recurring readiness check has ongoing cost (fork JVM/CLI + RPC). Acceptable for HA correctness in this chart; a lighterhttpGetreadiness remains a possible follow-up if maintainers prefer.Probe shape (illustrative; OM)
SCM HA uses
ozone admin scm roleswith$(hostname -f)and the sameLEADER|FOLLOWERgrep.Non-HA (
replicas == 1) does not add roles exec readiness.Startup ([HDDS-14349]) only checks membership in the roles list; readiness additionally requires
LEADER|FOLLOWER.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15874
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 Killing2. 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).