Merge pull request #35157 from BSWANG/fix-panic-on-restore

fix panic on get container pid when live restore containers
This commit is contained in:
Brian Goff 2017-10-16 20:24:20 -04:00 committed by GitHub
commit fa2df86ab6

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