Red Hat Bugzilla – Bug 1101999
virt-xml-validate should pass when netfs pool xml with glusterfs backend
Last modified: 2015-03-05 02:36:39 EST
Description of problem: virt-xml-validate should pass when netfs pool xml with glusterfs backend Version-Release number of selected component (if applicable): libvirt-client-1.1.1-29.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare an netfs type pool xml file # cat netfs-gluster.xml <pool type='netfs'> <name>netfs-gluster</name> <source> <host name='10.66.4.145'/> <dir path='gluster-vol1'/> <format type='glusterfs'/> </source> <target> <path>/var/lib/libvirt/images/netfs-gluster</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 2. # virt-xml-validate netfs-gluster.xml netfs-gluster.xml:5: element dir: Relax-NG validity error : Element dir failed to validate attributes netfs-gluster.xml:3: element source: Relax-NG validity error : Invalid sequence in interleave netfs-gluster.xml:3: element source: Relax-NG validity error : Element source failed to validate content netfs-gluster.xml:1: element pool: Relax-NG validity error : Invalid sequence in interleave netfs-gluster.xml:1: element pool: Relax-NG validity error : Element pool failed to validate content netfs-gluster.xml fails to validate 3. create netfs pool with netfs-gluster.xml # virsh pool-create netfs-gluster.xml Pool netfs-gluster created from netfs-gluster.xml 4. check the pool # virsh pool-list netfs Name State Autostart ----------------------------------------- netfs-gluster active no # virsh pool-dumpxml netfs-gluster <pool type='netfs'> <name>netfs-gluster</name> <uuid>f9df0383-821a-4c43-ad2f-97fa15d82d31</uuid> <capacity unit='bytes'>42928701440</capacity> <allocation unit='bytes'>6699630592</allocation> <available unit='bytes'>36229070848</available> <source> <host name='10.66.4.145'/> <dir path='gluster-vol1'/> <format type='glusterfs'/> </source> <target> <path>/var/lib/libvirt/images/netfs-gluster</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> Actual results: Expected results: virt-xml-validate should pass in step 2, since "dir path" here should be volume name on glusterfs server Additional info:
Resolved in: v1.2.6-206-gb325be1 commit b325be128acf901d6966df097ceea2b8349f3ee5 Author: Peter Krempa <pkrempa@redhat.com> Date: Wed May 28 15:47:38 2014 +0200 schema: pool: netfs: Don't enforce slash in glusterfs pool source Gluster volumes don't start with a leading slash. Our schema for netfs gluster pools enforces it though. Luckily mount.glusterfs skips it. Allow a slashless volume name for glusterfs netfs mounts in the schema.
I can produce this bug on build libvirt-1.1.1-29.el7.x86_64 verify it on build libvirt-1.2.8-9.el7.x86_64 qemu-kvm-rhev-2.1.2-12.el7.x86_64 verify steps: 1. prepare an netfs type pool xml file # cat /tmp/netfs-gluster.xml <pool type='netfs'> <name>netfs-gluster</name> <source> <host name='10.66.106.2'/> <dir path='gluster-vol1'/> <format type='glusterfs'/> </source> <target> <path>/var/lib/libvirt/images/netfs-gluster</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 2. virt-xml-validate success # virt-xml-validate /tmp/netfs-gluster.xml /tmp/netfs-gluster.xml validates 3. define pool with xml, and build , start success # virsh pool-undefine netfs-gluster Pool netfs-gluster has been undefined [root@server libvirt]# virsh pool-list --all Name State Autostart ------------------------------------------- default active yes HostVG inactive no mnt active yes pool1 active no root active yes test-iscsi inactive no wzhang active yes # virsh pool-define /tmp/netfs-gluster.xml Pool netfs-gluster defined from /tmp/netfs-gluster.xml # virsh pool-list --all Name State Autostart ------------------------------------------- default active yes netfs-gluster inactive no # virsh pool-build netfs-gluster Pool netfs-gluster built # virsh pool-start netfs-gluster Pool netfs-gluster started [root@server libvirt]# virsh pool-list --all Name State Autostart ------------------------------------------- default active yes netfs-gluster active no move to verified
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/RHSA-2015-0323.html