Merge pull request #23460 from Luap99/cleanup-term

libpod: inhibit SIGTERM during cleanup()
This commit is contained in:
openshift-merge-bot[bot] 2024-08-06 11:38:27 +00:00 committed by GitHub
commit 69862b7251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -2053,6 +2053,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,