fix: the overlay's MTU is set live, and an old handshake is drift (keel#139, keel#140) #143
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!143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/overlay-mtu-live"
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 #139 and #140. Evidence: Keel-Linux/handbook#63, findings N7, N6 and N10.
#139 (N7)
After the upgrade to 0.23.13, wg0.conf had
MTU = 1280and the live wg0 kept 1420. Onlywg-quick upreads the line, so apply planned nothing and diff had no MTU line.keel/network/mtu.py(new): reads the live MTU (ip link show) and sets it withip link set dev <iface> mtu N. This restarts nothing.keel/network/switch.py(live_plan,mtu_line,wg_mtu): the live path sets the new file's MTU when the interface has another one. With no live MTU, a change of the MTU line is still a bounce, as is a file that drops it.keel/system/overlay.py,keel/system/ovstate.py: a kept file whose interface has another MTU gets theip link setaction, said as drift.keel network mtu(keel/cli.py,keel/commands.py) does it for each WireGuard interface that is up. The newdebian/keel.postinstruns it on configure, so an upgrade needs no reboot. A failure is said and never fails the upgrade.keel/diff/handshakes.py(mtu_fields):network.overlay.wireguard.mtu, the live MTU against the file's, on the live system.#140 (N6, N10)
Docs:
docs/apply.md,docs/diff.md,docs/mesh.md. Version 0.23.15 (#136 holds 0.23.14).Tests
tests/test_network_mtu.py(new),tests/test_system_overlay.py,tests/test_diff_handshakes.py,tests/test_mesh_create_status.py.tests/postinst.bats(new), run fromtests/test_hook_bats.py.tests/test_network_overlay_live_netns.py, in "mesh / trixie"): wg0 is set to 1420 under a file ofMTU = 1280. A live change of the peers sets 1280 with no wg-quick, the same interface index and the same handshake. Thenkeel network mtusets 1420 back to 1280.CI
All 23 checks pass.
vip-upgrade / trixiefailed one time (run 38074400820,test_a_the_holder_restarted_as_an_upgrade_does: the VIP dropped for 4.47 s after the holder's try-restart). That test does not use the code of this PR, and the same job also failed one time on main. One rerun of the failed job passed.