Merge pull request #17628 from LK4D4/umount_log_err

Log error from unmountVolumes on cleanup
This commit is contained in:
David Calavera 2015-11-02 15:38:32 -08:00
commit 79d47c5b96
3 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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)
}

View File

@ -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
}