Skip to content

Commit 871231e

Browse files
Fix for log hanging issue Moby 33897
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
1 parent c6c9b51 commit 871231e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

libcontainerd/client_linux.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,9 @@ func (clnt *client) Restore(containerID string, attachStdio StdioCallback, optio
507507
if err := clnt.restore(cont, ev, attachStdio, options...); err != nil {
508508
logrus.Errorf("libcontainerd: error restoring %s: %v", containerID, err)
509509
}
510-
return nil
511510
}
512511

513512
// Kill the container if liveRestore == false
514-
w := clnt.getOrCreateExitNotifier(containerID)
515513
clnt.lock(cont.Id)
516514
container := clnt.newContainer(cont.BundlePath)
517515
container.systemPid = systemPid(cont)
@@ -520,6 +518,11 @@ func (clnt *client) Restore(containerID string, attachStdio StdioCallback, optio
520518

521519
container.discardFifos()
522520

521+
if clnt.liveRestore {
522+
return nil
523+
}
524+
w := clnt.getOrCreateExitNotifier(containerID)
525+
523526
if err := clnt.Signal(containerID, int(syscall.SIGTERM)); err != nil {
524527
logrus.Errorf("libcontainerd: error sending sigterm to %v: %v", containerID, err)
525528
}

0 commit comments

Comments
 (0)