Description of problem: Command 'virsh find-storage-pool-sources' failed to find any dir/nfs/netfs pool sources, and have unknown failure error Version-Release number of selected component (if applicable): - libvirt-0.6.3-13.el5 - RHEL5.4-Xen / KVM - kvm-83-83.el5 - kernel-xen-2.6.18-156.el5 How reproducible: 100% Steps to Reproduce: 1. Issue command # virsh find-storage-pool-sources dir 2. Issue command # virsh find-storage-pool-sources nfs 3. Issue command # virsh find-storage-pool-sources netfs Actual results: 1. error: Failed to find any dir pool sources error: Unknown failure 2. error: Failed to find any nfs pool sources error: Unknown failure 3. error: Failed to find any netfs pool sources error: XML description for bad <source> spec is not well formed or invalid Expected results: Discover potential storage pool sources, and return source xml document
Cole, can we pull in the upstream error reporting fixes you committed recently?
Commit is here: http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=e3f5dbcdf01040f44188fa9d32c1a1ead0216444 Should be a simple backport.
Created attachment 377248 [details] Backport of upstream changeset Upstream cset applies fine (after pointing to old storage_driver path) and builds fine).
libvirt-0.6.3-25.el5 has been built in dist-5E-qu-candidate with the fix, Daniel
This bug still exist. Version-Release number of selected component (if applicable): [root@dhcp-66-70-62 ~]# uname -a Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5xen #1 SMP Mon Dec 21 18:46:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-62 ~]# rpm -qa|grep libvirt libvirt-0.6.3-25.el5 libvirt-python-0.6.3-25.el5 libvirt-debuginfo-0.6.3-25.el5 [root@dhcp-66-70-62 ~]# rpm -qa|grep xen xen-libs-3.0.3-102.el5 xen-devel-3.0.3-102.el5 kmod-gnbd-xen-0.1.5-2.el5 kmod-gfs-xen-0.1.34-9.el5 xen-3.0.3-102.el5 xen-libs-3.0.3-102.el5 kernel-xen-2.6.18-183.el5 kmod-cmirror-xen-0.1.22-3.el5 Steps to Reproduce: [root@dhcp-66-70-62 libvirt]# virsh pool-list --all Name State Autostart ----------------------------------------- dirpool active no [root@dhcp-66-70-62 libvirt]# virsh pool-dumpxml dirpool <pool type='dir'> <name>dirpool</name> <uuid>4bddc9df-0403-73b5-9fb9-fa980cd4d741</uuid> <capacity>40618147840</capacity> <allocation>12185968640</allocation> <available>28432179200</available> <source> </source> <target> <path>/var/lib/xen/images</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> [root@dhcp-66-70-62 libvirt]# virsh find-storage-pool-sources dir error: Failed to find any dir pool sources error: this function is not supported by the hypervisor: pool type 'dir' does not support source discovery [root@dhcp-66-70-62 libvirt]# virsh pool-dumpxml dirpool > dirpool.xml [root@dhcp-66-70-62 libvirt]# virsh find-storage-pool-sources dir dirpool.xml error: Failed to find any dir pool sources error: this function is not supported by the hypervisor: pool type 'dir' does not support source discovery [root@dhcp-66-70-62 libvirt]# cat pool-netfs.xml <pool type='netfs'> <name>nfspool</name> <uuid>7641d5a8-af11-f730-a34e-0a7dfcede71f</uuid> <capacity>0</capacity> <allocation>0</allocation> <available>0</available> <source> <host name='10.66.90.115'/> <dir path='/vol/libvirt1/auto'/> <format type='nfs'/> </source> <target> <path>/var/lib/libvirt/images</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> [root@dhcp-66-70-62 libvirt]# virsh pool-create pool-netfs.xml Pool nfsimages created from pool-netfs.xml [root@dhcp-66-70-62 libvirt]# virsh pool-list --all Name State Autostart ----------------------------------------- dirpool active no nfspool active no [root@dhcp-66-70-62 libvirt]# virsh find-storage-pool-sources netfs error: Failed to find any netfs pool sources error: XML description for bad <source> spec is not well formed or invalid
The above failures are all expected. find-storage-pool-sources-* only works for types 'logical' and 'netfs'. The xml passed to find-storage-pool-sources should be a pool <source> block like (for netfs pool): <source><host name='foobar.com'/></source> So it appears this bug is fixed, and comment #6 lists expected behavior.
logical type storage pool can't be created correctly,it block me to further verify.I has reported the following bug. https://bugzilla.redhat.com/show_bug.cgi?id=552452 Steps to Reproduce: 1.netfs type storage pool is successful. [root@dhcp-66-70-62 libvirt]# cat pool-netfs.xml <pool type='netfs'> <name>nfspool</name> <uuid>7641d5a8-af11-f730-a34e-0a7dfcede71f</uuid> <capacity>0</capacity> <allocation>0</allocation> <available>0</available> <source> <host name='10.66.90.115'/> <dir path='/vol/libvirt1/auto'/> <format type='nfs'/> </source> <target> <path>/var/lib/libvirt/images</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> [root@dhcp-66-70-62 storagepoolschemadata]# virt-xml-validate pool-netfs.xml pool-netfs.xml validates [root@dhcp-66-70-62 ~]# virsh pool-create pool-netfs.xml Pool nfspool created from pool-netfs.xml [root@dhcp-66-70-62 ~]# virsh pool-list --all Name State Autostart ----------------------------------------- nfspool active no [root@dhcp-66-70-62 ~]# cat pool.xml <source> <host name='10.66.90.115'/> <dir path='/vol/libvirt1/auto'/> <format type='nfs'/> </source> [root@dhcp-66-70-62 ~]# virsh find-storage-pool-sources netfs pool.xml <sources> <source> <host name='10.66.90.115'/> <dir path='/vol/iscsi21'/> <format type='nfs'/> </source> <source> <host name='10.66.90.115'/> <dir path='/vol/iscsi22'/> <format type='nfs'/> </source> <source> <host name='10.66.90.115'/> <dir path='/vol/libvirt2/manual'/> <format type='nfs'/> </source> <source> <host name='10.66.90.115'/> <dir path='/vol/mshao/vdctest'/> <format type='nfs'/> </source> ...... 2.but logical type storage pool is unknown. [root@dhcp-66-70-62 storagepoolschemadata]# cat pool-logical.xml <pool type='logical'> <name>HostVG</name> <uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid> <capacity>99891544064</capacity> <allocation>99220455424</allocation> <available>671088640</available> <source> <name>HostVG</name> <format type='lvm2'/> </source> <target> <path>/dev/HostVG</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> [root@dhcp-66-70-62 storagepoolschemadata]# virt-xml-validate pool-logical.xml pool-logical.xml validates [root@dhcp-66-70-62 storagepoolschemadata]# virsh pool-list --all Name State Autostart ----------------------------------------- nfspool active no [root@dhcp-66-70-62 storagepoolschemadata]# virsh pool-create pool-logical.xml error: Failed to create pool from pool-logical.xml error: internal error '/usr/sbin/vgchange -ay HostVG' exited with non-zero status 5 and signal 0: Volume group "HostVG" not found or: [root@dhcp-66-70-62 storagepoolschemadata]# virsh pool-define pool-logical.xml Pool HostVG defined from pool-logical.xml [root@dhcp-66-70-62 storagepoolschemadata]# virsh pool-list --all Name State Autostart ----------------------------------------- nfspool active no HostVG inactive no [root@dhcp-66-70-62 storagepoolschemadata]# virsh pool-start HostVG error: Failed to start pool HostVG error: internal error '/usr/sbin/vgchange -ay HostVG' exited with non-zero status 5 and signal 0: Volume group "HostVG" not found because logical type pool can't be started correctly,the error blocked me further testing it,I am not sure the final result. Version-Release number of selected component (if applicable): [root@dhcp-66-70-62 ~]# uname -a Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5 #1 SMP Mon Dec 21 18:37:42 EST 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-62 ~]# lsmod|grep kvm kvm_intel 86664 1 kvm 223648 2 ksm,kvm_intel [root@dhcp-66-70-62 ~]# rpm -qa|grep libvirt libvirt-0.6.3-28.el5 libvirt-debuginfo-0.6.3-28.el5 libvirt-python-0.6.3-28.el5 [root@dhcp-66-70-62 ~]# rpm -qa|grep kvm kvm-tools-83-140.el5 kvm-qemu-img-83-140.el5 etherboot-zroms-kvm-5.4.4-13.el5 kvm-83-140.el5 etherboot-roms-kvm-5.4.4-13.el5 kmod-kvm-83-140.el5
You shouldn't need to create a logical pool to actually test this bug. virsh find-storage-pool-sources-as logical should list all existing LVM volume groups on the system (even if libvirt has none set up). That's the point of the sources commands, it will enumerate existing shares that may exist outside of libvirt. For 'find-storage-pool-sources', you can use: echo "<source/>" > find.xml virsh find-storage-pool-sources logical find.xml
Hi,Cole,you are right,actually I don't need to create a logical pool.this bug has been fixed with libvirt-0.6.3-29.el5 on RHEL-5.5. logical type pool is also successful: [root@dhcp-66-70-173 storagepoolschemadata]# rpm -qa|grep libvirt libvirt-debuginfo-0.6.3-29.el5 libvirt-python-0.6.3-29.el5 libvirt-0.6.3-29.el5 [root@dhcp-66-70-173 storagepoolschemadata]# rpm -qa|grep kvm kvm-tools-83-140.el5 kvm-qemu-img-83-140.el5 kmod-kvm-83-140.el5 etherboot-zroms-kvm-5.4.4-13.el5 kvm-83-140.el5 [root@dhcp-66-70-173 storagepoolschemadata]# uname -a Linux dhcp-66-70-173.nay.redhat.com 2.6.18-183.el5 #1 SMP Mon Dec 21 18:37:42 EST 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-173 storagepoolschemadata]# virsh find-storage-pool-sources-as logical logical.xml <sources> <source> <device path='/dev/sda10'/> <name>HostVG</name> <format type='lvm2'/> </source> </sources>
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0205.html