Bug 668115

Summary: virt-filesystems command fails on guest with corrupt filesystem label
Product: Red Hat Enterprise Linux 6 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: dallan, leiwang, mbooth, mshao, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.7.17-8.el6 Doc Type: Bug Fix
Doc Text:
The virt-filesystems command failed when used on a guest which had a missing or corrupt file system label. This command has been updated to handle guest file systems with missing or corrupt file system labels. Note that this bug was reported and corrected during development. It was not seen in production systems in the field.
Story Points: ---
Clone Of: 668112 Environment:
Last Closed: 2011-05-19 11:45:57 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: 668112    
Bug Blocks:    

Description Richard W.M. Jones 2011-01-07 22:44:23 UTC
+++ This bug was initially created as a clone of Bug #668112 +++

Description of problem:

virt-filesystems -d Ubuntu1010x64 --long --all -h
libguestfs: error: vfs_label: /dev/vda2: 

Version-Release number of selected component (if applicable):

libguestfs-1.8.0-1.fc14.x86_64

--- Additional comment from rjones on 2011-01-07 17:39:16 EST ---

Created attachment 472310 [details]
virt-filesystems -v -x output

Full output from the command:

virt-filesystems -d Ubuntu1010x64 --long --all -h -v -x

--- Additional comment from rjones on 2011-01-07 17:43:41 EST ---

/dev/vda2 is an extended partition (containing a logical
partition which is the swap).  Therefore it doesn't make
sense to run guestfs_vfs_label on it.  We should just ignore
the result of vfs_label if it's an error.

Comment 1 Richard W.M. Jones 2011-01-08 10:14:45 UTC
Reproducer:

$ guestfish -N part exit
$ virt-filesystems -a test1.img --all --long -h
libguestfs: error: vfs_label: /dev/vda1: 

When the bug is fixed it produces the following output instead:

$ guestfish -N part exit
$ virt-filesystems -a test1.img --all --long -h
Name       Type        VFS      Label  Size  Parent
/dev/sda1  filesystem  unknown  -      100M  -
/dev/sda1  partition   -        -      100M  /dev/sda
/dev/sda   device      -        -      100M  -

Comment 4 Lei Wang 2011-02-01 03:00:51 UTC
Following the steps in Comment 1:

Reproduce the issue with libguestfs-1.7.17-4.el6:

# guestfish -N part exit
# virt-filesystems -a test1.img --all --long -h
libguestfs: error: vfs_label: /dev/vda1:

Verfied the issue with libguestfs-1.7.17-10.el6:

# virt-filesystems -a test1.img --all --long -h
Name       Type        VFS      Label  Size  Parent
/dev/sda1  filesystem  unknown  -      100M  -
/dev/sda1  partition   -        -      100M  /dev/sda
/dev/sda   device      -        -      100M  -

According to the result above, move to VERIFIED.

Comment 9 Laura Bailey 2011-04-20 05:04: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 virt-filesystems command failed when used against a guest without a label. This command has been updated to handle guest file systems without labels.

Note that this bug was reported and corrected during development. It was not seen in production systems in the field.

Comment 10 Richard W.M. Jones 2011-04-20 07:49:53 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,3 +1,3 @@
-The virt-filesystems command failed when used against a guest without a label. This command has been updated to handle guest file systems without labels.
+The virt-filesystems command failed when used on a guest which had a missing or corrupt file system label. This command has been updated to handle guest file systems with missing or corrupt file system labels.
 
 Note that this bug was reported and corrected during development. It was not seen in production systems in the field.

Comment 11 Richard W.M. Jones 2011-04-20 07:50:11 UTC
I updated the technical notes field.

Comment 13 errata-xmlrpc 2011-05-19 11:45:57 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 14 errata-xmlrpc 2011-05-19 13:10:49 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