fix: upgrades keep the VIP; etcd restarts one member at a time #46
No reviewers
Labels
No labels
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/common!46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/vip-etcd-rolling-upgrades"
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?
The packaging half of Keel-Linux/keel#87, for the maintainer's requirement of 2026-10-10: an
apt full-upgradeon a node whose VIP is active must neither drop the VIP nor trigger a failover. The design, and the measurements, are in keel#87.What an upgrade did before this PR
dh_installsystemd --no-enable --no-startgenerated a preinst that runsdeb-systemd-invoke stop keel-vip-check.timer keel-vip.serviceon every upgrade, and a postinst that never starts either unit again. On the holder, ExecStopPost dropped the VIP. On the replica, the controller was stopped as well, so nothing claimed the VIP. The VIP was down until a reboot orkeel spec apply.etcd.serviceon every upgrade, and nothing coordinates that restart across members. With apt running on two members of three at once, the cluster loses its majority while both restart.Changes
--no-stop-on-upgrade, so there is no preinst stop.deb-systemd-invoke try-restart keel-vip.serviceon an upgrade, and on a file trigger for/usr/lib/python3/dist-packages/keel, so an upgrade of keel restarts the helper and it runs the new code. A unit that was stopped is never started.RestartSec=2./usr/lib/systemd/system/etcd.service.d/keel-overlay-etcd.conf:ExecStop=+keel mesh etcd gate stopwaits until every other voter is healthy and no other member is restarting, then takes a restart lock held on an etcd lease.ExecStartPost=-+keel mesh etcd gate startedreleases the lock once this member is back in the majority.daemon-reload.tests/overlay-install.bats: real upgrades to builds of the same packages with a bumped version (with_version), with fab's policy-rc.d moved aside for those tests. The cases:Test plan
build / trixie: both packages build and pass lintian (clean locally).install / trixie: overlay-install.bats, including the four new upgrade tests.KEEL_COMMITto its merge commit.