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 <anusha@docker.com>
| ... | ... |
@@ -90,7 +90,13 @@ func (pm *Manager) initSpec(p *plugin) (*specs.Spec, error) {
|
| 90 | 90 |
if mount.Source != nil {
|
| 91 | 91 |
m.Source = *mount.Source |
| 92 | 92 |
} |
| 93 |
+ |
|
| 93 | 94 |
if m.Source != "" && m.Type == "bind" {
|
| 95 |
+ /* Debugging issue #25511: Volumes and other content created under the |
|
| 96 |
+ bind mount should be recursively propagated. rshared, not shared. |
|
| 97 |
+ This could be the reason for EBUSY during removal. Override options |
|
| 98 |
+ with rbind, rshared and see if CI errors are fixed. */ |
|
| 99 |
+ m.Options = []string{"rbind", "rshared"}
|
|
| 94 | 100 |
fi, err := os.Lstat(filepath.Join(rootfs, string(os.PathSeparator), m.Destination)) // TODO: followsymlinks |
| 95 | 101 |
if err != nil {
|
| 96 | 102 |
return nil, err |