Skip to main content

Module hook

Module hook 

Source
Expand description

The pre-snapshot hook: before isb snapshots a volume, each running instance using it runs its executable /etc/isb/pre-snapshot (if it has one), as root, with a timeout, so an image can make its own state consistent first (a SQLite checkpoint, a flushed session file). Its output goes to the run’s log. A failure is reported; it stops the snapshot only when the volume’s settings say hook_required.

Structs§

HookResult
IncusHooks
Hooks run through incus, in the org’s project.

Enums§

HookStatus
How one instance’s hook went.

Traits§

HookRunner
Where hooks run: incus, or a fake in tests.

Functions§

run_hooks
Run the hook in each of instances (the running ones using the volume). Err only when a hook failed and required is set: the snapshot must not be taken.