plugins: remove automatic mounting of a state dir

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 15ff9de65801178a522c445ff9fb8964e21d12a0
Component: engine
This commit is contained in:
Tibor Vass
2016-06-17 09:13:35 -07:00
parent dc0392a7ed
commit bc663a35ec
2 changed files with 6 additions and 14 deletions

View File

@ -22,10 +22,7 @@ import (
"github.com/docker/engine-api/types"
)
const (
defaultPluginRuntimeDestination = "/run/docker/plugins"
defaultPluginStateDestination = "/state"
)
const defaultPluginRuntimeDestination = "/run/docker/plugins"
var manager *Manager
@ -49,7 +46,6 @@ type plugin struct {
P types.Plugin `json:"plugin"`
client *plugins.Client
restartManager restartmanager.RestartManager
stateSourcePath string
runtimeSourcePath string
}
@ -72,7 +68,6 @@ func (pm *Manager) newPlugin(ref reference.Named, id string) *plugin {
Name: ref.Name(),
ID: id,
},
stateSourcePath: filepath.Join(pm.libRoot, id, "state"),
runtimeSourcePath: filepath.Join(pm.runRoot, id),
}
if ref, ok := ref.(reference.NamedTagged); ok {
@ -82,7 +77,6 @@ func (pm *Manager) newPlugin(ref reference.Named, id string) *plugin {
}
func (pm *Manager) restorePlugin(p *plugin) error {
p.stateSourcePath = filepath.Join(pm.libRoot, p.P.ID, "state")
p.runtimeSourcePath = filepath.Join(pm.runRoot, p.P.ID)
if p.P.Active {
return pm.restore(p)
@ -342,7 +336,6 @@ func (pm *Manager) remove(p *plugin) error {
}
pm.Lock() // fixme: lock single record
defer pm.Unlock()
os.RemoveAll(p.stateSourcePath)
delete(pm.plugins, p.P.ID)
delete(pm.nameToID, p.Name())
pm.save()