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.

Bug 1233531

Summary: [RFE]The size info of Pool cannot refresh automatically
Product: Red Hat Enterprise Linux 7 Reporter: Xiaodai Wang <xiaodwan>
Component: virt-managerAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: crobinso, juzhou, mzhan, phrdina, sherold, tzheng
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.3.2-1.el7 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 01:57:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xiaodai Wang 2015-06-19 06:23:15 UTC
Description of problem:
The size info of Pool cannot refresh automatically.

Version-Release number of selected component (if applicable):
virt-manager-1.2.0-4.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Make sure an volume existed and the allocation unit is big enough to observe the size info.
# virsh vol-dumpxml --pool default xiaodwan.img 
<volume type='file'>
  <name>xiaodwan.img</name>
  <key>/var/lib/libvirt/images/xiaodwan.img</key>
  <source>
  </source>
  <capacity unit='bytes'>8589934592</capacity>
  <allocation unit='bytes'>8589934592</allocation>
  <target>
    <path>/var/lib/libvirt/images/xiaodwan.img</path>
    <format type='raw'/>
    <permissions>
      <mode>0600</mode>
      <owner>107</owner>
      <group>107</group>
      <label>system_u:object_r:svirt_image_t:s0:c298,c891</label>
    </permissions>
    <timestamps>
      <atime>1434608835.157843853</atime>
      <mtime>1434608755.299489950</mtime>
      <ctime>1434608755.299489950</ctime>
    </timestamps>
  </target>
</volume>
2. Launch virt-manager, Click Edit->Connection Details->Storage, Click the default pool which the volume file is in.
3. Note down the Size info of the default pool.
4. Click the volume file and delete it from the pool.


Actual results:
The size info does't change.

Expected results:
The size info should be changed to correct value.

Additional info:
The size info will be changed to correct value after restart the pool or relaunch virt-manager.

Comment 3 Cole Robinson 2015-11-10 22:48:07 UTC
I just fixed this via a fedora report. Commit is:

commit 0bf6124a280dbff9c31ac8e88ecea7e42fd0dc14
Author: Cole Robinson <crobinso>
Date:   Tue Nov 10 17:40:04 2015 -0500

    storage: Fix updating UI when volume deleted (bz 1279940)

Comment 4 Mike McCune 2016-03-28 23:17:33 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 6 XiaoyunHu 2016-05-20 02:26:05 UTC
I can reproduce this bug with package:
virt-manager-1.2.1-8.el7.noarch

Steps are the same as description above.

Then try to verify with new build:
virt-manager-1.3.2-1.el7.noarch

Step:
1. Make sure an volume existed and the allocation unit is big enough to observe the size info.

#virsh vol-dumpxml --pool default rhel7.1.qcow2 |grep allocation
<allocation unit='bytes'>5215363072</allocation>
2. Launch virt-manager, Click Edit->Connection Details->Storage, Click the default pool which the volume file is in.
3. The size info of the default pool is 1.10GiB.
4. Click the volume file and delete it from the pool.

Result:
After step 4, the size info of the default pool changed from 1.01GiB to 5.96GiB(1.10GiB+5215363072B/1024^3=1.10GiB+4.86GiB=5.96GiB).

Then try to verify the case when adding an image.
1. Launch virt-manager, Click Edit->Connection Details->Storage, Click the default pool which the volume file is in.
2. Notice the size info of the default pool is 5GiB.
3. Click + to add a storage volume, fill in the name and select raw as format, fill the max capacity is 10GiB and Allocation is 3GiB, then click finish.

Result:
After step 3, the size info of the default pool changed from 5GiB to 2GiB.

However, there is still a problem. If there are two pools sharing the same capacity of host, to click another pool after one pool's size changed, its size still be the old value. But it can be changed after clicking refresh button.
Is it a bug?I think the size should be refreshed after selecting the pool.

Comment 7 Pavel Hrdina 2016-06-01 11:54:33 UTC
Hi, refreshing pool after it's selected isn't a good idea.  We tend to remove as much polling as possible and use events instead.  I'm afraid that currently this isn't doable and it would require some extra coding and extra effort.  I guess that you can create a new bug for upstream to track this feature.

Comment 8 XiaoyunHu 2016-06-07 06:55:01 UTC
I have file a new bug for upstream to track the feature.
https://bugzilla.redhat.com/show_bug.cgi?id=1343317

And according to the result above in the latest version of virt-manager, move this bug from ON_QA to VERIFIED.

Comment 10 errata-xmlrpc 2016-11-04 01:57:43 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-2016-2269.html