Skip deprecated storage-drivers in auto-selection

Discourage users from using deprecated storage-drivers
by skipping them when automatically selecting a storage-
driver.

This change does not affect existing installations, because
existing state will take precedence.

Users can still use deprecated drivers by manually configuring
the daemon to use a specific driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-10-11 13:19:36 +02:00
parent 31be4e0ba1
commit b72db8b82c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -253,6 +253,11 @@ 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.UIDMaps, config.GIDMaps)
if err != nil {
if IsDriverNotSupported(err) {