-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HealthCheck log output options #23900
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Honny1 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
331ce42
to
ebadb8b
Compare
ee1d02a
to
bf7e1cb
Compare
0ff253e
to
a242a59
Compare
a242a59
to
11d04af
Compare
11d04af
to
7d81c50
Compare
7d81c50
to
e5f1e8d
Compare
2ed163e
to
01f4bdf
Compare
01f4bdf
to
8a3e0c7
Compare
8a3e0c7
to
3d147dd
Compare
00eecee
to
b70c402
Compare
…nation 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 <[email protected]> Add --health-max-log-size flag Signed-off-by: Jan Rodák <[email protected]> Add --health-log-destination flag Signed-off-by: Jan Rodák <[email protected]>
b70c402
to
8fae259
Compare
Cockpit tests failed for commit 8fae259. @martinpitt, @jelly, @mvollmer please check. |
This PR creates three new flags that 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:./run/containers/storage/overlay-containers/<container-ID>/healthcheck.log
)directory
: creates a log file named<container-ID>-healthcheck.log
with JSONHealthCheckResults
in the specified directory.events_logger
: The log will be written with logging mechanism set by events_logger.The
--health-max-log-count
flag sets the maximum number of attempts in the HealthCheck log file.0
indicates an infinite number of attempts in the log file.5
attempts in the log file.The
--health-max-log-size
flag sets the maximum length of the log stored.0
indicates an infinite log length.500
log characters.Does this PR introduce a user-facing change?
Fixes: RHEL-24623