Repository navigation
feat: every overlay peer gets PersistentKeepalive = 25 (keel#140) - #144
Open
marcos-mendez wants to merge 1 commit into
Open
marcos-mendez wants to merge 1 commit into
marcos-mendez wants to merge 1 commit into
Conversation
The coordinator's decision of 2026-10-10 on keel#140: a last handshake older than 180 s is drift and means the member is unreachable only when each peer sends a keepalive, and a keepalive keeps the NAT and firewall state open between sites. - keel.network.wireguard renders PersistentKeepalive = 25 for every peer whose spec gives none (DEFAULT_KEEPALIVE, keepalive()). - keel spec apply sets it live with wg set. A change that only sets the keepalive of a peer the interface holds cannot cut the node off, as an addition cannot (keel#117), so keel mesh keeps it with no handshake and the first sync after the upgrade waits for nothing. - keel diff takes 25 as the declared keepalive of a peer that gives none: a file written before is drift until apply writes it again. - docs/spec.md, docs/diff.md, docs/apply.md. Tests: the render, the default in keel diff (same, and drift for a file without the line), the keepalive-only change kept as safe; the mesh netns suites pass with it. Version 0.23.17 (#142 holds 0.23.16).
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.
Follow-up of #143 for #140. Decision: the coordinator's, 2026-10-10. Turn on PersistentKeepalive = 25 for every mesh peer, so that the 180 s handshake drift means "unreachable" and the NAT/firewall state stays open between sites.
Change
keel/network/wireguard.py:DEFAULT_KEEPALIVE = 25andkeepalive().renderwritesPersistentKeepalivefor every peer: the spec's value, else 25.keel/network/switch.py(keepalive_only): keel spec apply sets the keepalive live withwg set. A change that only sets the keepalive of a peer that the interface holds cannot cut the node off, so it counts as an addition does (added_live, keel#117). keel mesh keeps it with no handshake, so the first sync after the upgrade does not wait for one.keel/diff/compare.py(with_overlay_defaults): a peer that gives no keepalive declares 25. A file written before this version is drift (network.overlay.wireguard.peers.<key>.persistent_keepalive) until apply writes it again.docs/spec.md,docs/diff.md,docs/apply.md. Version 0.23.17 (fix: the old primary turns its database read only before it releases the VIP (keel#138) #142 holds 0.23.16).Tests
tests/test_network_wireguard.py: render and the default.tests/test_inspect_overlay.py: keel diff says same for a file with the line, and drift for a file without it.tests/test_network_overlay_live.py: a change that only sets the keepalive counts as safe; an endpoint change does not.