Skip to content

Commit 555dac5

Browse files
committed
daemon/graphdriver: remove support for external graphdriver plugins
This is a follow-up to 6da604a, which deprecated external graphdriver plugins. This patch removes the functionality; some warnings / errors are kept in place, but can be removed in a follow-up release. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent c083aae commit 555dac5

13 files changed

Lines changed: 34 additions & 910 deletions

File tree

daemon/daemon.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,6 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
11541154
GraphDriver: driverName,
11551155
GraphDriverOptions: cfgStore.GraphOptions,
11561156
IDMapping: idMapping,
1157-
PluginGetter: d.PluginStore,
11581157
ExperimentalEnabled: cfgStore.Experimental,
11591158
})
11601159
if err != nil {

daemon/graphdriver/driver.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/containerd/log"
1212
"github.com/docker/docker/pkg/archive"
1313
"github.com/docker/docker/pkg/idtools"
14-
"github.com/docker/docker/pkg/plugingetter"
1514
"github.com/pkg/errors"
1615
"github.com/vbatts/tar-split/tar/storage"
1716
)
@@ -158,16 +157,17 @@ func Register(name string, initFunc InitFunc) error {
158157
}
159158

160159
// GetDriver initializes and returns the registered driver
161-
func GetDriver(name string, pg plugingetter.PluginGetter, config Options) (Driver, error) {
160+
func GetDriver(name string, config Options) (Driver, error) {
162161
if initFunc, exists := drivers[name]; exists {
163162
return initFunc(filepath.Join(config.Root, name), config.DriverOptions, config.IDMap)
164163
}
164+
log.G(context.TODO()).WithFields(log.Fields{"driver": name, "home-dir": config.Root}).Error("Failed to GetDriver graph")
165165

166-
pluginDriver, err := lookupPlugin(name, pg, config)
167-
if err == nil {
168-
return pluginDriver, nil
166+
// TODO(thaJeztah): remove in next release.
167+
if config.ExperimentalEnabled && os.Getenv("DOCKERD_DEPRECATED_GRAPHDRIVER_PLUGINS") != "" {
168+
return nil, fmt.Errorf("DEPRECATED: Support for experimental graphdriver plugins has been removed. See https://docs.docker.com/go/deprecated/")
169169
}
170-
log.G(context.TODO()).WithError(err).WithField("driver", name).WithField("home-dir", config.Root).Error("Failed to GetDriver graph")
170+
171171
return nil, ErrNotSupported
172172
}
173173

@@ -189,14 +189,14 @@ type Options struct {
189189
}
190190

191191
// New creates the driver and initializes it at the specified root.
192-
func New(name string, pg plugingetter.PluginGetter, config Options) (Driver, error) {
192+
func New(name string, config Options) (Driver, error) {
193193
ctx := context.TODO()
194194
if name != "" {
195195
log.G(ctx).Infof("[graphdriver] trying configured driver: %s", name)
196196
if err := checkRemoved(name); err != nil {
197197
return nil, err
198198
}
199-
return GetDriver(name, pg, config)
199+
return GetDriver(name, config)
200200
}
201201

202202
// Guess for prior driver

daemon/graphdriver/graphtest/graphtest_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func newDriver(t testing.TB, name string, options []string) *Driver {
3434
assert.NilError(t, err)
3535

3636
assert.NilError(t, os.MkdirAll(root, 0o755))
37-
d, err := graphdriver.GetDriver(name, nil, graphdriver.Options{DriverOptions: options, Root: root})
37+
d, err := graphdriver.GetDriver(name, graphdriver.Options{DriverOptions: options, Root: root})
3838
if err != nil {
3939
t.Logf("graphdriver: %v\n", err)
4040
if graphdriver.IsDriverNotSupported(err) {

daemon/graphdriver/plugin.go

Lines changed: 0 additions & 59 deletions
This file was deleted.

daemon/graphdriver/proxy.go

Lines changed: 0 additions & 261 deletions
This file was deleted.

0 commit comments

Comments
 (0)