When plugin enable fails, unmount PropagatedMount.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
This commit is contained in:
parent
59ba895a0f
commit
cef443bddf
|
@ -41,6 +41,11 @@ func (pm *Manager) enable(p *v2.Plugin, c *controller, force bool) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := pm.containerdClient.Create(p.GetID(), "", "", specs.Spec(*spec), attachToLog(p.GetID())); err != nil {
|
if err := pm.containerdClient.Create(p.GetID(), "", "", specs.Spec(*spec), attachToLog(p.GetID())); err != nil {
|
||||||
|
if p.PropagatedMount != "" {
|
||||||
|
if err := mount.Unmount(p.PropagatedMount); err != nil {
|
||||||
|
logrus.Warnf("Could not unmount %s: %v", p.PropagatedMount, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue