mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Daemon: do GetRWLayer after checking if container use the current graph driver
Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
parent
5b0183e91c
commit
899f1b1870
1 changed files with 6 additions and 7 deletions
|
@ -277,15 +277,14 @@ func (daemon *Daemon) restore() error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore the container if it does not support the current driver being used by the graph
|
||||||
|
if (container.Driver == "" && currentDriver == "aufs") || container.Driver == currentDriver {
|
||||||
rwlayer, err := daemon.layerStore.GetRWLayer(container.ID)
|
rwlayer, err := daemon.layerStore.GetRWLayer(container.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Errorf("Failed to load container mount %v: %v", id, err)
|
logrus.Errorf("Failed to load container mount %v: %v", id, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
container.RWLayer = rwlayer
|
container.RWLayer = rwlayer
|
||||||
|
|
||||||
// Ignore the container if it does not support the current driver being used by the graph
|
|
||||||
if (container.Driver == "" && currentDriver == "aufs") || container.Driver == currentDriver {
|
|
||||||
logrus.Debugf("Loaded container %v", container.ID)
|
logrus.Debugf("Loaded container %v", container.ID)
|
||||||
|
|
||||||
containers[container.ID] = container
|
containers[container.ID] = container
|
||||||
|
|
Loading…
Reference in a new issue