vip: a cut of the site that holds the etcd leader drops the VIP on the holder for 2 to 4 s; once, under netem, etcd had no leader for 111 s #167
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel#167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on real nodes on 2026-10-15 (keel 0.23.21, etcd of 3 members in 3 sites: 9054 BR1, 9062 BR2, witness 9071 BR3; handbook decision 0057, evidence
docs/evidence/2026-10-15-br3-thin-etcd-witness.md).Short drops
Each cut drops all WireGuard packets of one CT. The VIP holder is not cut.
At base, the new leader was elected 7.4 s after the cut (election timeout 5 s, pre-vote). The holder drops the VIP 10 s after its last renewal that the majority confirmed. Thus the margin of
docs/vip.md("10 s rides out one re-election without a move") does not hold when the leader is lost: the drop comes before the new leader answers. A write in flight waits, and the writes stop for the 2 to 4 s.No leader for 111 s (netem, 1st run of the standby cut)
The cut of 9062 (the leader) started at 1792063794.43. 9054 and the witness each sent
MsgPreVoteevery 5.4 to 7.8 s for 111 s, and no leader was elected until 1792063913.27, 47 s after the heal:MsgAppRespandMsgPreVoteResp"with lower term": they came after the heal.The VIP was off every node for the whole time, and the server on 9054 was stopped (keel#168). The 2nd run of the same cut gave a normal election.
Questions
etcdctl move-leaderin tend)?Analysis, 2026-10-15. PR #174 fixes the short drop. The 111 s with no leader stays open here.
The short drop (fixed in #174)
The kernel ended the address
int(10 - age) - 1s after the carry, so about 8 s after the last renewal that the majority confirmed. The new leader came 7.4 s after the cut at base. The release is now 15 s: the kernel keeps the address up to 14 s after that renewal. etcd expires the lease no sooner than 20 s after its receipt of the renewal, so the margin is 5 s or more.The 111 s with no leader (not fixed)
What the logs show:
logterm: 6, index: 126againstindex: 128). Raft does this by design.MsgAppRespandMsgPreVoteRespas a burst at 1792063915.83, after the heal, "with lower term".Thus the path between 9054 and the witness worked, but the raft messages from 9054 to the witness did not arrive until the heal. etcd sends raft messages over a long-lived peer stream (TCP over wg0). The probable cause is that this stream stalled: under 285 ms RTT and loss, a TCP connection that lost several retransmissions waits for an RTO that doubles each time, while new connections and pings work. etcd closes and opens the stream again only when it sees an error.
Why the witness could not win alone: it needs the vote of 9054, and 9054 refuses a candidate with an older log. Why 9054 could not win: its pre-vote did not reach the witness.
Next steps (not done here):
ss -tinof the etcd peer connections (port 2380 or keel's peer port) on the 2 other members during the cut;net.ipv4.tcp_retries2for wg0 only;The 2nd run of the same cut elected a leader normally, so this does not occur on each cut.
The cause of the 111 s is fixed in keel#182 (0.23.31, merged): a peer connection that a cut stalled held raft's messages until its next retransmission, up to 120 s. keel now sets
net.ipv4.tcp_retries2 = 5. In the netns harness, 12 leader cuts gave a new leader in 8 to 13 s (before: up to no leader in 40 s). Evidence:evidence/2026-10-15-etcd-stalled-peer-stream.md; handbook#84 amends 0050. This issue stays open until the real-node matrix confirms it, when BR3-THIN is back.