fix: the VIP rides out an etcd re-election, and the watch starts a stopped holder (keel#167, keel#168) #174
No reviewers
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!174
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/vip-rides-out-election-167-168"
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?
Fixes #168. Fixes the short VIP drop of #167; the 111 s with no etcd leader stays open in #167, with an analysis there. Stacked on #173.
#167, the short drop
A cut of the site that held etcd's leader made the holder drop the VIP for 2 to 4 s on real nodes. The new leader came 7.4 s after the cut. The kernel ended the address
int(10 - age) - 1s after the carry, so about 8 s after the last renewal that the majority confirmed.RELEASE_AFTERis 15 s, not 10 s. The kernel now keeps the address up to 14 s after that renewal: one election of 5 to 10 s and a renewal.docs/vip.md, "The margin between the two holders"). A unit test keeps the release at least 5 s inside the TTL.RELEASE_AFTERfrom keel. The handbook gets a 0049 amendment for the new value.#168
During the cut, the watch stopped the holder's server ("not proven, the VIP is not on wg0"). The VIP came back, but the server stayed stopped: the watch followed only a server that answered.
keel database watchnow runskeel database followon the holder when its server does not answer. Follow starts it once the VIP is on wg0.Tests
RED first: the holder keeps the VIP through 11 s with no renewal;
needs_followis true for a stopped server on the holder.keel#167: a cut of the site that held etcd's leader made the VIP holder drop the VIP for 2 to 4 s on real nodes. The new leader came 7.4 s after the cut. The kernel ended the address int(10 - age) - 1 s after the carry, so about 8 s after the last renewal that the majority confirmed. - RELEASE_AFTER is 15 s, not 10 s. The kernel now keeps the address up to 14 s after that renewal, which covers one election of 5 to 10 s and a renewal. The release stays 5 s inside the TTL of 20 s, which etcd counts from its receipt of the renewal, so a holder cut off from the majority has dropped the VIP before any claim is possible. - With the longer grace, a lease that was revoked early could look expired once the node waited until its due time. The controller now takes a lease as expired only when it first saw it gone at its due time (keel#165). - The netns tests read RELEASE_AFTER from keel, not a copy of 10 s. The 111 s with no etcd leader under netem is not changed here: see the analysis in keel#167. keel#168: during that time the watch stopped the holder's server ("not proven, the VIP is not on wg0"). The VIP came back, but the server stayed stopped: the watch followed only a server that answered. - keel database watch now runs keel database follow on the holder when its server does not answer. Follow starts it once the VIP is on wg0.5a1bdbedb02a98bf74af5a1bdbedb0d39bfdab63d39bfdab6310c8e5c60610c8e5c606d6525b3aa8