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 1175314 - Update libvirt perl bindings to pick up the new flag for fetching backing chain statistics
Summary: Update libvirt perl bindings to pick up the new flag for fetching backing cha...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl-Sys-Virt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1041569
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-17 13:38 UTC by Jiri Denemark
Modified: 2016-04-26 14:31 UTC (History)
29 users (show)

Fixed In Version: perl-Sys-Virt-1.2.8-6.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1041569
Environment:
Last Closed: 2015-03-05 10:54:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0470 0 normal SHIPPED_LIVE perl-Sys-Virt bug fix and enhancement update 2015-03-05 15:18:19 UTC

Description Jiri Denemark 2014-12-17 13:38:27 UTC
+++ This bug was initially created as a clone of Bug #1041569 +++

commit 4bffafb2eb076255dbd7e0d96f2b33a4fea0650e
Author: Eric Blake <eblake>
Date:   Tue Nov 25 08:46:49 2014 -0700

    getstats: add new flag for block backing chain
    
    This patch introduces access to allocation information about
    a backing chain of a live domain.  While querying storage
    volumes for read-only disks could provide some of the details,
    we do NOT want to read() a file while qemu is writing it.
    Also, there is one case where we have to rely on qemu: when
    doing a block commit into a backing file, where that file is
    stored in qcow2 format on a host block device, we want to know
    the current highest write offset into that image, in order to
    know if the disk must be resized larger.  qemu-img does not
    (currently) show this information, and none of the earlier
    block APIs were extensible enough to expose it.  But
    virDomainListGetStats is perfect for the job!
    
    We don't need a new group of statistics, as the existing block
    group is sufficient.  On the other hand, as existing libvirt
    releases already report 1:1 mapping of block.count to <disk>
    devices, changing the array size could confuse older clients;
    and even with newer clients, the time and memory taken to
    report additional statistics is not always necessary (backing
    files are generally read-only except for block-commit, so while
    read statistics may change, sizing statistics will not).  So
    the choice here is to add a new flag that only newer callers
    will pass, when they are prepared for the additional information.
    
    This patch introduces the new API, but it will take more
    patches to get it implemented for qemu.
    
    * include/libvirt/libvirt-domain.h
    (VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING): New flag.
    * src/libvirt-domain.c (virConnectGetAllDomainStats): Document it,
    and add a new field when it is in use.
    * tools/virsh-domain-monitor.c (cmdDomstats): Use new flag.
    * tools/virsh.pod (domstats): Document it.
    
    Signed-off-by: Eric Blake <eblake>

added VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING flag for virConnectGetAllDomainStats. We need to rebuild libvirt-python to pick up this new flag.

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

libvirt-1.2.8-11.el7
libvirt-python-1.2.8-6.el7

Steps to Reproduce:
1. perl -e 'require Sys::Virt; printf("%d\n",
Sys::Virt::Domain->GET_ALL_DOMAINS_STATS_BACKING);

Expected results:
1073741824

Comment 1 Daniel Berrangé 2014-12-17 14:11:06 UTC
Upstream in

commit 26d6790bab3ed1819f2cfe9003d0d47a686ba675
Author: Daniel P. Berrange <berrange>
Date:   Wed Dec 17 14:00:38 2014 +0000

    Add VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING constant

Comment 3 zhe peng 2014-12-23 10:05:18 UTC
verify with build:
perl-Sys-Virt-1.2.8-6.el7

# perl -e 'require Sys::Virt; printf("%d\n",Sys::Virt::Domain->GET_ALL_STATS_BACKING)'
1073741824

check doc:
# man  /usr/share/man/man3/Sys::Virt::Domain.3pm.gz
....
Sys::Virt::Domain::GET_ALL_STATS_BACKING
           Get stats for image backing files too
....

move to verified.

Comment 5 errata-xmlrpc 2015-03-05 10:54: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.

https://rhn.redhat.com/errata/RHBA-2015-0470.html


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