Bug 821508 - RFE: storage: refresh dir pool on listVol call if dir timestamps have changed
RFE: storage: refresh dir pool on listVol call if dir timestamps have changed
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
: 904251 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-05-14 13:55 EDT by Kashyap Chamarthy
Modified: 2016-04-18 21:22 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Kashyap Chamarthy 2012-05-14 13:55:21 EDT
Description of problem:

Cache the timestapms of a directory pool (default is: /var/lib/libvirt/images) periodically, so that, running 'virsh vol-list' would produce updated information automatically w/o the need to run 'virsh pool-refresh default'

Version-Release number of selected component (if applicable):
root@~$ rpm -q libvirt

Steps to Reproduce:
1. Create a  few of VMs
2. Remove one of the VMs
3. Run 'vol-list'
Actual results:
When you do 'vol-list', still the removed VM will be enumerated.

virsh # vol-list default
Name                 Path
f16qemu.qcow2        /var/lib/libvirt/images/f16qemu.qcow2
f16t1.img            /var/lib/libvirt/images/f16t1.img
f16test1.dsk         /var/lib/libvirt/images/f16test1.dsk
f17test.img          /var/lib/libvirt/images/f17test.img
rawhide.img            /var/lib/libvirt/images/rawhide.img
rhel6ipa.qcow2       /var/lib/libvirt/images/rhel6ipa.qcow2

root@images$ pwd
root@images$ ls -l
total 38182184
-rw-------. 1 root root 10737418240 May  3 14:13 f16t1.img
-rw-r--r--. 1 qemu qemu 10739318784 May 14 00:02 f17test.qcow2
-rw-------. 1 root root 10737418240 May 13 14:47 rawhide.img
-rw-r--r--. 1 root root 24776343552 May 13 14:42 rhel6ipa.qcow2
-rw-------. 1 qemu qemu     2097152 May 14 01:01 snap-f17test.qcow2

Note that, I do not have f16qemu.qcow2 and f16test1.dsk any more, but still they're enumerated.

Expected results:
Deleted guest disk file/location should not be enumerated when 'vol-list' is issued.

Additional info:

From Eric Blake -- "Because libvirt caches pool information, and doesn't auto-retry.  Try 'pool-refresh default' before your next vol-list."

The above does fix though.
Comment 1 Cole Robinson 2012-06-07 10:22:32 EDT
Good idea. Moving to the upstream tracker
Comment 2 Cole Robinson 2013-04-01 06:13:28 EDT
*** Bug 904251 has been marked as a duplicate of this bug. ***

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