Skip to content

Commit 191bbff

Browse files
committed
libpod: fix healthchecks not executing every interval on linux
By default, systemd sets a limit of how many times a service can start, which means that if you have a healthcheck that runs more often than the limits, systemd will refuse to start it with a message like "Start request repeated too quickly." emitted to the journal. Signed-off-by: Winter M <[email protected]>
1 parent 2487242 commit 191bbff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpod/healthcheck_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (c *Container) createTimer(interval string, isStartup bool) error {
4040
cmd = append(cmd, "--setenv=PATH="+path)
4141
}
4242

43-
cmd = append(cmd, "--unit", hcUnitName, fmt.Sprintf("--on-unit-inactive=%s", interval), "--timer-property=AccuracySec=1s", podman)
43+
cmd = append(cmd, "--unit", hcUnitName, fmt.Sprintf("--on-unit-inactive=%s", interval), "--timer-property=AccuracySec=1s", podman, "--property=StartLimitIntervalSec=0")
4444

4545
if logrus.IsLevelEnabled(logrus.DebugLevel) {
4646
cmd = append(cmd, "--log-level=debug", "--syslog")

0 commit comments

Comments
 (0)