daemon: restore(): remove fallback for legacy containers
The check was accounting for old containers that did not have a storage-driver
set in their config, and was added in
for docker v0.7.0-rc6 - nearly 9 Years ago, so very likely nobody is still
depending on this ;-)
@@ -239,8 +239,11 @@ func (daemon *Daemon) restore() error {
log.WithError(err).Error("failed to load container")
return
}
- // Ignore the container if it does not support the current driver being used by the graph
- if (c.Driver == "" && daemon.graphDriver == "aufs") || c.Driver == daemon.graphDriver {
+ if c.Driver != daemon.graphDriver {
+ // Ignore the container if it wasn't created with the current storage-driver
+ log.Debugf("not restoring container because it was created with another storage driver (%s)", c.Driver)
+ return
+ }
rwlayer, err := daemon.imageService.GetLayerByID(c.ID)
if err != nil {
log.WithError(err).Error("failed to load container mount")
@@ -255,9 +258,6 @@ func (daemon *Daemon) restore() error {
mapLock.Lock()
containers[c.ID] = c
mapLock.Unlock()
- } else {
- log.Debugf("cannot load container because it was created with another storage driver")
- }
}(v.Name())
}
group.Wait()
