Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1110198 - domblkinfo doesn't work when guest use glusterfs as source
domblkinfo doesn't work when guest use glusterfs as source
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-17 04:31 EDT by Shanzhi Yu
Modified: 2015-03-05 02:37 EST (History)
4 users (show)

See Also:
Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 02:37:42 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description Shanzhi Yu 2014-06-17 04:31:19 EDT
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 05:41:38 EDT
Fixed upstream:

commit 3ea661deeabadc3c114dfb6f662b9fd17d714a01
Author: Peter Krempa <pkrempa@redhat.com>
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 02:29:25 EST
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 02:37:42 EST
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.