Bug 657472

Summary: checksum: wrong check sum type causes umount to fail
Product: Red Hat Enterprise Linux 6 Reporter: Jinxin Zheng <jzheng>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 6.1CC: dallan, mshao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libguestfs-1.7.17-4.el6 Doc Type: Bug Fix
Doc Text:
The guestfish checksum command contained a file descriptor that was not closed properly in an error path. If the checksum command resulted in an error, this would later prevent the file system from being unmounted with either umount or umount-all. The file descriptor is now closed properly on the error path, so an error in checksum no longer causes problems unmounting file systems.
Story Points: ---
Clone Of:
: 657499 (view as bug list) Environment:
Last Closed: 2011-05-19 11:44:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 657499    
Bug Blocks:    

Description Jinxin Zheng 2010-11-26 08:26:25 UTC
Description of problem:
Specifying an unknown check sum type in the checksum API causes the umount/umount-all to fail.

Version-Release number of selected component (if applicable):
libguestfs-1.6.2-4.el6.x86_64

How reproducible:
100%

Steps to Reproduce:

$ guestfish -a test.img
...
><fs> checksum blabla /test 
libguestfs: error: checksum: unknown checksum type, expecting crc|md5|sha1|sha224|sha256|sha384|sha512

><fs> exit
libguestfs: error: umount_all: umount: /sysroot: umount: /sysroot: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))


Expected results:
no failure when exit or umount.

Comment 2 Richard W.M. Jones 2011-01-04 14:20:00 UTC
Fix included in the rebase.

Comment 3 Jinxin Zheng 2011-01-06 03:22:04 UTC
Another reproducer:

$ guestfish -N fs:ext2 -m /dev/sda1 -- touch /test : checksum blabla /test

The umount error has gone away upon exit.

Comment 6 Laura Bailey 2011-04-19 06:29:28 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The guestfish checksum command contained a file descriptor that was not closed properly in an error path. If the checksum command resulted in an error, this would later prevent the file system from being unmounted with either umount or umount-all. The file descriptor is now closed properly on the error path, so an error in checksum no longer causes problems unmounting file systems.

Comment 7 Richard W.M. Jones 2011-04-19 07:44:21 UTC
This is fine, thanks.

Comment 8 errata-xmlrpc 2011-05-19 11:44:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html

Comment 9 errata-xmlrpc 2011-05-19 13:10:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html