From 31be4e0ba11532e5d6df8401f5d459e292c58f36 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 11 Oct 2018 12:47:34 +0200 Subject: [PATCH] Deprecate legacy overlay storage driver, and add warning The `overlay` storage driver is deprecated in favor of the `overlay2` storage driver, which has all the benefits of `overlay`, without its limitations (excessive inode consumption). The legacy `overlay` storage driver will be removed in a future release. Users of the `overlay` storage driver should migrate to the `overlay2` storage driver. The legacy `overlay` storage driver allowed using overlayFS-backed filesystems on pre 4.x kernels. Now that all supported distributions are able to run `overlay2` (as they are either on kernel 4.x, or have support for multiple lowerdirs backported), there is no reason to keep maintaining the `overlay` storage driver. Signed-off-by: Sebastiaan van Stijn --- daemon/graphdriver/driver.go | 2 +- daemon/info.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/graphdriver/driver.go b/daemon/graphdriver/driver.go index baf349ac73..2db61aac49 100644 --- a/daemon/graphdriver/driver.go +++ b/daemon/graphdriver/driver.go @@ -314,7 +314,7 @@ func isEmptyDir(name string) bool { func isDeprecated(name string) bool { switch name { // NOTE: when deprecating a driver, update daemon.fillDriverInfo() accordingly - case "devicemapper": + case "devicemapper", "overlay": return true } return false diff --git a/daemon/info.go b/daemon/info.go index a0fd01eaaf..603474ab97 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -132,7 +132,7 @@ func (daemon *Daemon) fillDriverInfo(v *types.Info) { drivers += fmt.Sprintf(" (%s) ", os) } switch gd { - case "devicemapper": + case "devicemapper", "overlay": v.Warnings = append(v.Warnings, fmt.Sprintf("WARNING: the %s storage-driver is deprecated, and will be removed in a future release.", gd)) } }