mirror of
https://github.com/docker/docs.git
synced 2026-04-05 18:58:55 +07:00
Merge pull request #17628 from LK4D4/umount_log_err
Log error from unmountVolumes on cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user