Re: [PATCH] schema: pool: netfs: Don't enforce slash in glusterfs pool source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_\.\+\-\\&amp;&quot;&apos;&lt;&gt;/%]*</param>
> 
> This allows the empty string...
> 
>> +    </data>
>> +  </define>
>> +
>>    <define name="absFilePath">
>>      <data type="string">
>>        <param name="pattern">/[a-zA-Z0-9_\.\+\-\\&amp;&quot;&apos;&lt;&gt;/%,]+</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


Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]