Skip to content

Budget.Hard loses every reservation when it restarts #123

Open

Description

@markovejnovic

Problem

Budget.Hard holds every live reservation in process state and restarts inside Budget.Supervisor (:one_for_one, lib/hyper/node/budget/supervisor.ex), with an empty state.

Impact

A single Budget.Hard crash forgets the reservations of every running VM while those VMs keep running. Until they exit, the node admits work as if it were empty and can be over-committed by the full budget.

Fix

Rebuild the reservations in init/1 from the VMs actually running on the node (the VM supervisor's children and their specs), or move Budget.Hard into the same restart chain as the VM supervisor.

Activity

  1. added
    bug
    on Nov 11, 2026
  2. markovejnovic commented on Nov 30, 2026

    @markovejnovic
    ContributorAuthor

    Model checking reaches this too. In the Quint specs of #206, placement_hard_crash violates admittedWithinCapacity: one Budget.Hard restart while VMs keep running, and the node admits past its capacity. A counterexample in the model, not reproduced on a running system.

    One addition from reading lib/hyper/node/budget/supervisor.ex:25-28 at e281a48: Sys.Mon and the advertiser share that supervisor, so either of them crash-looping past its restart intensity takes Hard down with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Fields

    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions