mirror of https://github.com/containers/podman.git
libpod: report unmount idmapped rootfs errors
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
2932208c2a
commit
5592dc12f9
|
@ -1866,8 +1866,12 @@ func (c *Container) cleanupStorage() error {
|
|||
}
|
||||
}
|
||||
if c.config.RootfsMapping != nil {
|
||||
if err := unix.Unmount(c.config.Rootfs, 0); err != nil {
|
||||
logrus.Errorf("Unmounting idmapped rootfs for container %s after mount error: %v", c.ID(), err)
|
||||
if err := unix.Unmount(c.config.Rootfs, 0); err != nil && err != unix.EINVAL {
|
||||
if cleanupErr != nil {
|
||||
logrus.Errorf("Unmounting idmapped rootfs for container %s after mount error: %v", c.ID(), err)
|
||||
} else {
|
||||
cleanupErr = fmt.Errorf("unmounting idmapped rootfs for container %s after mount error: %w", c.ID(), err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue