fix: only the other member of the pair gates a promote; the others are told after (keel#137) #141
Open
marcos-mendez wants to merge 1 commit from
fix/promote-announce-in-background into fix/claim-txn-bounded-retry
pull from: fix/promote-announce-in-background
merge into: Keel-Linux:fix/claim-txn-bounded-retry
Keel-Linux:main
Keel-Linux:fix/ci-flakes-177
Keel-Linux:fix/etcd-stalled-peer-stream-167
Keel-Linux:fix/155-minor-items
Keel-Linux:fix/vip-gone-note-in-state-dir-178
Keel-Linux:feat/images-key-verifiers
Keel-Linux:fix/pg-start-fenced-156
Keel-Linux:fix/vip-rides-out-election-167-168
Keel-Linux:fix/vip-lock-no-path-trigger-164
Keel-Linux:fix/pg-reseed-clears-vip-fence-166
Keel-Linux:fix/pg-promote-follow-before-join-169
Keel-Linux:fix/pg-expired-lease-alone-165
Keel-Linux:fix/vip-learn-without-etcd
Keel-Linux:fix/pg-fenced-holder-writable
Keel-Linux:fix/pg-reseed-cluster-unit
Keel-Linux:feat/postgres-pair-failover
Keel-Linux:docs/signing-roles-0055
Keel-Linux:test/write-resume-bound-5s
Keel-Linux:feat/postgres-pair-converge
Keel-Linux:feat/postgres-pair
Keel-Linux:fix/planned-promote-quiesce
Keel-Linux:fix/vip-restart-renewal
Keel-Linux:feat/mesh-keepalive
Keel-Linux:fix/overlay-mtu-live
Keel-Linux:fix/claim-txn-bounded-retry
Keel-Linux:feat/container-template-guard
Keel-Linux:test/flaky-vip-upgrade-epoch-133
Keel-Linux:fix/peer-added-live
Keel-Linux:test/flaky-mariadb-cert-ask-131
Keel-Linux:test/divergence-record-clock-second
Keel-Linux:test/flaky-netns-94
Keel-Linux:fix/overlay-mtu-119
Keel-Linux:test/mariadb-cloud-simple-crash
Keel-Linux:fix/follow-writable-when-the-vip-lands
Keel-Linux:fix/vip-lease-last-second
Keel-Linux:fix/mariadb-crashed-primary-keel94
Keel-Linux:fix/promote-old-primary-gone-bounded
Keel-Linux:fix/joiner-full-mesh-live-peers
Keel-Linux:fix/flaky-netns-keel94
Keel-Linux:fix/overlay-live-peers
Keel-Linux:fix/root-holder-for-every-member
Keel-Linux:fix/old-primary-read-only-until-proven
Keel-Linux:feat/invite-in-the-inviters-region
Keel-Linux:fix/version-from-metadata
Keel-Linux:fix/members-channel-thread-switch
Keel-Linux:feat/mariadb-pair-scenario
Keel-Linux:feat/mariadb-pair-semisync
Keel-Linux:feat/etcd-root-issued-rbac
Keel-Linux:feat/vip-continuity-upgrades
Keel-Linux:fix/overlay-new-in-chain
Keel-Linux:feat/mesh-vip
Keel-Linux:ci/security-scan
Keel-Linux:fix/etcd-tests-pki-clock
Keel-Linux:feat/mesh-etcd
Keel-Linux:fix/mesh-full-mesh
Keel-Linux:feat/mesh-join
Keel-Linux:feat/mesh-token
Keel-Linux:fix/overlay-peer-not-this-node
Keel-Linux:feat/spec-cloud-section
Keel-Linux:fix/inspect-wireguard-window-keeps-spec
Keel-Linux:fix/inspect-wireguard-state
Keel-Linux:fix/inspect-on-a-keel-core
Keel-Linux:feat/overlay-state-hooks
Keel-Linux:feat/manifest-firewall
Keel-Linux:feat/manifest-apply
Keel-Linux:feat/manifest-reader
Keel-Linux:fix/database-waits-for-server
Keel-Linux:fix/replica-read-only
Keel-Linux:fix/seed-accounts-roles-server-id
Keel-Linux:feat/seed-replica
Keel-Linux:test/ssh-over-console
Keel-Linux:fix/lxc-console-confirm
Keel-Linux:fix/grant-compressed-ipv6
Keel-Linux:feat/wireguard-overlay
Keel-Linux:fix/hub-measured-honestly
Keel-Linux:feat/converge-tls-acme-apply
Keel-Linux:feat/converge-tls-acme
Keel-Linux:feat/converge-hostname
Keel-Linux:feat/converge-security-alerts
Keel-Linux:docs/manifest-unit-fields
Keel-Linux:pkg/keel-0.2.1
Keel-Linux:fix/hosts-read-as-the-resolver-reads
Keel-Linux:docs/diff-converged-field
Keel-Linux:fix/hosts-keeps-one-entry-for-the-host
Keel-Linux:feat/firstboot-system-hook
Keel-Linux:feat/apply-system-only
Keel-Linux:feat/apply-fqdn-hosts
Keel-Linux:fix/security-updates-name
Keel-Linux:fix/diff-disabled-feature
Keel-Linux:fix/inspect-ipv6-slaac
Keel-Linux:feat/apply-users-locale
Keel-Linux:fix/verify-cache-names
Keel-Linux:feat/render-ip6
Keel-Linux:fix/diff-secret-files
Keel-Linux:feat/diff
Keel-Linux:feat/inspect
Keel-Linux:docs/license
Keel-Linux:feat/pull-assemble
No reviewers
Labels
Clear labels
Barrier affecting people with disabilities
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Further information is requested
This will not be worked on
accessibility
Barrier affecting people with disabilities
bug
Something isn't working
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
wontfix
This will not be worked on
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel!141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/promote-announce-in-background"
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 #137. Stacked on #136 (both bump
debian/changelog); its base is #136's branch.Problem
In cloud simple, one member outside the pair that was down (web-2) made every
keel vip promotewait two 10 s timeouts on it: once for its epoch, once for the announcement. On a real pair a planned promote took about 21 s, and the write gap went up to 11 s. The new primary's follow waits for the VIP onwg0, so it also waited those 10 s; this is the 10 s of #138.Change
Before etcd (
keel/mesh/vippromote.py,promoted):in_background), and what each said is logged.A replica that holds the primary's claim asks the release at the next epoch at once, and asks the epoch only when the primary refuses that as stale (then the release again): two round trips with the other member, not three. With three, the first CI run measured 3.44 s.
With
--old-primary-gone(promoted_by_all), every peer is asked and told, and the claim is carried on a majority of those that answer, as before. With etcd, the peers are told in the background too.Also:
keel/mesh/vipnode.py(epochsandannouncetakeonly),docs/vip.md,debian/changelog0.23.15.Tests
tests/test_mesh_vipmove.py:--old-primary-gone.tests/vip_helpers.pyturns the background off for the older tests, which read the peers right after a promote.vip-simple / trixie(tests/test_vip_simple_netns.py): every spec in cloud simple, C (outside the pair) cut off. A planned promote must take the VIP in less than 3 s at 250 ms and 2 % loss, andtests/vip_overlap.pymust prove that no two nodes carry it at one instant.Measured (
vip-simple / trixie,191f4c4, 250 ms ±25 ms, 2 % loss)Planned promote with C (outside the pair) cut off: 1.9 s (keel 0.23.13 on real nodes: about 21 s). No two nodes carried the VIP at one instant.
CI record
Green at
191f4c4at the first run, no rerun. The first head (9988ec4) failedvip-simple / trixie(3.44 s, three round trips, fixed by the change above),tests / coverage(an older test,test_no_peer_answering_is_no_majority, expected the majority message; updated), and the coverage job'stest_mesh_netnstimed out once.Test plan
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.