From eb861a7ae9784392cb98b6960566f9575537e127 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Wed, 13 Dec 2017 15:33:15 -0500 Subject: [PATCH] Revert "Make plugins dir private." This reverts commit 0c2821d6f2de692d105e50a399daa65169697cca. Due to other changes this is no longer needed and resolves some other issues with plugins. Signed-off-by: Brian Goff Upstream-commit: 37d7b7ddc332541f516d0c41d9ad30b28f2d3e22 Component: engine --- components/engine/plugin/manager.go | 5 ----- components/engine/plugin/manager_linux.go | 8 -------- components/engine/plugin/manager_windows.go | 2 -- 3 files changed, 15 deletions(-) diff --git a/components/engine/plugin/manager.go b/components/engine/plugin/manager.go index a163a2aa7e..2bdf82e56f 100644 --- a/components/engine/plugin/manager.go +++ b/components/engine/plugin/manager.go @@ -111,11 +111,6 @@ func NewManager(config ManagerConfig) (*Manager, error) { return nil, errors.Wrapf(err, "failed to mkdir %v", dirName) } } - - if err := setupRoot(manager.config.Root); err != nil { - return nil, err - } - var err error manager.executor, err = config.CreateExecutor(manager) if err != nil { diff --git a/components/engine/plugin/manager_linux.go b/components/engine/plugin/manager_linux.go index 9670cf8ae4..1def28c2a0 100644 --- a/components/engine/plugin/manager_linux.go +++ b/components/engine/plugin/manager_linux.go @@ -159,13 +159,6 @@ func shutdownPlugin(p *v2.Plugin, c *controller, executor Executor) { } } -func setupRoot(root string) error { - if err := mount.MakePrivate(root); err != nil { - return errors.Wrap(err, "error setting plugin manager root to private") - } - return nil -} - func (pm *Manager) disable(p *v2.Plugin, c *controller) error { if !p.IsEnabled() { return errors.Wrap(errDisabled(p.Name()), "plugin is already disabled") @@ -194,7 +187,6 @@ func (pm *Manager) Shutdown() { shutdownPlugin(p, c, pm.executor) } } - mount.Unmount(pm.config.Root) } func (pm *Manager) upgradePlugin(p *v2.Plugin, configDigest digest.Digest, blobsums []digest.Digest, tmpRootFSDir string, privileges *types.PluginPrivileges) (err error) { diff --git a/components/engine/plugin/manager_windows.go b/components/engine/plugin/manager_windows.go index ac03d6e639..72ccae72d3 100644 --- a/components/engine/plugin/manager_windows.go +++ b/components/engine/plugin/manager_windows.go @@ -26,5 +26,3 @@ func (pm *Manager) restore(p *v2.Plugin) error { // Shutdown plugins func (pm *Manager) Shutdown() { } - -func setupRoot(root string) error { return nil }