summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2020-09-19 18:45:41 +0200
committerSebastiaan van Stijn <github@gone.nl>2020-10-29 23:00:16 +0100
commit182795cff6bbeb93090b5b973cf5b07884e8c5b8 (patch)
tree6e75d0e7309d8fe8ca29ffb1a5344dca8d061409 /plugin
parentbb23f1bf61cb49c5aa3f7df934d79c305afb7c8c (diff)
downloaddocker-182795cff6bbeb93090b5b973cf5b07884e8c5b8.tar.gz
Do not call mount.RecursiveUnmount() on Windows
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'plugin')
-rw-r--r--plugin/manager.go7
-rw-r--r--plugin/manager_linux.go4
-rw-r--r--plugin/manager_windows.go4
3 files changed, 10 insertions, 5 deletions
diff --git a/plugin/manager.go b/plugin/manager.go
index db38fca016..c237378fa3 100644
--- a/plugin/manager.go
+++ b/plugin/manager.go
@@ -23,7 +23,6 @@ import (
"github.com/docker/docker/pkg/system"
v2 "github.com/docker/docker/plugin/v2"
"github.com/docker/docker/registry"
- "github.com/moby/sys/mount"
digest "github.com/opencontainers/go-digest"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
@@ -159,10 +158,8 @@ func (pm *Manager) HandleExitEvent(id string) error {
if restart {
pm.enable(p, c, true)
- } else {
- if err := mount.RecursiveUnmount(filepath.Join(pm.config.Root, id)); err != nil {
- return errors.Wrap(err, "error cleaning up plugin mounts")
- }
+ } else if err := recursiveUnmount(filepath.Join(pm.config.Root, id)); err != nil {
+ return errors.Wrap(err, "error cleaning up plugin mounts")
}
return nil
}
diff --git a/plugin/manager_linux.go b/plugin/manager_linux.go
index a147df62f5..d2245143aa 100644
--- a/plugin/manager_linux.go
+++ b/plugin/manager_linux.go
@@ -346,3 +346,7 @@ func (pm *Manager) createPlugin(name string, configDigest, manifestDigest digest
return p, nil
}
+
+func recursiveUnmount(target string) error {
+ return mount.RecursiveUnmount(target)
+}
diff --git a/plugin/manager_windows.go b/plugin/manager_windows.go
index 89595dfd84..003b2210f9 100644
--- a/plugin/manager_windows.go
+++ b/plugin/manager_windows.go
@@ -26,3 +26,7 @@ func (pm *Manager) restore(p *v2.Plugin, c *controller) error {
// Shutdown plugins
func (pm *Manager) Shutdown() {
}
+
+func recursiveUnmount(_ string) error {
+ return nil
+}