Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1491985

Summary: Add NULL gfid checks before creating file
Product: [Community] GlusterFS Reporter: Ravishankar N <ravishankar>
Component: posixAssignee: Ravishankar N <ravishankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.10CC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.10.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1478297 Environment:
Last Closed: 2017-10-06 17:11:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1478297    
Bug Blocks: 1479474    

Description Ravishankar N 2017-09-15 08:32:47 UTC
+++ This bug was initially created as a clone of Bug #1478297 +++

Description of problem:
Add checks in code to prevent file potentially being created with a gfid of all zeroes.

--- Additional comment from Worker Ant on 2017-08-04 04:40:51 EDT ---

REVIEW: https://review.gluster.org/17975 (posix: add null gfid checks) posted (#1) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Worker Ant on 2017-08-05 03:59:24 EDT ---

REVIEW: https://review.gluster.org/17981 (afr: Prevent null gfids in self-heal entry re-creation) posted (#1) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Worker Ant on 2017-08-05 04:21:56 EDT ---

REVIEW: https://review.gluster.org/17975 (posix: add null gfid checks) posted (#2) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Worker Ant on 2017-08-07 04:55:36 EDT ---

REVIEW: https://review.gluster.org/17975 (posix: add null gfid checks) posted (#3) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Worker Ant on 2017-08-07 23:37:05 EDT ---

COMMIT: https://review.gluster.org/17981 committed in master by Ravishankar N (ravishankar) 
------
commit bead74a6e085001225bc0704bad1a5db36dd75a1
Author: Ravishankar N <ravishankar>
Date:   Fri Aug 4 16:23:46 2017 +0530

    afr: Prevent null gfids in self-heal entry re-creation
    
    Change-Id: I5acb8bd0a19fc4e764d61e349bb690b5236ee610
    BUG: 1478297
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: https://review.gluster.org/17981
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Amar Tumballi <amarts>
    Reviewed-by: Karthik U S <ksubrahm>

--- Additional comment from Worker Ant on 2017-08-08 08:54:29 EDT ---

COMMIT: https://review.gluster.org/17975 committed in master by Raghavendra Bhat (raghavendra) 
------
commit c63aa2239bc682739328e0aa6cbcb3279a72a8e2
Author: Ravishankar N <ravishankar>
Date:   Mon Aug 7 12:14:23 2017 +0530

    posix: add null gfid checks
    
    ...in file/dir creation and lookup codepaths. The check is relaxed for
    fops coming from trash xlator at the moment until trash has client side
    logic to send the create fops with gfid-req.
    
    Also fixed the missing trash pid assignment in creates sent by trash
    xlator. Without this, truncated files won't be moved to .trashcan.
    
    Change-Id: Ieddd7f0634850e7c7010e4fbb4ad1eead35888c8
    BUG: 1478297
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: https://review.gluster.org/17975
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: jiffin tony Thottan <jthottan>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Raghavendra Bhat <raghavendra>

Comment 1 Worker Ant 2017-09-15 08:34:13 UTC
REVIEW: https://review.gluster.org/18300 (afr: Prevent null gfids in self-heal entry re-creation) posted (#1) for review on release-3.10 by Ravishankar N (ravishankar)

Comment 2 Worker Ant 2017-09-15 08:48:16 UTC
REVIEW: https://review.gluster.org/18302 (posix: add null gfid checks) posted (#1) for review on release-3.10 by Ravishankar N (ravishankar)

Comment 3 Worker Ant 2017-09-17 12:55:27 UTC
COMMIT: https://review.gluster.org/18302 committed in release-3.10 by Shyamsundar Ranganathan (srangana) 
------
commit 0240a6d5ceb507376abaf97ec25409612c137891
Author: Ravishankar N <ravishankar>
Date:   Fri Sep 15 14:12:47 2017 +0530

    posix: add null gfid checks
    
    Backport of https://review.gluster.org/17975
    
    ...in file/dir creation and lookup codepaths. The check is relaxed for
    fops coming from trash xlator at the moment until trash has client side
    logic to send the create fops with gfid-req.
    
    Also fixed the missing trash pid assignment in creates sent by trash
    xlator. Without this, truncated files won't be moved to .trashcan.
    
    Change-Id: Ieddd7f0634850e7c7010e4fbb4ad1eead35888c8
    BUG: 1491985
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: https://review.gluster.org/18302
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Shyamsundar Ranganathan <srangana>

Comment 4 Worker Ant 2017-09-17 13:38:26 UTC
COMMIT: https://review.gluster.org/18300 committed in release-3.10 by Shyamsundar Ranganathan (srangana) 
------
commit d43ef3d4dd2b8c2fcf16da541626a9bf63573a88
Author: Ravishankar N <ravishankar>
Date:   Fri Aug 4 16:23:46 2017 +0530

    afr: Prevent null gfids in self-heal entry re-creation
    
    > Reviewed-on: https://review.gluster.org/17981
    > Smoke: Gluster Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > Reviewed-by: Amar Tumballi <amarts>
    > Reviewed-by: Karthik U S <ksubrahm>
    (cherry picked from commit bead74a6e085001225bc0704bad1a5db36dd75a1)
    
    Change-Id: I5acb8bd0a19fc4e764d61e349bb690b5236ee610
    BUG: 1491985
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: https://review.gluster.org/18300
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Shyamsundar Ranganathan <srangana>

Comment 5 Shyamsundar 2017-10-06 17:11:53 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.10.6, please open a new bug report.

glusterfs-3.10.6 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-October/000084.html
[2] https://www.gluster.org/pipermail/gluster-users/