Bug 1326308 - WORM/Retention Feature
Summary: WORM/Retention Feature
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karthik U S
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: glusterfs-3.8.0
TreeView+ depends on / blocked
 
Reported: 2016-04-12 11:46 UTC by Karthik U S
Modified: 2016-06-16 14:03 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 14:03:35 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
This zip contains all the required files which has WORM/Retention feature (51.42 KB, text/plain)
2016-04-12 11:46 UTC, Karthik U S
no flags Details

Description Karthik U S 2016-04-12 11:46:40 UTC
Created attachment 1146433 [details]
This zip contains all the required files which has WORM/Retention feature

Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
FeatureFeature

Comment 1 Karthik U S 2016-04-12 11:49:32 UTC
Added Blocks
Added Keywords
CCed myself

Comment 2 Vijay Bellur 2016-04-14 12:53:39 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM "WORK IN PROGRESS") posted (#12) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 3 Karthik U S 2016-04-15 13:09:23 UTC
Change-Id: I77bd9777f9395a944d76b5cc35a5b48a3c14d148
Under review

Comment 4 Vijay Bellur 2016-04-19 12:57:56 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM "WORK IN PROGRESS") posted (#13) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 5 Vijay Bellur 2016-04-28 10:59:18 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#14) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 6 Vijay Bellur 2016-04-28 11:50:27 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#15) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 7 Vijay Bellur 2016-04-28 18:39:56 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#16) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 8 Vijay Bellur 2016-04-29 11:00:56 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#17) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 9 Vijay Bellur 2016-04-29 18:03:05 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#18) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 10 Vijay Bellur 2016-04-29 18:49:21 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#19) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 11 Vijay Bellur 2016-04-29 19:24:31 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#20) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 12 Vijay Bellur 2016-04-30 08:37:24 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#21) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 13 Vijay Bellur 2016-05-01 09:30:24 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#22) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 14 Vijay Bellur 2016-05-01 18:21:24 UTC
REVIEW: http://review.gluster.org/13429 (WORM/Retention Translator: Implementation of file level WORM) posted (#23) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 15 Vijay Bellur 2016-05-02 01:05:29 UTC
COMMIT: http://review.gluster.org/13429 committed in master by Niels de Vos (ndevos@redhat.com) 
------
commit a15195794c336ed0e272076a128c56b171cae12f
Author: karthik-us <ksubrahm@redhat.com>
Date:   Thu Feb 11 16:31:18 2016 +0530

    WORM/Retention Translator: Implementation of file level WORM
    
    To activate the file level worm feature, the features.read-only and
    features.worm options should be switched "off" on the volume and
    the features.worm-file-level should be switched "on". Both read-only
    and worm or worm-file-level cannot be switched "on" together. The
    files which are created when the worm-file-level option is set on the
    volume will have their own retention profile.
    
    If both worm and worm-file-level are "on" at that time the worm
    which is the volume level worm will have priority over file level
    worm. If worm-file level is switched "off" after some time and the
    read-only option is switched "on" then read-only will have priority.
    
    The current implementation allows the users to manually transmit
    a file to a WORM-Retained state by removing all the write bits of
    the file using the chmod command. The file will have a retention
    profile which contains the state of the file, mode of retention,
    and the default retention time.
    
    The file will be made WORM-Retained for a default of 120 seconds
    during which it will be immutable and undeletable and it sets the
    atime of the file to the time till which it is retained.
    After that period if any fop request comes for that file, will
    make the transition from WORM-Retained state to WORM state, where
    the file will be immutable but deletable and, it will reset
    the atime to the actual atime of the file. If a WORM file needs
    to be made undeletable again, it can be done by using the chmod
    command with all the write bits removed.
    
    There are two modes of retention:
    1. Relax: where the retention time of a WORM-Retained file can be
       increased or decreased.
    2. Enterprise: where the retention time of a WORM-Retained file
       can be increased but not be decreased.
    Whenever a utime change(touch -a, -t, ...)request comes for a
    file it checks the mode of retention before setting the utimes.
    This is done only if the file is WORM-Retained but for a WORM file
    it will change the utimes.
    
    Lazy auto commit:
    Whenever a file gets created it will store the creation time of the
    file or if a file already exists then any of the next unlink, link,
    truncate or rename fops will set the current time as the start time
    in an xattr. The next rename/unlink/truncate/link call will check for the
    auto commit period and if is is expired, then it will automatically do
    the state transition. If it is a normal file then it gets converted
    to WORM-Retained state. If it is a WORM-Retained file and its retention
    period is expired, then it gets converted to WORM state.
    
    Added the volume set options for the WORM translator. It allows the users
    to change the default values of auto-commit-period, default-retention-period,
    retention-mode. To make use of the file-level WORM first we have to set the
    'worm-file' option to 'on'. The files which are created when the worm-file
    option is set on the volume will get WORM-Retained. Other files will work
    as usual and will not be WORMed. The auto-commit-period, retention-mode,
    and the default-retention-period values for the file will be set to the values
    which are set on the volume when the file is created.
    
    Added the tests to check the basic functionalities of the WORM/Retention feature.
    
    Change-Id: I77bd9777f9395a944d76b5cc35a5b48a3c14d148
    BUG: 1326308
    Signed-off-by: karthik-us <ksubrahm@redhat.com>
    Reviewed-on: http://review.gluster.org/13429
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>

Comment 16 Niels de Vos 2016-06-16 14:03:35 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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