Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ 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
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
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.
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