Bug 1329716 - SAMBA-VSS : Regular expression rules ain't working for shadow copy
Summary: SAMBA-VSS : Regular expression rules ain't working for shadow copy
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: samba
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: ---
Assignee: rjoseph
QA Contact: storage-qa-internal@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1308825
TreeView+ depends on / blocked
 
Reported: 2016-04-22 16:37 UTC by Vivek Das
Modified: 2016-05-05 10:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-05 10:03:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Vivek Das 2016-04-22 16:37:05 UTC
Description of problem:
Shadow copy is not obeying the regular expression formats.
Positive Cases:
When regular expression are provided to accept certain format or certain amount of character and you create a snapshot name satisfying the regular expression it still does not list out in restore to previous version option over a file in windows.

Negative Cases : 
When a regular expression is provided and you provide a snap name beyond that rule. It is still getting listed on restore options over a file.

Version-Release number of selected component (if applicable):
samba-client-4.4.2-1.el7rhgs.x86_64
glusterfs-client-xlators-3.7.9-2.el7rhgs.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Create files in windows mount with data in it.
2.In smb.conf file provide shadow:snapprefix=[a-fA-F\d]{32}
3.Restart smb services
4.Create a snapshot with name "e0d123e5f316bef78bfdf5a008837577"
5.Activate the snapshot
5.Right click on the file on windows client and client on Restore to previous version

Actual results:
No snapshot name is listed

Expected results:
Should list out the snapshot name

Additional info:
Few more regular expressions
\b[sS]\w+
[a-z]{10}$
^[a-z]*[0-9]*D$

Comment 3 rjoseph 2016-04-25 14:45:23 UTC
These are extended regular expressions (ERE), currently we only support POSIX basic regular expression (BRE). Check the following link for more details:

http://www.regular-expressions.info/refcharclass.html

With BRE try the following:

[a-fA-F0-9]\{32\}

Comment 4 Michael Adam 2016-04-26 12:44:15 UTC
THis is works as designed.
We need to document it more clearly.

Comment 5 Vivek Das 2016-04-26 13:48:38 UTC
The feature is tested on extended regular expression (ERE) and basic regular expression(BRE).
ERE cases failed as it is not supported for now.
Tests are validated on BRE and it works fine.
Need to be mentioned in documentation.


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