Files
podman/libpod
Matt Heon 925794c6aa Ensure HC events fire after logs are written
HC events were firing as part of the `exec` call, before it had
even been decided whether the HC succeeded or failed. As such,
the status was not going to be correct any time there was a
change (e.g. the first event after a container went healthy to
unhealthy would still read healthy). Move the event into the
actual Healthcheck function and throw it in a defer to make sure
it happens at the very end, after logs are written.

Ignores several conditions that did not log previously (container
in question does not have a healthcheck, or an internal failure
that should not really happen).

Still not a perfect solution. This relies on the HC log being
written, when instead we could just get the status straight from
the function writing the event - so if we fail to write the log,
we can still report a bad status. But if the log wasn't written,
we're in bad shape regardless - `podman ps` would disagree with
the event written, for example.

Fixes #19237

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-09-11 08:02:46 -04:00
..
2023-09-07 15:18:02 +02:00
2022-01-18 12:47:07 +01:00
2017-11-01 11:24:59 -04:00
2022-10-17 09:19:41 +02:00
2023-02-28 13:45:36 -05:00
2022-01-18 12:47:07 +01:00
2022-09-10 07:52:00 -04:00
2022-04-25 13:23:20 +02:00
2022-09-01 13:02:01 -04:00
2022-10-17 09:19:41 +02:00
2022-01-18 12:47:07 +01:00
2023-05-25 14:46:34 +02:00
2023-06-19 14:31:40 +02:00
2022-01-18 12:47:07 +01:00