RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 727088 - Directory shouldn't be listed as type 'file' with vol-list command
Summary: Directory shouldn't be listed as type 'file' with vol-list command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-01 10:00 UTC by Nan Zhang
Modified: 2011-12-06 11:20 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.9.4-3.el6
Doc Type: Bug Fix
Doc Text:
Cause: New storage type was added to libvirt, but the API was not tweaked to support it. Consequence: Directory type storage volumes were reported to be file storage volumes. Fix: The new volume type was added to the public API and the API was fixed to report correct values. Result: Volume type is correctly reported and displayed in associated tools.
Clone Of:
Environment:
Last Closed: 2011-12-06 11:20:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Nan Zhang 2011-08-01 10:00:11 UTC
Description of problem:
as subject.

Version-Release number of selected component (if applicable):
libvirt-0.9.4-0rc2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# virsh vol-list default --details
Name         Path                                 Type  Capacity  Allocation
----------------------------------------------------------------------------
netfs-pool   /var/lib/libvirt/images/netfs-pool   file     0.00        0.00
rhel6.img    /var/lib/libvirt/images/rhel6.img    file   8.00 GB     1.62 GB
rhel6.qcow2  /var/lib/libvirt/images/rhel6.qcow2  file   6.00 GB     2.06 GB
test.img     /var/lib/libvirt/images/test.img     file   6.00 GB     1.59 GB
win7.img     /var/lib/libvirt/images/win7.img     file  12.00 GB    12.01 GB

# ls -l /var/lib/libvirt/images/
total 18125348
drwxr-xr-x. 2 nobody nobody        4096 Jul 28 03:16 netfs-pool
-rw-------. 1 root   root    8589934592 Sep 11  2010 rhel6.img
-rw-rw-r--. 1 root   root    2215182336 Jul 28 03:17 rhel6.qcow2
-rw-------. 1 qemu   qemu    6442450944 Aug  1 02:34 test.img
-rw-------. 1 qemu   qemu   12884901888 Aug  1 02:41 win7.img

Actual results:
Directory 'netfs-pool' is listed as one of the volumes, and was specified as 'file' type.

Expected results:
Directory 'netfs-pool' shouldn't be listed as a volume.

Additional info:

Comment 1 Peter Krempa 2011-08-01 12:38:38 UTC
This bug was introduced by adding filesystem passthrough feature.

commit 8077d64f964705c1034555abeea38773532b762f
Author: Cole Robinson <crobinso>
Date:   Thu May 26 14:05:32 2011 -0400

    storage: List directory volumes for dir/fs/netfs pools

    Since directories can be used for <filesystem> passthrough, they are
    basically storage volumes.

    v2:
        Skip ., .., lost+found dirs

    v3:
        Use gnulib last_component

    v4:
        Use gnulib "dirname.h", not system <dirname.h>
        Don't skip lost+found

Comment 2 Dave Allan 2011-08-01 13:32:28 UTC
(In reply to comment #1)
> This bug was introduced by adding filesystem passthrough feature.
> 
> commit 8077d64f964705c1034555abeea38773532b762f
> Author: Cole Robinson <crobinso>
> Date:   Thu May 26 14:05:32 2011 -0400
> 
>     storage: List directory volumes for dir/fs/netfs pools
> 
>     Since directories can be used for <filesystem> passthrough, they are
>     basically storage volumes.

Ok, then this is a feature.  Closing as NOTABUG.

Comment 3 Dave Allan 2011-08-10 15:33:56 UTC
Hmm, I think I closed this too hastily.  The directory is listed as type 'file', which isn't correct.  I'm reopening so that can be changed.

Comment 4 Eric Blake 2011-08-11 19:40:24 UTC
Fixed with two upstream commits:

commit 594f564c75601f5210af166683041873cb195555
Author: Peter Krempa <pkrempa>
Date:   Thu Aug 11 11:37:18 2011 +0200

    virsh: Add dir type for listing volumes with vol-list
    
    Fix of output of detailed volume list. BZ #727088

commit 6c55124f37afdcd29551a38c681ecef85f8d5af8
Author: Peter Krempa <pkrempa>
Date:   Thu Aug 11 11:37:17 2011 +0200

    storage: Directory shouldn't be listed as type 'file'
    
    Fix internals of libvirt for new storage volume type.
    Libvirt reported an invalid type of the volume.
    
    BZ #727088

Comment 7 Nan Zhang 2011-08-16 06:06:10 UTC
Verified with libvirt-0.9.4-4.el6.x86_64, it's fixed already.

# virsh vol-list default --details
Name         Path                                 Type  Capacity  Allocation
----------------------------------------------------------------------------
foo-new.img  /var/lib/libvirt/images/foo-new.img  file   4.00 GB   136.00 KB
foo.img      /var/lib/libvirt/images/foo.img      file   5.86 GB     2.07 GB
netfs        /var/lib/libvirt/images/netfs        dir      0.00        0.00 
rhel6.img    /var/lib/libvirt/images/rhel6.img    file   5.86 GB     1.75 GB
test.img     /var/lib/libvirt/images/test.img     file   6.00 GB     1.42 GB
win7.img     /var/lib/libvirt/images/win7.img     file  12.00 GB    12.00 GB

Comment 8 Peter Krempa 2011-11-11 09:36:12 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:
Cause:
New storage type was added to libvirt, but the API was not tweaked to support it.

Consequence:
Directory type storage volumes were reported to be file storage volumes.

Fix:
The new volume type was added to the public API and the API was fixed to report correct values.

Result:
Volume type is correctly reported and displayed in associated tools.

Comment 9 errata-xmlrpc 2011-12-06 11:20:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


Note You need to log in before you can comment on or make changes to this bug.