-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
File: compose/compose-file/index.md
The documentation for
restart_policy.max_attempts is hard to understand.
max_attempts: How many times to attempt to restart a container before giving up (default: never give up). If the restart does not succeed within the configured window, this attempt doesn’t count toward the configured max_attempts value. For example, if max_attempts is set to ‘2’, and the restart fails on the first attempt, more than two restarts may be attempted.
What? "If the restart does not succeed within the configured window, this attempt doesn’t count toward the configured max_attempts value." Is "does not succeed" == "fails"?
So it means: "If the restart fails within the configured window, this attempt doesn’t count toward the configured max_attempts value."
So the failure has to happen after the window? So if it fails right away it will just retry endlessly? This makes no sense.
If this is the semantics there should be some sort of warning, maybe: "Beward that any rapid failure will make the docker daemon use all available CPU and disk on the machine".