Browse code

Log error from unmountVolumes on cleanup

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2015/11/03 06:18:07
Showing 3 changed files
... ...
@@ -349,7 +349,9 @@ func (container *Container) cleanup() {
349 349
 		container.daemon.unregisterExecCommand(eConfig)
350 350
 	}
351 351
 
352
-	container.unmountVolumes(false)
352
+	if err := container.unmountVolumes(false); err != nil {
353
+		logrus.Warnf("%s cleanup: Failed to umount volumes: %v", container.ID, err)
354
+	}
353 355
 }
354 356
 
355 357
 // killSig sends the container the given signal. This wrapper for the
... ...
@@ -6,6 +6,6 @@ import "syscall"
6 6
 
7 7
 // Unmount is a platform-specific helper function to call
8 8
 // the unmount syscall.
9
-func Unmount(dest string) {
10
-	syscall.Unmount(dest, 0)
9
+func Unmount(dest string) error {
10
+	return syscall.Unmount(dest, 0)
11 11
 }
... ...
@@ -2,5 +2,6 @@ package system
2 2
 
3 3
 // Unmount is a platform-specific helper function to call
4 4
 // the unmount syscall. Not supported on Windows
5
-func Unmount(dest string) {
5
+func Unmount(dest string) error {
6
+	return nil
6 7
 }