Repository navigation
Implementation of Ready status condition - #26
Merged
Merged
Conversation
Oleg Kunitsyn (hiddenmarten)
approved these changes
Mar 17, 2024
Oleg Kunitsyn (hiddenmarten)
left a comment
Contributor
There was a problem hiding this comment.
lgtm
Kirill Ilin (sircthulhu)
force-pushed
the
24-impl-ready-check
branch
from
March 17, 2024 13:06
6c17292 to
f2d7cd3
Compare
Kirill Ilin (sircthulhu)
requested review from
Grigory Rochev (Uburro) and
Sergey Shevchenko (sergeyshevch)
March 17, 2024 13:06
Kirill Ilin (sircthulhu)
force-pushed
the
24-impl-ready-check
branch
from
March 17, 2024 13:12
f2d7cd3 to
939589b
Compare
Kirill Ilin (sircthulhu)
enabled auto-merge (squash)
March 17, 2024 17:34
Grigory Rochev (Uburro)
approved these changes
Mar 18, 2024
Terry Tang (saymololy)
pushed a commit
to saymololy/etcd-operator
that referenced
this pull request
Nov 2, 2026
…tack#26) discoverMemberID built its endpoint list from voter peers and then *unconditionally* appended the member's own client URL as a "self last" fallback. The comment claimed the learner rejection "only fires when we route past a voter to a learner", but clientv3's balancer does not honor endpoint order — it round-robins. So when the member being discovered is itself a freshly-added learner and a voter peer is present, the balancer can land MemberList on our own etcd, which returns "rpc not supported for learner". With a 5s context budget that wedges discovery: MemberID never gets populated, MemberReady never flips true, the cluster controller's allMembersReady gate never opens, the scale-up stalls past progressDeadline, and the next member is never added. Observed on dev4 during the cert-manager TLS smoke: a 3-replica cluster stuck at 2 members (one voter + one perpetual learner) with the operator logging MemberList against the learner's own endpoint. Not TLS-specific — any multi-member scale-up where a learner's pod restarts before promotion (re-triggering discovery) can hit it. Fix: make self a true fallback — append it only when no voter peer is available (single-node bootstrap, or no other voter Ready yet), mirroring memberEndpoints' voter-or-fallback shape. When a voter peer exists, discovery dials only voters and resolves the learner's ID from their MemberList by name / peer URL. Tests: TestDiscoverMemberID_ExcludesSelfWhenVoterAvailable reproduces the wedge (target IS the learner, one voter peer) and asserts self is excluded — it fails on the old code with the exact two-endpoint list. TestDiscoverMemberID_FallsBackToSelfWhenNoVoter pins the single-node fallback the tightening must preserve. Signed-off-by: Timofei Larkin <[email protected]> Co-authored-by: Claude Opus 4.7 <[email protected]>
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.
Update cluster Ready status according to StatefulSet status and update ConfigMap cluster state to
existingafter first time STS is readyfixes #24