Bug 1331720 - implement meta-lock/unlock for lock migration
Summary: implement meta-lock/unlock for lock migration
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: locks
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Susant Kumar Palai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1338501
TreeView+ depends on / blocked
 
Reported: 2016-04-29 11:31 UTC by Susant Kumar Palai
Modified: 2017-03-27 18:12 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.9.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1338501 (view as bug list)
Environment:
Last Closed: 2017-03-27 18:12:03 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Susant Kumar Palai 2016-04-29 11:31:42 UTC
Description of problem:
This bz is created to track the meta lock/unlock implementation. This is needed
to synchronize lock-migration with incoming lock requests.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-05-08 20:15:16 UTC
REVIEW: http://review.gluster.org/14251 (posix/lock: implement meta-lock/unlock functionality) posted (#1) for review on master by Susant Palai (spalai)

Comment 2 Vijay Bellur 2016-05-08 20:15:19 UTC
REVIEW: http://review.gluster.org/14252 (dht/metalock: add metalock/unlock) posted (#1) for review on master by Susant Palai (spalai)

Comment 3 Vijay Bellur 2016-05-09 09:36:54 UTC
REVIEW: http://review.gluster.org/14252 (dht/metalock: add metalock/unlock) posted (#2) for review on master by Susant Palai (spalai)

Comment 4 Vijay Bellur 2016-05-09 09:36:57 UTC
REVIEW: http://review.gluster.org/14251 (posix/lock: implement meta-lock/unlock functionality) posted (#2) for review on master by Susant Palai (spalai)

Comment 5 Vijay Bellur 2016-05-25 06:08:31 UTC
REVIEW: http://review.gluster.org/14252 (dht : add metalock/unlock) posted (#3) for review on master by Susant Palai (spalai)

Comment 6 Vijay Bellur 2016-05-25 06:08:34 UTC
REVIEW: http://review.gluster.org/14251 (posix/lock: implement meta-lock/unlock functionality) posted (#3) for review on master by Susant Palai (spalai)

Comment 7 Poornima G 2016-05-31 11:19:23 UTC
TODOs:

1. Once meta lock is taken, only the grantable locks needs to blocked, if it conflicts you need not block the lock, and return the failure right away.

2. In case of mandatory lock migration, when the meta lock is held, if a conflicting fop(read/write etc.) is sent, then it will be also blocked, those fops also needs to be considered and unwound as EREMOTE?

3. Client Disctonnect after meta lock is taken by rebalance needs to be handled.

Comment 8 Vijay Bellur 2016-06-01 11:17:47 UTC
REVIEW: http://review.gluster.org/14252 (dht : add metalock/unlock) posted (#4) for review on master by Susant Palai (spalai)

Comment 9 Vijay Bellur 2016-06-01 11:17:51 UTC
REVIEW: http://review.gluster.org/14251 (posix/lock: implement meta-lock/unlock functionality) posted (#4) for review on master by Susant Palai (spalai)

Comment 10 Vijay Bellur 2016-06-03 10:06:37 UTC
COMMIT: http://review.gluster.org/14251 committed in master by Raghavendra G (rgowdapp) 
------
commit 19b8c09709c7aeecb84eafb02de797a49a004638
Author: Susant Palai <spalai>
Date:   Fri Apr 22 15:20:39 2016 +0530

    posix/lock: implement meta-lock/unlock functionality
    
    problem : The lock state needs to be protected when rebalance is reading the
    lock state on the source. Otherwise there will be locks left unmigrated.
    Hence, to synchronize incoming lock requests with lock-migration, meta lock
    is needed. Any new lock request will be queued if there is an active meta-lock
    and with sucessful lock migration, will be unwound with EREMOTE, so that
    dht module can wind the request to the correct destination.
    
    On a successful lock migration, "pl_inode->migrated" flag is enabled. Hence,
    any further request would be unwound with EREMOTE and will be redirected to
    new destination.
    
    More details can be found here:
    https://github.com/gluster/glusterfs-specs/blob/master/accepted/Lock-Migration.md
    
    design discussion:
    https://www.gluster.org/pipermail/gluster-devel/2016-January/048088.html
    
    Change-Id: Ief033d5652b5ca4ba6f499110a521cae283d6aba
    BUG: 1331720
    Signed-off-by: Susant Palai <spalai>
    Reviewed-on: http://review.gluster.org/14251
    Tested-by: Prasanna Kumar Kalever <pkalever>
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 11 Vijay Bellur 2016-06-03 10:07:18 UTC
COMMIT: http://review.gluster.org/14252 committed in master by Raghavendra G (rgowdapp) 
------
commit 0556ac5c0ded2eb942096268b8b94f30e9af10e0
Author: Susant Palai <spalai>
Date:   Mon May 9 01:12:17 2016 +0530

    dht : add metalock/unlock
    
    Change-Id: I842a7ea1b286f1b893b200fe647597e7fd0f2105
    BUG: 1331720
    Signed-off-by: Susant Palai <spalai>
    Reviewed-on: http://review.gluster.org/14252
    Smoke: Gluster Build System <jenkins.com>
    Tested-by: Prasanna Kumar Kalever <pkalever>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 12 Shyamsundar 2017-03-27 18:12:03 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.9.0, please open a new bug report.

glusterfs-3.9.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://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/


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