mirror of
https://github.com/containers/podman.git
synced 2025-10-15 10:16:28 +08:00
libpod: inhibit SIGTERM during cleanup()
The network cleanup can handle it when it is killed half way through as it spits out a bunch of error in that case on the next cleanup attempt. Try to avoid getting into such a state and ignore sigterm during this section. Of course we stil can get SIGKILL so we should work on fixing the underlying problems in network cleanup but let's see if this helps us with the CI flakes in the meantime. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -2046,6 +2046,11 @@ func (c *Container) cleanup(ctx context.Context) error {
|
||||
|
||||
logrus.Debugf("Cleaning up container %s", c.ID())
|
||||
|
||||
// Ensure we are not killed half way through cleanup
|
||||
// which can leave us in a bad state.
|
||||
shutdown.Inhibit()
|
||||
defer shutdown.Uninhibit()
|
||||
|
||||
// Remove healthcheck unit/timer file if it execs
|
||||
if c.config.HealthCheckConfig != nil {
|
||||
if err := c.removeTransientFiles(ctx,
|
||||
|
Reference in New Issue
Block a user