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 1110198 - domblkinfo doesn't work when guest use glusterfs as source
Summary: domblkinfo doesn't work when guest use glusterfs as source
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-17 08:31 UTC by Shanzhi Yu
Modified: 2015-03-05 07:37 UTC (History)
4 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:37:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Shanzhi Yu 2014-06-17 08:31:19 UTC
Description of problem:

domblkinfo doesn't work when guest use glusterfs as source 

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

libvirt-1.1.1-29.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

1. prepare guest with glusterfs as source

# virsh dumpxml rhel7|grep disk -A 5 
    <disk type='network' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source protocol='gluster' name='gluster-vol1/rhel7-qcow2.img'>
        <host name='10.66.4.xxx' port='24007'/>
      </source>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
# qemu-img info gluster://10.66.4.xxx/gluster-vol1/rhel7-qcow2.img

image: gluster://10.66.4.xxx:24007/gluster-vol1/rhel7-qcow2.img
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 1.1G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false

2.check guest block device size info

# virsh domblkinfo rhel7 vda 
error: cannot stat file 'gluster-vol1/rhel7-qcow2.img': Bad file descriptor


Actual results:


Expected results:

#virsh domblkinfo rhel7 vdb

Capacity:       5368709120
Allocation:     1568709120
Physical:       1568709120


Additional info:

Comment 1 Peter Krempa 2014-07-08 09:41:38 UTC
Fixed upstream:

commit 3ea661deeabadc3c114dfb6f662b9fd17d714a01
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 7 12:56:23 2014 +0200

    qemu: refactor qemuDomainGetBlockInfo to work with remote storage
    
    The qemu block info function relied on working with local storage. Break
    this assumption by adding support for remote volumes. Unfortunately we
    still need to take a hybrid approach as some of the operations require a
    filedescriptor.
    
    Previously you'd get:
     $ virsh domblkinfo gl vda
     error: cannot stat file '/img10': Bad file descriptor
    
    Now you get some stats:
     $ virsh domblkinfo gl vda
     Capacity:       10485760
     Allocation:     197120
     Physical:       197120

$ git desc
v1.2.6-63-g3ea661d

Comment 3 Shanzhi Yu 2014-11-20 07:29:25 UTC
Verify this bug with libvirt-1.2.8-7.el7.x86_64

Steps:

1. define a guest based glusterfs storage

# virsh dumpxml rhel7|grep disk -A 5
    <disk type='network' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source protocol='gluster' name='gluster-vol1/s1.img'>
        <host name='10.66.6.111'/>
      </source>
      <target dev='vda' bus='virtio'/>
..

2. check block device size info 

# virsh domblkinfo rhel7 vda 
Capacity:       107374182400
Allocation:     198656
Physical:       198656

Comment 5 errata-xmlrpc 2015-03-05 07:37:42 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.

https://rhn.redhat.com/errata/RHSA-2015-0323.html


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