spiegel_podman/cmd/podman/common
Jan Rodák d8eef21167
[v5.2-rhel] Add --health-max-log-count, --health-max-log-size,
--health-log-destination flags

These flags can affect the output of the HealtCheck log. Currently, when a container is configured with HealthCheck, the output from the HealthCheck command is only logged to the container status file, which is accessible via `podman inspect`.
It is also limited to the last five executions and the first 500 characters per execution.

This makes debugging past problems very difficult, since the only information available about the failure of the HealthCheck command is the generic `healthcheck service failed` record.

- The `--health-log-destination` flag sets the destination of the HealthCheck log.
  - `none`: (default behavior) `HealthCheckResults` are stored in overlay containers. (For example: `$runroot/healthcheck.log`)
  - `directory`: creates a log file named `<container-ID>-healthcheck.log` with JSON `HealthCheckResults` in the specified directory.
  - `events_logger`: The log will be written with logging mechanism set by events_loggeri. It also saves the log to a default directory, for performance on a system with a large number of logs.

- The `--health-max-log-count` flag sets the maximum number of attempts in the HealthCheck log file.
  - A value of `0` indicates an infinite number of attempts in the log file.
  - The default value is `5` attempts in the log file.
- The `--health-max-log-size` flag sets the maximum length of the log stored.
  - A value of `0` indicates an infinite log length.
  - The default value is `500` log characters.

Add --health-max-log-count flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>

Add --health-max-log-size flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>

Add --health-log-destination flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
(cherry picked from commit de856dab99)
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-10-09 22:31:01 +02:00
..
build.go Add --compat-volumes option to build and farm build 2024-07-31 14:31:23 -04:00
completion.go libpod: do not move podman with --cgroups=disabled 2024-05-30 16:59:30 +02:00
completion_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
create.go [v5.2-rhel] Add --health-max-log-count, --health-max-log-size, 2024-10-09 22:31:01 +02:00
create_opts.go [v5.2-rhel] Add --health-max-log-count, --health-max-log-size, 2024-10-09 22:31:01 +02:00
create_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
default.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
inspect.go make podman pod inspect output a json array 2024-02-05 17:26:55 +01:00
netflags.go Merge pull request #21512 from Luap99/pasta-netname-removal 2024-02-08 17:17:55 +00:00
sign.go Bump Go module to v5 2024-02-08 09:35:39 -05:00