Fix docker daemon start with old running container which user volume plugin. Fixes #15720

Signed-off-by: Lei Jitang <leijitang@huawei>
Upstream-commit: c8a46cb0b2793bb7d742a3d221ec733d1bbaae2c
Component: engine
This commit is contained in:
Lei Jitang
2015-08-21 11:29:53 +08:00
parent 781da712cd
commit 0313208649
+8 -8
View File
@@ -194,14 +194,6 @@ func (daemon *Daemon) register(container *Container, updateSuffixarray bool) err
// we'll waste time if we update it for every container
daemon.idIndex.Add(container.ID)
if err := daemon.verifyVolumesInfo(container); err != nil {
return err
}
if err := container.prepareMountPoints(); err != nil {
return err
}
if container.IsRunning() {
logrus.Debugf("killing old running container %s", container.ID)
// Set exit code to 128 + SIGKILL (9) to properly represent unsuccessful exit
@@ -221,6 +213,14 @@ func (daemon *Daemon) register(container *Container, updateSuffixarray bool) err
}
}
if err := daemon.verifyVolumesInfo(container); err != nil {
return err
}
if err := container.prepareMountPoints(); err != nil {
return err
}
return nil
}