Skip to main content

Module drain

Module drain 

Source
Expand description

Shared drain-marker helpers.

The drain marker is a file next to the engine WAL that signals the API to keep refusing traffic across a restart. These helpers are pure (path / fs / atomic) so both the hypercall-api readiness path and the admin lifecycle surface use the same implementation. State-coupled quiesce orchestration lives with each caller, since it operates on caller-specific channels.

Functionsยง

drain_marker_path
Path to the drain marker file, derived from the engine WAL path.
keep_drain_after_accepted_quiesce_failure
Keep the API drained and persist the marker when a quiesce request was accepted but its outcome is unknown, so a restart stays safe.
persist_drain_marker
Persist the drain marker so a restart resumes in the drained state.