[v4.2.0-rhel] health check: add on-failure actions #15953
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For systems that have extreme robustness requirements (edge devices, particularly those in difficult to access environments), it is important that applications continue running in all circumstances. When the application fails, Podman must restart it automatically to provide this robustness. Otherwise, these devices may require customer IT to physically gain access to restart, which can be prohibitively difficult.
Add a new
--on-failure
flag that supports four actions:none: Take no action.
kill: Kill the container.
restart: Restart the container. Do not combine the
restart
action with the--restart
flag. When running inside of a systemd unit, consider using thekill
orstop
action instead to make use of systemd's restart policy.stop: Stop the container.
To remain backwards compatible, none is the default action.
Backport of commit aad29e7
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2097708
Signed-off-by: Valentin Rothberg vrothberg@redhat.com
Does this PR introduce a user-facing change?
@TomSweeneyRedHat @baude @mheon PTAL