From 0f3b94a5c7efa3032203dcaf0dc41570c900fd7e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 7 Dec 2020 15:29:07 +0100 Subject: [PATCH] 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 --- daemon/daemon.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 3d8cca2880..90a2e583f5 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -301,15 +301,6 @@ func (daemon *Daemon) restore() error { mapLock.Unlock() 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) } group.Wait()