From 09dc9a2a9e544543504c9966aa958ffe4f20a817 Mon Sep 17 00:00:00 2001 From: Anusha Ragunathan Date: Thu, 11 Aug 2016 15:27:06 -0700 Subject: [PATCH] Debugging issue #25511 Volumes and other content created under a bind mount should be recursively propagated using rshared, not shared. This could be the reason for EBUSY during removal. Override options with rbind, rshared and see if CI errors are fixed. May fix #25511 Signed-off-by: Anusha Ragunathan (cherry picked from commit e58028d078077dc566639ff52ece09ad6c481e44) Signed-off-by: Tibor Vass --- plugin/manager_linux.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/manager_linux.go b/plugin/manager_linux.go index 8542ecec67..d18874d603 100644 --- a/plugin/manager_linux.go +++ b/plugin/manager_linux.go @@ -90,7 +90,13 @@ func (pm *Manager) initSpec(p *plugin) (*specs.Spec, error) { if mount.Source != nil { m.Source = *mount.Source } + if m.Source != "" && m.Type == "bind" { + /* Debugging issue #25511: Volumes and other content created under the + bind mount should be recursively propagated. rshared, not shared. + This could be the reason for EBUSY during removal. Override options + with rbind, rshared and see if CI errors are fixed. */ + m.Options = []string{"rbind", "rshared"} fi, err := os.Lstat(filepath.Join(rootfs, string(os.PathSeparator), m.Destination)) // TODO: followsymlinks if err != nil { return nil, err