spiegel_podman/pkg
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
..
annotations [v5.2] update golangci-lint to 1.60.1 2024-08-21 12:06:44 -04:00
api [v5.2-rhel] Add --health-max-log-count, --health-max-log-size, 2024-10-09 22:31:01 +02:00
auth Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
autoupdate [v5.2] update golangci-lint to 1.60.1 2024-08-21 12:06:44 -04:00
bindings [v5.2] golangci-lint: remove most skip dirs 2024-08-21 12:06:44 -04:00
channel bump golangci-lint to v1.50.1 2022-12-15 13:39:56 +01:00
checkpoint restore: fix container restore into pod 2024-06-20 13:24:53 +01:00
copy Bump Go module to v5 2024-02-08 09:35:39 -05:00
criu chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
ctime chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
domain [v5.2-rhel] Add --health-max-log-count, --health-max-log-size, 2024-10-09 22:31:01 +02:00
emulation chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
env pkg/env.Join(): don't modify passed-in maps 2024-02-29 11:47:44 -05:00
errorhandling Fix typos 2023-02-11 18:23:24 +01:00
farm Fix name for builder in farm connection 2024-07-17 22:31:48 -04:00
fileserver Bump Go module to v5 2024-02-08 09:35:39 -05:00
inspect Bump Go module to v5 2024-02-08 09:35:39 -05:00
k8s.io Bump Go module to v5 2024-02-08 09:35:39 -05:00
lookup Cease using deprecated runc userlookup 2024-02-02 11:02:43 -05:00
machine [v5.2] golangci-lint: make darwin linting happy 2024-08-21 12:06:44 -04:00
namespaces Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
parallel Bump Go module to v5 2024-02-08 09:35:39 -05:00
ps podman ps: fix racy pod name query 2024-07-18 17:34:26 +02:00
rctl Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
rootless pkg/rootless: simplify reexec for container code 2024-07-08 13:28:31 +02:00
seccomp pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
selinux Fix SELinux functions names to not be repetitive 2020-04-23 15:57:34 -04:00
signal refacto: unknown signal return signal number without prefix 2024-02-28 19:45:03 +01:00
specgen [v5.2-rhel] Add --health-max-log-count, --health-max-log-size, 2024-10-09 22:31:01 +02:00
specgenutil [v5.2-rhel] Add --health-max-log-count, --health-max-log-size, 2024-10-09 22:31:01 +02:00
specgenutilexternal Quadlet container mount - support non key=val options 2023-09-27 16:20:00 +03:00
systemd [v5.2-rhel] Add --health-max-log-count, --health-max-log-size, 2024-10-09 22:31:01 +02:00
terminal Fix Lint on Windows and enable the job 2024-02-20 08:06:18 -05:00
timetype Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
trust pkg/trust: use fileutils.(Le|E)xists 2024-04-19 09:52:14 +02:00
util [v5.2] set !remote build tags where needed 2024-08-21 12:06:44 -04:00