mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-12 11:55:42 +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
0519e7ef87
commit
246782133c
2 changed files with 7 additions and 1 deletions
|
|
@ -541,7 +541,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…
Add table
Reference in a new issue