зеркало из https://github.com/microsoft/docker.git
Merge pull request #19717 from coolljt0725/fix_load
Daemon: do GetRWLayer after checking if container support the current graph driver
This commit is contained in:
Коммит
63f8429bf0
|
@ -278,15 +278,14 @@ func (daemon *Daemon) restore() error {
|
|||
continue
|
||||
}
|
||||
|
||||
rwlayer, err := daemon.layerStore.GetRWLayer(container.ID)
|
||||
if err != nil {
|
||||
logrus.Errorf("Failed to load container mount %v: %v", id, err)
|
||||
continue
|
||||
}
|
||||
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 {
|
||||
rwlayer, err := daemon.layerStore.GetRWLayer(container.ID)
|
||||
if err != nil {
|
||||
logrus.Errorf("Failed to load container mount %v: %v", id, err)
|
||||
continue
|
||||
}
|
||||
container.RWLayer = rwlayer
|
||||
logrus.Debugf("Loaded container %v", container.ID)
|
||||
|
||||
containers[container.ID] = container
|
||||
|
|
Загрузка…
Ссылка в новой задаче