mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
We reset the failed unit to not leak it, however we did so before stopping, this is wrong because when the stop fails we will again have a failed unit. The correct thing is to reset after the stop because once it is stopped it cannot create new errors. I found this using the following reproducer and this is enough to fix it: ``` while :; do cid=$(podman run -d --name foo --health-cmd /home/podman/healthcheck \ --health-startup-cmd /home/podman/healthcheck \ quay.io/libpod/testimage:20241011 /home/podman/pause) podman healthcheck run $cid podman rm -fa sleep 2 systemctl --user list-units --failed | grep $cid && break done ``` Signed-off-by: Paul Holzinger <pholzing@redhat.com>
5.8 KiB
5.8 KiB