1
0
mirror of https://github.com/containers/podman.git synced 2026-02-05 15:45:08 +01:00

Merge pull request #27330 from winterqt/push-pwouqluolwxt

libpod: fix healthchecks not executing every interval on linux
This commit is contained in:
Paul Holzinger
2025-12-12 18:15:05 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -104,6 +104,11 @@ Log[-1].Output | \"Uh-oh on stdout!\\\nUh-oh on stderr!\\\n\"
assert "$cidmatch" =~ " $cid-[0-9a-f]+\.timer *.*/podman healthcheck run $cid" \
"Healthcheck systemd unit exists"
# Check that the right service option is applied so we don't hit the systemd restart limit.
# Even though the code sets StartLimitIntervalSec the systemd command prints StartLimitInterval*U*Sec
run -0 systemctl show "$cid-*.service"
assert "$output" =~ "StartLimitIntervalUSec=0" "The hc service has the right interval set"
current_time=$(date --iso-8601=ns)
# After three successive failures, container should no longer be healthy
_check_health $ctrname "Four or more failures" "