fix: stop idle-reaper restart resurrection leaking dm volumes#48
Merged
Conversation
A :permanent DynamicSupervisor child is restarted on its intentional idle
{:stop, :normal}; init/1 then re-creates the dm resource terminate/2 just
destroyed, leaking and resurrecting hyper-rw-<vm> volumes and image/layer
dm chains. Make Img.Mutable, Img.Server and Layer.Server :temporary so
idle-teardown is final.
Adds a per-node Registry (Hyper.Node.Img.MutableRegistry) keyed by vm_id and names each Img.Mutable through it, giving a one-mutable-per-vm invariant and a cheap, non-blocking list of live mutable vm_ids for the Reaper to consult.
The reaper's liveness set was VMSupervisor children union cluster Routing, which omits a vm whose mutable layer is alive but whose VM is mid-boot (not yet routed) or in its post-stop idle grace. Union Img.Mutable.active_vm_ids/0 so the reaper never removes a hyper-rw volume that a live owner still holds.
…mutable/2 refusal and liveness test scope
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The restart: :temporary requirement on the refcounted layer servers is a symptom of coupling external-resource lifetime to BEAM-process lifetime via terminate/2. Add a TODO(arch) at the reaper sweep (the reconciler-in-waiting) proposing reconciliation as the primary cleanup mechanism, plus a why-note at each :temporary site pointing to it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.