Bug 1473636 - Launch metadata heal in discover code path.
Launch metadata heal in discover code path.
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: replicate (Show other bugs)
mainline
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ravishankar N
: Triaged
Depends On:
Blocks: 1470599 1488168 1492010
  Show dependency treegraph
 
Reported: 2017-07-21 06:51 EDT by Ravishankar N
Modified: 2017-12-08 12:35 EST (History)
1 user (show)

See Also:
Fixed In Version: glusterfs-3.13.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1488168 1492010 (view as bug list)
Environment:
Last Closed: 2017-12-08 12:35:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ravishankar N 2017-07-21 06:51:49 EDT
Description of problem:

It was found that when I/O was going on in a  rep 2 volume and an add-brick was done to convert it to rep-3, mkdir failed on the newly added brick because the parent dir on that brick did not contain dht layout xattr due to which posix failed the mkdir (see BZ 1470599 if you have view permissions).

So fuse guarantees that a lookup (named OR gfid lookup) is issued before the mkdir. In afr, metadata heals (which heal the xattrs including dht xattrs) happen only as a part of named lookups. Fix it to include gfid lookups as well.

Note that named lookups can do name heals (if entry doesn't exist on the 3rd brick), gfid lookups can't do that. The most we can do is perform metadata heals if the entry is already present in the brick.
Comment 1 Worker Ant 2017-07-21 06:53:11 EDT
REVIEW: https://review.gluster.org/17850 (afr: heal metadata in discover code path) posted (#1) for review on master by Ravishankar N (ravishankar@redhat.com)
Comment 2 Worker Ant 2017-07-23 07:16:43 EDT
REVIEW: https://review.gluster.org/17850 (afr: heal metadata in discover code path) posted (#2) for review on master by Ravishankar N (ravishankar@redhat.com)
Comment 3 Worker Ant 2017-08-16 07:46:51 EDT
COMMIT: https://review.gluster.org/17850 committed in master by Ravishankar N (ravishankar@redhat.com) 
------
commit 468ca877807625817b72921d1e9585036687b640
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Fri Jul 21 15:21:20 2017 +0530

    afr: heal metadata in discover code path
    
    During graph switch, if fuse sends nameless (gfid) lookups, afr takes
    the discover code path to serve it. If there are pending metadata heals,
    they do not happen unless an inode refresh happens as a part of
    discover (which is not guaranteed to happen always).
    
    This patch fixes it by attempting metadata heal as a part of discover,
    just like how it is done in lookup code path.
    
    Also removed creating superfluous  heal frames when launching heal.
    
    Change-Id: I49868649361ebe5d70b6ea150f4686169b6c3070
    BUG: 1473636
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: https://review.gluster.org/17850
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Karthik U S <ksubrahm@redhat.com>
Comment 4 Ravishankar N 2017-09-02 11:31:17 EDT
Sending one more patch based on post-merge review comments for patch in comment #3.
Comment 5 Worker Ant 2017-09-02 11:39:01 EDT
REVIEW: https://review.gluster.org/18187 (afr: discover/lookup heal fixes) posted (#1) for review on master by Ravishankar N (ravishankar@redhat.com)
Comment 6 Worker Ant 2017-09-04 01:31:35 EDT
COMMIT: https://review.gluster.org/18187 committed in master by Pranith Kumar Karampuri (pkarampu@redhat.com) 
------
commit 37e16afa4853dcb5df6d6d0c91a6afd960c3a901
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Sat Sep 2 20:24:00 2017 +0530

    afr: discover/lookup heal fixes
    
    Addresses review comments in commit 468ca877807625817b72921d1e9585036687b640
    
    Change-Id: I04b1bd3b00abfd6758798d6272954e36a24249a9
    BUG: 1473636
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: https://review.gluster.org/18187
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Comment 7 Shyamsundar 2017-12-08 12:35:17 EST
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.13.0, please open a new bug report.

glusterfs-3.13.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/announce/2017-December/000087.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.