1
0
Fork 0
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:
bingshen.wbs 2017-10-10 22:45:26 +08:00
parent 3437f0f4e5
commit db8de0d0da

View file

@ -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)
} }