diff --git a/daemon/container.go b/daemon/container.go index dc1e2f2f85..35daacd68a 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -347,7 +347,9 @@ func (container *Container) cleanup() { container.daemon.unregisterExecCommand(eConfig) } - container.unmountVolumes(false) + if err := container.unmountVolumes(false); err != nil { + logrus.Warnf("%s cleanup: Failed to umount volumes: %v", container.ID, err) + } } // killSig sends the container the given signal. This wrapper for the diff --git a/pkg/system/syscall_unix.go b/pkg/system/syscall_unix.go index 50054765af..f1497c587e 100644 --- a/pkg/system/syscall_unix.go +++ b/pkg/system/syscall_unix.go @@ -6,6 +6,6 @@ import "syscall" // Unmount is a platform-specific helper function to call // the unmount syscall. -func Unmount(dest string) { - syscall.Unmount(dest, 0) +func Unmount(dest string) error { + return syscall.Unmount(dest, 0) } diff --git a/pkg/system/syscall_windows.go b/pkg/system/syscall_windows.go index 3a3a55b266..b3b94cb5eb 100644 --- a/pkg/system/syscall_windows.go +++ b/pkg/system/syscall_windows.go @@ -2,5 +2,6 @@ package system // Unmount is a platform-specific helper function to call // the unmount syscall. Not supported on Windows -func Unmount(dest string) { +func Unmount(dest string) error { + return nil }