mirror of
https://github.com/containers/podman
synced 2024-10-20 09:13:46 +00:00
runtime: check for pause pid existence
check that the pause pid exists before trying to move it to a separate scope. Closes: https://github.com/containers/podman/issues/12065 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
825889cc7e
commit
6b3b0a17c6
|
@ -543,7 +543,11 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
|||
return err
|
||||
}
|
||||
if became {
|
||||
utils.MovePauseProcessToScope(pausePid)
|
||||
// Check if the pause process was created. If it was created, then
|
||||
// move it to its own systemd scope.
|
||||
if _, err = os.Stat(pausePid); err == nil {
|
||||
utils.MovePauseProcessToScope(pausePid)
|
||||
}
|
||||
os.Exit(ret)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,8 @@ var _ = Describe("podman system reset", func() {
|
|||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
Expect(session.ErrorToString()).To(Not(ContainSubstring("Failed to add pause process")))
|
||||
|
||||
// If remote then the API service should have exited
|
||||
// On local tests this is a noop
|
||||
podmanTest.StartRemoteService()
|
||||
|
|
Loading…
Reference in a new issue