DescriptionKashyap 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.
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.