Browse Source

daemon/graphdriver: remove isDeprecated() utility

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 years ago
parent
commit
c33b31116c
1 changed files with 0 additions and 24 deletions
  1. 0 24
      daemon/graphdriver/driver.go

+ 0 - 24
daemon/graphdriver/driver.go

@@ -196,9 +196,6 @@ func New(name string, pg plugingetter.PluginGetter, config Options) (Driver, err
 		if err := checkRemoved(name); err != nil {
 			return nil, err
 		}
-		if isDeprecated(name) {
-			logrus.Warnf("[graphdriver] WARNING: the %s storage-driver is deprecated and will be removed in a future release; visit https://docs.docker.com/go/storage-driver/ for more information", name)
-		}
 		return GetDriver(name, pg, config)
 	}
 
@@ -219,11 +216,6 @@ func New(name string, pg plugingetter.PluginGetter, config Options) (Driver, err
 				logrus.Errorf("[graphdriver] prior storage driver %s failed: %s", name, err)
 				return nil, err
 			}
-			if isDeprecated(name) {
-				err = errors.Errorf("prior storage driver %s is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/ for more information", name)
-				logrus.Errorf("[graphdriver] %v", err)
-				return nil, err
-			}
 
 			// abort starting when there are other prior configured drivers
 			// to ensure the user explicitly selects the driver to load
@@ -246,11 +238,6 @@ func New(name string, pg plugingetter.PluginGetter, config Options) (Driver, err
 	// If no prior state was found, continue with automatic selection, and pick
 	// the first supported, non-deprecated, storage driver (in order of priorityList).
 	for _, name := range priorityList {
-		if isDeprecated(name) {
-			// Deprecated storage-drivers are skipped in automatic selection, but
-			// can be selected through configuration.
-			continue
-		}
 		driver, err := getBuiltinDriver(name, config.Root, config.DriverOptions, config.IDMap)
 		if err != nil {
 			if IsDriverNotSupported(err) {
@@ -263,11 +250,6 @@ func New(name string, pg plugingetter.PluginGetter, config Options) (Driver, err
 
 	// Check all registered drivers if no priority driver is found
 	for name, initFunc := range drivers {
-		if isDeprecated(name) {
-			// Deprecated storage-drivers are skipped in automatic selection, but
-			// can be selected through configuration.
-			continue
-		}
 		driver, err := initFunc(filepath.Join(config.Root, name), config.DriverOptions, config.IDMap)
 		if err != nil {
 			if IsDriverNotSupported(err) {
@@ -314,12 +296,6 @@ func isEmptyDir(name string) bool {
 	return false
 }
 
-// isDeprecated checks if a storage-driver is marked "deprecated"
-func isDeprecated(name string) bool {
-	// NOTE: when deprecating a driver, update daemon.fillDriverInfo() accordingly
-	return false
-}
-
 // checkRemoved checks if a storage-driver has been deprecated (and removed)
 func checkRemoved(name string) error {
 	switch name {