mirror of https://github.com/docker/docs.git
Use lazy unmount to unmount volumes
Volumes can have more mount points beneath them and unmount will fail. This is the case when a bind mounted directory on host already had a mount point underneath it. So use lazy unmount instead. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
ec72163949
commit
b9e701b203
|
@ -1511,8 +1511,8 @@ func (container *Container) unmountVolumes(forceSyscall bool) error {
|
|||
|
||||
for _, volumeMount := range volumeMounts {
|
||||
if forceSyscall {
|
||||
if err := system.Unmount(volumeMount.Destination); err != nil {
|
||||
logrus.Warnf("%s unmountVolumes: Failed to force umount %v", container.ID, err)
|
||||
if err := detachMounted(volumeMount.Destination); err != nil {
|
||||
logrus.Warnf("%s unmountVolumes: Failed to do lazy umount %v", container.ID, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue