RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1101999 - virt-xml-validate should pass when netfs pool xml with glusterfs backend
Summary: virt-xml-validate should pass when netfs pool xml with glusterfs backend
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-28 10:24 UTC by Shanzhi Yu
Modified: 2015-03-05 07:36 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:36:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Shanzhi Yu 2014-05-28 10:24:09 UTC
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:

Comment 1 Peter Krempa 2014-07-21 16:35:54 UTC
Resolved in: v1.2.6-206-gb325be1

commit b325be128acf901d6966df097ceea2b8349f3ee5
Author: Peter Krempa <pkrempa>
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.

Comment 3 vivian zhang 2014-11-27 10:01:25 UTC
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

Comment 5 errata-xmlrpc 2015-03-05 07:36:39 UTC
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


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