mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
health checks: restart timers
Restart the health-check timers instead of starting them. This will surpress annoying errors stating that an already running timer cannot be started anymore. Also make sure that the transient units/timers are stopped and removed when stopping a container. Fixes: #15691 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -1286,6 +1286,12 @@ func (c *Container) stop(timeout uint) error {
|
||||
c.lock.Unlock()
|
||||
}
|
||||
|
||||
if c.config.HealthCheckConfig != nil {
|
||||
if err := c.removeTransientFiles(context.Background()); err != nil {
|
||||
logrus.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
stopErr := c.ociRuntime.StopContainer(c, timeout, all)
|
||||
|
||||
if !c.batched {
|
||||
|
Reference in New Issue
Block a user