This was mistakenly unmounting everything under `plugins/*` instead of
just `plugins/<id>/*` anytime a plugin is removed.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
| ... | ... |
@@ -633,8 +633,8 @@ func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error {
|
| 633 | 633 |
id := p.GetID() |
| 634 | 634 |
pm.config.Store.Remove(p) |
| 635 | 635 |
pluginDir := filepath.Join(pm.config.Root, id) |
| 636 |
- if err := recursiveUnmount(pm.config.Root); err != nil {
|
|
| 637 |
- logrus.WithField("dir", pm.config.Root).WithField("id", id).Warn(err)
|
|
| 636 |
+ if err := recursiveUnmount(pluginDir); err != nil {
|
|
| 637 |
+ logrus.WithField("dir", pluginDir).WithField("id", id).Warn(err)
|
|
| 638 | 638 |
} |
| 639 | 639 |
if err := os.RemoveAll(pluginDir); err != nil {
|
| 640 | 640 |
logrus.Warnf("unable to remove %q from plugin remove: %v", pluginDir, err)
|