mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1101999
This commit is contained in:
parent
bbfc826787
commit
b325be128a
@ -231,6 +231,12 @@
|
|||||||
</data>
|
</data>
|
||||||
</define>
|
</define>
|
||||||
|
|
||||||
|
<define name="dirPath">
|
||||||
|
<data type="string">
|
||||||
|
<param name="pattern">[a-zA-Z0-9_\.\+\-\\&"'<>/%]+</param>
|
||||||
|
</data>
|
||||||
|
</define>
|
||||||
|
|
||||||
<define name="absFilePath">
|
<define name="absFilePath">
|
||||||
<data type="string">
|
<data type="string">
|
||||||
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,]+</param>
|
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,]+</param>
|
||||||
|
@ -327,6 +327,15 @@
|
|||||||
</element>
|
</element>
|
||||||
</define>
|
</define>
|
||||||
|
|
||||||
|
<define name='sourceinfonetfsgluster'>
|
||||||
|
<element name='dir'>
|
||||||
|
<attribute name='path'>
|
||||||
|
<ref name='dirPath'/>
|
||||||
|
</attribute>
|
||||||
|
<empty/>
|
||||||
|
</element>
|
||||||
|
</define>
|
||||||
|
|
||||||
<define name='sourceinfoname'>
|
<define name='sourceinfoname'>
|
||||||
<element name='name'>
|
<element name='name'>
|
||||||
<text/>
|
<text/>
|
||||||
@ -394,7 +403,6 @@
|
|||||||
<value>auto</value>
|
<value>auto</value>
|
||||||
<value>nfs</value>
|
<value>nfs</value>
|
||||||
<value>cifs</value>
|
<value>cifs</value>
|
||||||
<value>glusterfs</value>
|
|
||||||
</choice>
|
</choice>
|
||||||
</attribute>
|
</attribute>
|
||||||
</element>
|
</element>
|
||||||
@ -468,14 +476,32 @@
|
|||||||
|
|
||||||
<define name='sourcenetfs'>
|
<define name='sourcenetfs'>
|
||||||
<element name='source'>
|
<element name='source'>
|
||||||
<interleave>
|
<choice>
|
||||||
<ref name='sourceinfohost'/>
|
<group>
|
||||||
<ref name='sourceinfodir'/>
|
<interleave>
|
||||||
<ref name='sourcefmtnetfs'/>
|
<ref name='sourceinfohost'/>
|
||||||
<optional>
|
<ref name='sourceinfodir'/>
|
||||||
<ref name='sourceinfovendor'/>
|
<ref name='sourcefmtnetfs'/>
|
||||||
</optional>
|
<optional>
|
||||||
</interleave>
|
<ref name='sourceinfovendor'/>
|
||||||
|
</optional>
|
||||||
|
</interleave>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<interleave>
|
||||||
|
<ref name='sourceinfohost'/>
|
||||||
|
<ref name='sourceinfonetfsgluster'/>
|
||||||
|
<element name='format'>
|
||||||
|
<attribute name='type'>
|
||||||
|
<value>glusterfs</value>
|
||||||
|
</attribute>
|
||||||
|
</element>
|
||||||
|
<optional>
|
||||||
|
<ref name='sourceinfovendor'/>
|
||||||
|
</optional>
|
||||||
|
</interleave>
|
||||||
|
</group>
|
||||||
|
</choice>
|
||||||
</element>
|
</element>
|
||||||
</define>
|
</define>
|
||||||
|
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
<pool type='netfs'>
|
||||||
|
<source>
|
||||||
|
<host name='example.com'/>
|
||||||
|
<format type='glusterfs'/>
|
||||||
|
<dir path='volume'/>
|
||||||
|
</source>
|
||||||
|
<name>netfs-gluster</name>
|
||||||
|
<uuid>d5609ced-94b1-489e-b218-eff35c30336a</uuid>
|
||||||
|
<target>
|
||||||
|
<path>/mnt/gluster</path>
|
||||||
|
</target>
|
||||||
|
</pool>
|
Loading…
Reference in New Issue
Block a user