You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New flags in a `podman update` can change the configuration of HealthCheck when the container is started, without having to restart or recreate the container.
This can help determine why a given container suddenly started failing HealthCheck without interfering with the services it provides. For example, reconfigure HealthCheck to keep logs longer than the usual last X results, store logs to other destinations, etc.
These flags are added to the `podman update` command:
--health-cmd string set a healthcheck command for the container ('none' disables the existing healthcheck)
--health-interval string set an interval for the healthcheck (a value of disable results in no automatic timer setup)(Changing this setting resets timer.) (default "30s")
--health-log-destination string set the destination of the HealthCheck log. Directory path, local or events_logger (local use container state file)(Warning: Changing this setting may cause the loss of previous logs.) (default "local")
--health-max-log-count uint set maximum number of attempts in the HealthCheck log file. ('0' value means an infinite number of attempts in the log file) (default 5)
--health-max-log-size uint set maximum length in characters of stored HealthCheck log. ('0' value means an infinite log length) (default 500)
--health-on-failure string action to take once the container turns unhealthy (default "none")
--health-retries uint the number of retries allowed before a healthcheck is considered to be unhealthy (default 3)
--health-start-period string the initialization time needed for a container to bootstrap (default "0s")
--health-startup-cmd string Set a startup healthcheck command for the container
--health-startup-interval string Set an interval for the startup healthcheck. Changing this setting resets the timer, depending on the state of the container. (default "30s")
--health-startup-retries uint Set the maximum number of retries before the startup healthcheck will restart the container
--health-startup-success uint Set the number of consecutive successes before the startup healthcheck is marked as successful and the normal healthcheck begins (0 indicates any success will start the regular healthcheck)
--health-startup-timeout string Set the maximum amount of time that the startup healthcheck may take before it is considered failed (default "30s")
--health-timeout string the maximum time allowed to complete the healthcheck before an interval is considered failed (default "30s")
--no-healthcheck Disable healthchecks on container
Signed-off-by: Jan Rodák <[email protected]>
"Set the number of consecutive successes before the startup healthcheck is marked as successful and the normal healthcheck begins (0 indicates any success will start the regular healthcheck)",
"Set the number of consecutive successes before the startup healthcheck is marked as successful and the normal healthcheck begins (0 indicates any success will start the regular healthcheck)",
Copy file name to clipboardExpand all lines: cmd/podman/containers/update.go
+9-3
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ import (
17
17
)
18
18
19
19
var (
20
-
updateDescription=`Updates the cgroup configuration of a given container`
20
+
updateDescription=`Updates the configuration of an already existing container, allowing different resource limits to be set, and HealthCheck configuration. The currently supported options are a subset of the podman create/run.`
0 commit comments