Skip to main content

Module snapshot_resume_options

Module snapshot_resume_options 

Source
Expand description

Options for the guarded Docker snapshot resume (issue #224):

--snapshot-wait <seconds>          wait for the host snapshot lock
--snapshot-disk-wait <seconds>     wait for free disk instead of refusing
--remove-original-after <seconds>  remove the original only if the
                                   replacement still runs after the delay
--snapshot-size-hint <bytes>       skip the `docker inspect --size` walk
--snapshot-prepare <command>       `docker exec` a command in the original
                                   before it is committed

They only apply to --resume. The two waits also read START_SNAPSHOT_LOCK_WAIT and START_SNAPSHOT_DISK_WAIT when the flags are absent, so a supervisor can set them once for every resume it runs.

Structs§

SnapshotResumeOptions
Parsed snapshot resume options; None when the flag was not given.
SnapshotSettings
What a snapshot resume reads from its overrides.

Functions§

insert_overrides
Add the options to the resume overrides object.
parse
Parse one snapshot option; returns the arguments consumed, 0 when args[index] is not one.
parse_seconds
Parse a non-negative number of seconds; fractions are allowed.
parse_size_hint
Parse a size in bytes; k, m, g and t suffixes are 1024-based.
validate
Reject snapshot options outside --resume and fill the waits from the environment.
validate_with_env