fix: the VIP's lock no longer starts keel-database-follow.path (keel#164) #173
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!173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/vip-lock-no-path-trigger-164"
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 #164. Stacked on #172.
With etcd,
keel-database-follow.path(PathChanged=/var/lib/keel/vip) startedkeel database followevery 1 to 2 s, and on the replica it failed withunit-start-limit-hit.Cause
vipstate.locked()opened/var/lib/keel/vip/lockfor writing. The VIP controller takes that lock at each turn:take()every 1 s on each node, andcarry_held()at each confirmed renewal, every 2 s on the holder. The close of a file opened for writing isIN_CLOSE_WRITE, an event ofPathChanged=, even when nothing was written. The numbers match the evidence: a run every 2.2 s on the holder, 5 runs in 7 s on the replica.Change
flockneeds no write access, and the close is thenIN_CLOSE_NOWRITE. The path does not change, so a helper of the older version shares the lock during the upgrade.tests/pathwatch.pywatches a directory with systemd'sPathChangedmask (ctypes inotify).Tests
[(8, 'lock')]on each node). A move of the VIP still makes an event.Not in this PR:
keel diffdoes not report a failed unit of an enabled overlay as drift. With the cause fixed, the path does not fail.36c447fd76197cae475836c447fd76857d10b11c857d10b11c2661e8962a