Bug 821508

Summary: RFE: storage: refresh dir pool on listVol call if dir timestamps have changed
Product: [Community] Virtualization Tools Reporter: Kashyap Chamarthy <kchamart>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DEFERRED QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, clalancette, crobinso, dougsland, eblake, itamar, jforbes, justin.brown1.1, lagarcia, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-03 16:34:09 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 Kashyap Chamarthy 2012-05-14 17:55:21 UTC
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
libvirt-0.9.11-1.fc16.x86_64
root@~$ 




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
/var/lib/libvirt/images
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
root@images$
================================================================

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 14:22:32 UTC
Good idea. Moving to the upstream tracker

Comment 2 Cole Robinson 2013-04-01 10:13:28 UTC
*** Bug 904251 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Berrangé 2020-11-03 16:34:09 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.