[Bugs] [Bug 1439112] New: File-level WORM allows ftruncate() on read-only files

bugzilla at redhat.com bugzilla at redhat.com
Wed Apr 5 09:22:12 UTC 2017


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

            Bug ID: 1439112
           Summary: File-level WORM allows ftruncate() on read-only files
           Product: GlusterFS
           Version: 3.8
         Component: unclassified
          Keywords: Triaged
          Assignee: ksubrahm at redhat.com
          Reporter: ksubrahm at redhat.com
                CC: amukherj at redhat.com, bugs at gluster.org,
                    gm06041 at gmail.com
        Depends On: 1437763, 1438810
   External Bug ID: Github #123



+++ This bug was initially created as a clone of Bug #1437763 +++

Description of problem:

file is truncated on File level WORM volume.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create worm volume (File Level)
$ gluster volume create vol_repl gm0604:/home/glu_test
$ gluster volume set vol_repl features.worm-file-level "on"
$ gluster volume set vol_repl features.worm "off"
$ gluster volume set vol_repl features.auto-commit-period 1
$ gluster volume set vol_repl features.retention-mode relax
$ gluster volume start vol_repl
$ mount -t glusterfs -o worm gm0604:/vol_repl /home/glu_gate

Volume Name: vol_repl
Type: Distribute
Volume ID: 603d32ef-9290-423d-8a66-20776d4ef252
Status: Started
Snapshot Count: 0
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: gm0604:/home/glu_test
Options Reconfigured:
nfs.disable: on
performance.readdir-ahead: on
transport.address-family: inet
features.worm-file-level: on
features.worm: off
features.auto-commit-period: 1
features.retention-mode: relax

2. create file on WORM volume (File Level)
$ cd /home/glu_gate
$ ls -l / > test1
$ ls -l
total 2
-rw-r--r-- 1 root root 1786 Feb 17 09:16 test1

3. delete or overwrite a file on WORM volume (File Level)
$ rm test1
rm: remove regular file 'test1'? y
rm: cannot remove 'test1': Read-only file system
$ ls -l / > test1
ls: write error: Read-only file system
$ ls -l
total 0
-rw-r--r-- 1 root root 0 Feb 17 09:16 test1

Actual results:
- the file should not be changed.

Expected results:
- the file should not be truncated.

Additional info:

--- Additional comment from Geunmoon Oh on 2017-03-31 02:38:28 EDT ---

i corrected some explanation.

Actual results:
- the file was truncated.

Related github issue:
https://github.com/gluster/glusterfs/issues/123

--- Additional comment from Worker Ant on 2017-04-05 05:17:45 EDT ---

REVIEW: https://review.gluster.org/16999 (features/worm: Adding implementation
for ftruncate) posted (#1) for review on release-3.10 by Karthik U S
(ksubrahm at redhat.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1437763
[Bug 1437763] File-level WORM allows ftruncate() on read-only files
https://bugzilla.redhat.com/show_bug.cgi?id=1438810
[Bug 1438810] File-level WORM allows ftruncate() on read-only files
-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=sC3814o2Rx&a=cc_unsubscribe


More information about the Bugs mailing list