mirror of
https://github.com/containers/podman.git
synced 2025-10-18 11:42:55 +08:00
Removed .service file for healthchecks
when a container with healthchecks exits due to stopping or failure, we need the cleanup process to remove both the timer file and the service file. Bz#:2024229 Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -1877,7 +1877,7 @@ func (c *Container) cleanupStorage() error {
|
||||
return cleanupErr
|
||||
}
|
||||
|
||||
// Unmount the a container and free its resources
|
||||
// Unmount the container and free its resources
|
||||
func (c *Container) cleanup(ctx context.Context) error {
|
||||
var lastError error
|
||||
|
||||
@ -1885,7 +1885,7 @@ func (c *Container) cleanup(ctx context.Context) error {
|
||||
|
||||
// Remove healthcheck unit/timer file if it execs
|
||||
if c.config.HealthCheckConfig != nil {
|
||||
if err := c.removeTimer(); err != nil {
|
||||
if err := c.removeTransientFiles(ctx); err != nil {
|
||||
logrus.Errorf("Removing timer for container %s healthcheck: %v", c.ID(), err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user