Browse Source

daemon: remove migration code from docker 1.11 to 1.12

This code was added in 391441c28baec698f0e3f42d88e116291e8a8e98, to fix
upgrades from docker 1.11 to 1.12 with existing containers.

Given that any container after 1.12 should have the correct configuration
already, it should be safe to assume this upgrade logic is no longer needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 4 năm trước cách đây
mục cha
commit
0f3b94a5c7
1 tập tin đã thay đổi với 0 bổ sung9 xóa
  1. 0 9
      daemon/daemon.go

+ 0 - 9
daemon/daemon.go

@@ -301,15 +301,6 @@ func (daemon *Daemon) restore() error {
 				mapLock.Unlock()
 				mapLock.Unlock()
 				return
 				return
 			}
 			}
-
-			// The LogConfig.Type is empty if the container was created before docker 1.12 with default log driver.
-			// We should rewrite it to use the daemon defaults.
-			// Fixes https://github.com/docker/docker/issues/22536
-			if c.HostConfig.LogConfig.Type == "" {
-				if err := daemon.mergeAndVerifyLogConfig(&c.HostConfig.LogConfig); err != nil {
-					log.WithError(err).Error("failed to verify log config for container")
-				}
-			}
 		}(c)
 		}(c)
 	}
 	}
 	group.Wait()
 	group.Wait()