Merge pull request #31905 from anusha-ragunathan/unmount-disable

Wait to unmount propagatedmount before marking plugin as disabled.
Upstream-commit: 108dccaf514b86c6d30c2c4e08af606fa2a4b5f1
Component: engine
This commit is contained in:
Brian Goff
2017-03-17 14:37:40 -04:00
committed by GitHub

View File

@ -131,15 +131,6 @@ func (pm *Manager) StateChanged(id string, e libcontainerd.StateInfo) error {
return err
}
pm.mu.RLock()
c := pm.cMap[p]
if c.exitChan != nil {
close(c.exitChan)
}
restart := c.restart
pm.mu.RUnlock()
os.RemoveAll(filepath.Join(pm.config.ExecRoot, id))
if p.PropagatedMount != "" {
@ -152,6 +143,14 @@ func (pm *Manager) StateChanged(id string, e libcontainerd.StateInfo) error {
}
}
pm.mu.RLock()
c := pm.cMap[p]
if c.exitChan != nil {
close(c.exitChan)
}
restart := c.restart
pm.mu.RUnlock()
if restart {
pm.enable(p, c, true)
}