[libvirt] [PATCH] schema: pool: netfs: Don't enforce slash in glusterfs pool source
Peter Krempa
pkrempa at redhat.com
Mon Jul 21 16:36:21 UTC 2014
On 07/21/14 18:19, Eric Blake wrote:
> On 07/11/2014 04:11 AM, Peter Krempa wrote:
>> 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
>> ---
>> docs/schemas/basictypes.rng | 6 +++
>> docs/schemas/storagepool.rng | 44 +++++++++++++++++-----
>> .../pool-netfs-gluster-without-slash.xml | 12 ++++++
>> 3 files changed, 53 insertions(+), 9 deletions(-)
>> create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-gluster-without-slash.xml
>>
>> diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng
>> index 5fe3a97..9c9419f 100644
>> --- a/docs/schemas/basictypes.rng
>> +++ b/docs/schemas/basictypes.rng
>> @@ -231,6 +231,12 @@
>> </data>
>> </define>
>>
>> + <define name="dirPath">
>> + <data type="string">
>> + <param name="pattern">[a-zA-Z0-9_\.\+\-\\&"'<>/%]*</param>
>
> This allows the empty string...
>
>> + </data>
>> + </define>
>> +
>> <define name="absFilePath">
>> <data type="string">
>> <param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,]+</param>
>
> ...while this required a leading slash and at least one other character.
> I think you want + instead of * in the first pattern.
Yeah, I forgot to tweak the repeating operator when copying the pattern.
>
> ACK with that fixed.
>
Fixed && pushed;
Thanks.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140721/a0fdf840/attachment-0001.sig>
More information about the libvir-list
mailing list