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
No VM takes an image lease, so Img.delete/1 removes an image a VM is running from #207
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:104-130: with_image/3 is the only route to Lease.bump/3 and has no caller (grep -rn with_image lib test finds its definition only). lib/hyper/node/img/mutable.ex:112-134: a boot activates the image and leases nothing. lib/hyper/img.ex:151-173: forget/1 refuses only on an unexpired lease.
Effect:Hyper.Img.delete/1 on an image a VM is running from returns :ok where its doc promises {:error, :in_use}. It deletes the images row and unlinks every blob of the chain that no other image shares. On a local filesystem the VM likely keeps running, because its loop device pins the unlinked inode. NFS was not looked at.
Latent today:delete/1 has no caller in lib/. test/hyper/img/delete_test.exs:48 gets its :in_use by calling Lease.bump/3 itself.
Model:image_store_as_built violates mountedChainsPresent. image_store_leased, where a boot takes the lease, holds. The trace, from spec/ on that branch after npm ci:
Activity