瀏覽代碼

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 <cpuguy83@gmail.com>
Brian Goff 7 年之前
父節點
當前提交
37d7b7ddc3
共有 3 個文件被更改,包括 0 次插入15 次删除
  1. 0 5
      plugin/manager.go
  2. 0 8
      plugin/manager_linux.go
  3. 0 2
      plugin/manager_windows.go

+ 0 - 5
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 {

+ 0 - 8
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) {

+ 0 - 2
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 }