You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An image lease is not a fence: a lapsed lease lets delete through under a live VM #208
Applies once #207 wires the lease. Found by model checking (the Quint specs in #206). A counterexample in the model, each step read in the code at e281a48. Not reproduced on a running system.
Where:lib/hyper/node/img.ex:133-147: the heartbeat discards a failed bump/3 and rescues a raised one. lib/hyper/img/db/lease.ex:22: 60 s TTL. lease.ex:56: the expiry is written from the VM node's clock. lib/hyper/img.ex:158: it is compared with the deleting node's clock.
Chain:
A VM holds a lease and its node cannot reach Postgres for 60 s. Every heartbeat fails silently.
The lease lapses. The VM keeps running.
delete/1 finds no unexpired lease and unlinks the chain.
Model:image_store_unfenced violates mountedChainsPresent. image_store_leased holds while heartbeats land in time. The trace, from spec/ on that branch after npm ci:
Fix: a trade-off, since the heartbeat swallows failures on purpose (a DB hiccup must not stop a VM). Either a VM stops once its lease has lapsed unrenewed, or delete/1 needs evidence beyond the lease that no node has the image mounted. Independently of that, compute and compare the expiry with the database's now().
Activity