Skip to content

Commit

Permalink
Daemon: do GetRWLayer after checking if container use the current gra…
Browse files Browse the repository at this point in the history
…ph driver

Signed-off-by: Lei Jitang <[email protected]>
  • Loading branch information
coolljt0725 committed Jan 27, 2016
1 parent 5b0183e commit 899f1b1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,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
Expand Down

0 comments on commit 899f1b1

Please sign in to comment.