The jailed firecracker OS process for one microVM, as a static child of
Hyper.Node.FireVMM.Core.
A trap_exit GenServer that owns firecracker's lifetime end to end:
- on every (re)start it resets any stale jail left by a prior incarnation —
the firecracker jailer refuses to reuse an existing chroot — then launches
the jailer under a linked
MuonTrap.Daemon. The supervised process ishyper-suidhelper jailer ..., whichexecves into the jailer (same pid). - if firecracker exits, the linked
MuonTrap.Daemonexits and this server stops with that reason, soCore's:one_for_allcold-boots the pair. - on teardown it guarantees firecracker is dead:
MuonTrap's port-close kills by process group, but the jailersetsids firecracker into its own session, so it escapes that kill and would leak (holding the cgroup, the rootfs dm device, loop devices).terminate/2therefore runs the helper'scgroup.killteardown (ChrootJail.remove), which SIGKILLs the whole leaf cgroup regardless of session. The same call on (re)start cleans up after a prior incarnation the BEAM could not (a SIGKILL'd node leaves noterminate/2); the periodicHyper.Node.Reaperis the final backstop.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
@spec child_spec(Hyper.Node.FireVMM.Opts.t()) :: Supervisor.child_spec()
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(Hyper.Node.FireVMM.Opts.t()) :: GenServer.on_start()