[Bugs] [Bug 1480653] New: Worm File Level policy won't work with Gluster-SWIFT

bugzilla at redhat.com bugzilla at redhat.com
Fri Aug 11 15:00:38 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1480653

            Bug ID: 1480653
           Summary: Worm File Level policy won't work with Gluster-SWIFT
           Product: GlusterFS
           Version: 3.10
         Component: object-storage
          Severity: high
          Assignee: bugs at gluster.org
          Reporter: gabriel.cavalcante88 at gmail.com
                CC: bugs at gluster.org



Description of problem: Hello Folks, I'm trying to use gluster-swift with a
worm file level enabled volume on gluster FS; If I make changes using the
filesystem, the files inside the volume become RO as expected; if I use the
gluster-swift api to PUT the file, the old file is updated with the content of
the new file, even with auto-commit-period 1.


Version-Release number of selected component (if applicable): Centos 7
Containers, Gluster 3.10 installed from the centos-release-gluster310 repo.


How reproducible:


Steps to Reproduce:
1. Create a volume with a file-level worm policy, using the commands:

 * gluster vol create test storage1:/export/sdb1/test
storage2:/export/sdb1/test
 * gluster volume set test features.worm off
 * gluster volume set test features.worm-file-level on
 * gluster volume set test features.retention-mode enterprise
 * gluster volume set test features.auto-commit-period 1
 * gluster volume set test features.default-retention-period 600
 * gluster vol start test

2. Mount the volume in a container that will be the gluster-swift server:

 * mkdir -p /mnt/gluster-object/test/
 * mount -t glusterfs storage1:test /mnt/gluster-object/test/

3. Install, create rings and start gluster-swift as stated in:
https://github.com/gluster/gluster-swift/blob/master/doc/markdown/quick_start_guide.md

4. From the gluster-swift docker container, create a swift container inside the
account:

curl -i -X PUT http://localhost:8080/v1/AUTH_test/test

5. Create and Send the object:

echo 'my test' > file.txt
curl -i -X PUT -T file.txt http://localhost:8080/v1/AUTH_test/test/file.txt

Returns 201 Created.

6. Try to send the same object again:
echo 'test gain' > file.txt
curl -i -X PUT -T file.txt http://localhost:8080/v1/AUTH_test/test/file.txt

Returns 201 Created.


Actual results:

The file is written by the gluster-swift into the /mnt/gluster-object/test/
folder normally, even after the auto commit period.

If we try to change the file directly on the mount point (fs level), it returns
the expected 'read-only filesystem' message.

Expected results:

Gluster-swift shouldn't be able to change the file after commit period and the
proxy server should return a 503/500 error to the client when he tries to send
the same object after the commit period. (In the future we can make a PR with
the correct exception for this case).


Additional info:

Using a worm policy by volume works as intended: gluster-swift returns 503
errors because it can't move the temp files into the final file. (In the future
this behaviour need to be treated, but servers as a proof of concept for us).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list