I noticed that the only reason we kept this was so that we could produce
a more targeted error for the deprecated storage-driver plugins, but it's
very unlikely someone used those, and if they did, we already had the
"DOCKERD_DEPRECATED_GRAPHDRIVER_PLUGINS" added as requirement. Let's
just produce an error if that option is set (and remove that altogether in
a later release, but just that check doesn't add significant complexity).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -1071,11 +1071,10 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S |
| 1071 | 1071 |
}) |
| 1072 | 1072 |
} else {
|
| 1073 | 1073 |
layerStore, err := layer.NewStoreFromOptions(layer.StoreOptions{
|
| 1074 |
- Root: cfgStore.Root, |
|
| 1075 |
- GraphDriver: driverName, |
|
| 1076 |
- GraphDriverOptions: cfgStore.GraphOptions, |
|
| 1077 |
- IDMapping: idMapping, |
|
| 1078 |
- ExperimentalEnabled: cfgStore.Experimental, |
|
| 1074 |
+ Root: cfgStore.Root, |
|
| 1075 |
+ GraphDriver: driverName, |
|
| 1076 |
+ GraphDriverOptions: cfgStore.GraphOptions, |
|
| 1077 |
+ IDMapping: idMapping, |
|
| 1079 | 1078 |
}) |
| 1080 | 1079 |
if err != nil {
|
| 1081 | 1080 |
return nil, err |
| ... | ... |
@@ -140,7 +140,7 @@ func getDriver(name string, config Options) (Driver, error) {
|
| 140 | 140 |
log.G(context.TODO()).WithFields(log.Fields{"driver": name, "home-dir": config.Root}).Error("Failed to GetDriver graph")
|
| 141 | 141 |
|
| 142 | 142 |
// TODO(thaJeztah): remove in next release. |
| 143 |
- if config.ExperimentalEnabled && os.Getenv("DOCKERD_DEPRECATED_GRAPHDRIVER_PLUGINS") != "" {
|
|
| 143 |
+ if os.Getenv("DOCKERD_DEPRECATED_GRAPHDRIVER_PLUGINS") != "" {
|
|
| 144 | 144 |
return nil, fmt.Errorf("DEPRECATED: Support for experimental graphdriver plugins has been removed. See https://docs.docker.com/go/deprecated/")
|
| 145 | 145 |
} |
| 146 | 146 |
|
| ... | ... |
@@ -47,11 +47,10 @@ func TestRemoveImageGarbageCollector(t *testing.T) {
|
| 47 | 47 |
client := d.NewClientT(t) |
| 48 | 48 |
|
| 49 | 49 |
layerStore, _ := layer.NewStoreFromOptions(layer.StoreOptions{
|
| 50 |
- Root: d.Root, |
|
| 51 |
- GraphDriver: d.StorageDriver(), |
|
| 52 |
- GraphDriverOptions: nil, |
|
| 53 |
- IDMapping: idtools.IdentityMapping{},
|
|
| 54 |
- ExperimentalEnabled: false, |
|
| 50 |
+ Root: d.Root, |
|
| 51 |
+ GraphDriver: d.StorageDriver(), |
|
| 52 |
+ GraphDriverOptions: nil, |
|
| 53 |
+ IDMapping: idtools.IdentityMapping{},
|
|
| 55 | 54 |
}) |
| 56 | 55 |
i := images.NewImageService(images.ImageServiceConfig{
|
| 57 | 56 |
LayerStore: layerStore, |
| ... | ... |
@@ -43,20 +43,18 @@ type layerStore struct {
|
| 43 | 43 |
|
| 44 | 44 |
// StoreOptions are the options used to create a new Store instance |
| 45 | 45 |
type StoreOptions struct {
|
| 46 |
- Root string |
|
| 47 |
- GraphDriver string |
|
| 48 |
- GraphDriverOptions []string |
|
| 49 |
- IDMapping idtools.IdentityMapping |
|
| 50 |
- ExperimentalEnabled bool |
|
| 46 |
+ Root string |
|
| 47 |
+ GraphDriver string |
|
| 48 |
+ GraphDriverOptions []string |
|
| 49 |
+ IDMapping idtools.IdentityMapping |
|
| 51 | 50 |
} |
| 52 | 51 |
|
| 53 | 52 |
// NewStoreFromOptions creates a new Store instance |
| 54 | 53 |
func NewStoreFromOptions(options StoreOptions) (Store, error) {
|
| 55 | 54 |
driver, err := graphdriver.New(options.GraphDriver, graphdriver.Options{
|
| 56 |
- Root: options.Root, |
|
| 57 |
- DriverOptions: options.GraphDriverOptions, |
|
| 58 |
- IDMap: options.IDMapping, |
|
| 59 |
- ExperimentalEnabled: options.ExperimentalEnabled, |
|
| 55 |
+ Root: options.Root, |
|
| 56 |
+ DriverOptions: options.GraphDriverOptions, |
|
| 57 |
+ IDMap: options.IDMapping, |
|
| 60 | 58 |
}) |
| 61 | 59 |
if err != nil {
|
| 62 | 60 |
if options.GraphDriver != "" {
|