Repository navigation
[Backport release-1.6] fix(etcd): require an even spread of members over nodes by default - #4988
Open
europrinter (yankawai) wants to merge 1 commit into
Conversation
The default spread of the etcd members was ScheduleAnyway, which only adds to the score of a node, and other scores can outweigh it. A new etcd on a three-node cluster got its first two members on one node. On a node-local StorageClass a member cannot leave its node, so losing that node takes two of the three members and the quorum. DoNotSchedule with maxSkew 1 still lets an etcd with more members than nodes start, because the skew is counted between the nodes that exist. One node takes all three members and two nodes take two and one. nodeTaintsPolicy is Ignore, so a cordoned node still counts and a member waits for it instead of landing next to another member. The operator copies the constraints into an EtcdMember when it creates it and builds the Pod from that copy, so members that exist keep the old setting and only members created later get the new one. Assisted-by: LLM Signed-off-by: Yan Bondarenko <[email protected]> (cherry picked from commit f1f30b3)
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1 of 12 tasks
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 this PR does
Backport of #4986 to
release-1.6. The fix commit is cherry-picked from f1f30b3 with its cherry-pick reference and applies without conflicts. On this branchetcd-cluster.yamlhas noaffinityblock from #3962, and the spread block andtests/topology-spread_test.yamlare the same as on main before the fix. The docs commit of #4986 rewrites theaffinitydescription and the comment above that block, so it has nothing to change here.The default spread of tenant etcd members becomes
DoNotSchedulewithmaxSkew: 1onkubernetes.io/hostnameandnodeTaintsPolicy: Ignore, and theglobalAppTopologySpreadConstraintsbranch stays as it is. The cluster where two members of a new tenant etcd started on one node runs v1.6.4, which has the same template and the same etcd-operator v0.5.5 as v1.6.5, see #4986. In v0.5.5, and in v0.5.6 thatrelease-1.6ships now, the operator copies the constraints into anEtcdMemberonly when it creates one and builds the Pod from that copy, so on upgrade no member is recreated and only members created later get the new constraint. The two cases the release note declares and the way out of each are confirmed against that source in #4986.On
release-1.6the same command gives 23 tests in 8 suites, and against its template the updated suite fails only the default case, 1 failed and 23 passed. With default valueshelm templatediffers fromrelease-1.6only in the two lines, and with a global policy set it renders the same. The constraint renders the same as with #4986 on main.Screenshots
Not a UI change.
Downstream repositories
Same diff as #4986, so no trigger map entry applies.
Release note