mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix panic on get container pid when live restore containers
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
This commit is contained in:
parent
3437f0f4e5
commit
db8de0d0da
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ func (daemon *Daemon) getPidContainer(container *container.Container) (*containe
|
||||||
containerID := container.HostConfig.PidMode.Container()
|
containerID := container.HostConfig.PidMode.Container()
|
||||||
container, err := daemon.GetContainer(containerID)
|
container, err := daemon.GetContainer(containerID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "cannot join PID of a non running container: %s", container.ID)
|
return nil, errors.Wrapf(err, "cannot join PID of a non running container: %s", containerID)
|
||||||
}
|
}
|
||||||
return container, daemon.checkContainer(container, containerIsRunning, containerIsNotRestarting)
|
return container, daemon.checkContainer(container, containerIsRunning, containerIsNotRestarting)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue