Bug 1332372

Summary: Do not succeed mkdir without gfid-req
Product: [Community] GlusterFS Reporter: Anoop C S <anoopcs>
Component: posixAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.11CC: bugs, pkarampu
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.7.12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1317361 Environment:
Last Closed: 2016-06-28 12:16:31 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: 1317361    
Bug Blocks: 1321550    

Description Anoop C S 2016-05-03 05:50:00 UTC
+++ This bug was initially created as a clone of Bug #1317361 +++

Description of problem:
    Do not allow directory creations without gfids as it is a pain
    to fix the gfids. After the directories are created, operations
    on them fail anyway. So it is better to fail mkdir.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Vijay Bellur on 2016-03-14 11:46:36 IST ---

REVIEW: http://review.gluster.org/13690 (storage/posix: Fail mkdir without gfid-req) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-03-14 12:48:26 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#2) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-03-15 11:33:09 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#3) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-03-16 11:59:39 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#4) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-03-16 13:09:29 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#5) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-03-16 19:06:09 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#6) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-03-18 17:30:11 IST ---

REVIEW: http://review.gluster.org/13776 (features/trash: wind mkdir with special pid) posted (#1) for review on master by Anoop C S (anoopcs)

--- Additional comment from Mike McCune on 2016-03-29 03:53:05 IST ---

This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

--- Additional comment from Vijay Bellur on 2016-04-17 13:56:30 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#7) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-04-26 21:01:28 IST ---

REVIEW: http://review.gluster.org/13776 (features/trash: wind mkdir with special pid) posted (#2) for review on master by Anoop C S (anoopcs)

--- Additional comment from Vijay Bellur on 2016-04-27 18:11:23 IST ---

REVIEW: http://review.gluster.org/13776 (features/trash: wind mkdir with special pid) posted (#3) for review on master by Jeff Darcy (jdarcy)

--- Additional comment from Vijay Bellur on 2016-04-28 02:54:51 IST ---

COMMIT: http://review.gluster.org/13776 committed in master by Jeff Darcy (jdarcy) 
------
commit b5cfe948cb3569f034da80ac97b5d2f028b3b0e5
Author: Anoop C S <anoopcs>
Date:   Fri Mar 18 10:32:09 2016 +0530

    features/trash: wind mkdir with special pid
    
    Recent changes done w.r.t handling of mkdir calls in posix translator
    resulted in crashing the brick process from trash translator. This was
    due to the changes made in posix translator to return EPERM for every
    mkdir calls without 'gfid-req' set in dictionary. In order to avoid
    gfid mismatches during directory creation from brick side trash
    translator does not set 'gfid-req'. This patch is to have an exemption
    for trash based on a special pid set for those mkdir calls originating
    from trash translator and to reset it in callback.
    
    This patch also includes a small optimization to the existing test case
    for trash feature.
    
    Change-Id: I59f084ac875e54342ecf2bffa6e43ebd84814153
    BUG: 1317361
    Signed-off-by: Anoop C S <anoopcs>
    Reviewed-on: http://review.gluster.org/13776
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Jeff Darcy <jdarcy>

--- Additional comment from Vijay Bellur on 2016-04-28 12:41:24 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#8) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-04-28 17:02:39 IST ---

REVIEW: http://review.gluster.org/13690 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#9) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Vijay Bellur on 2016-04-29 19:27:43 IST ---

COMMIT: http://review.gluster.org/13690 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit b246b07896fefb261c9fb07f3f29f0d03b81b88d
Author: Pranith Kumar K <pkarampu>
Date:   Mon Mar 14 10:59:38 2016 +0530

    dht/afr/client/posix: Fail mkdir without gfid-req
    
    Do not allow directory creations without gfids as
    after the directories are created, operations
    on them fail anyway. So it is better to fail mkdir.
    
    BUG: 1317361
    Change-Id: I8f8e3b38bbded1960b7215bac0432500f7e78038
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/13690
    Smoke: Gluster Build System <jenkins.com>
    Reviewed-by: Krutika Dhananjay <kdhananj>
    CentOS-regression: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>

Comment 1 Vijay Bellur 2016-05-03 05:52:44 UTC
REVIEW: http://review.gluster.org/14173 (features/trash: wind mkdir with special pid) posted (#1) for review on release-3.7 by Anoop C S (anoopcs)

Comment 2 Vijay Bellur 2016-05-03 11:22:51 UTC
COMMIT: http://review.gluster.org/14173 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit d250a81c0aba677e1858a1f83337603bd94b3d90
Author: Anoop C S <anoopcs>
Date:   Fri Mar 18 10:32:09 2016 +0530

    features/trash: wind mkdir with special pid
    
    Recent changes done w.r.t handling of mkdir calls in posix translator
    resulted in crashing the brick process from trash translator. This was
    due to the changes made in posix translator to return EPERM for every
    mkdir calls without 'gfid-req' set in dictionary. In order to avoid
    gfid mismatches during directory creation from brick side trash
    translator does not set 'gfid-req'. This patch is to have an exemption
    for trash based on a special pid set for those mkdir calls originating
    from trash translator and to reset it in callback.
    
    This patch also includes a small optimization to the existing test case for trash feature.
    
    > Reviewed-on: http://review.gluster.org/13776
    > Smoke: Gluster Build System <jenkins.com>
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.com>
    > Reviewed-by: Jeff Darcy <jdarcy>
    
    (cherry picked from commit b5cfe948cb3569f034da80ac97b5d2f028b3b0e5)
    
    Change-Id: I59f084ac875e54342ecf2bffa6e43ebd84814153
    BUG: 1332372
    Signed-off-by: Anoop C S <anoopcs>
    Reviewed-on: http://review.gluster.org/14173
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Pranith Kumar Karampuri <pkarampu>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Smoke: Gluster Build System <jenkins.com>

Comment 3 Vijay Bellur 2016-05-03 11:24:47 UTC
REVIEW: http://review.gluster.org/14188 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#1) for review on release-3.7 by Pranith Kumar Karampuri (pkarampu)

Comment 4 Vijay Bellur 2016-05-04 04:10:20 UTC
REVIEW: http://review.gluster.org/14188 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#2) for review on release-3.7 by Pranith Kumar Karampuri (pkarampu)

Comment 5 Vijay Bellur 2016-05-12 22:49:06 UTC
REVIEW: http://review.gluster.org/14188 (dht/afr/client/posix: Fail mkdir without gfid-req) posted (#3) for review on release-3.7 by Pranith Kumar Karampuri (pkarampu)

Comment 6 Vijay Bellur 2016-06-17 06:53:01 UTC
COMMIT: http://review.gluster.org/14188 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit 02e1ca67027e6fbbc9e854ac9def183745488022
Author: Pranith Kumar K <pkarampu>
Date:   Mon Mar 14 10:59:38 2016 +0530

    dht/afr/client/posix: Fail mkdir without gfid-req
    
    Do not allow directory creations without gfids as
    after the directories are created, operations
    on them fail anyway. So it is better to fail mkdir.
    
     >BUG: 1317361
     >Change-Id: I8f8e3b38bbded1960b7215bac0432500f7e78038
     >Signed-off-by: Pranith Kumar K <pkarampu>
     >Reviewed-on: http://review.gluster.org/13690
     >Smoke: Gluster Build System <jenkins.com>
     >Reviewed-by: Krutika Dhananjay <kdhananj>
     >CentOS-regression: Gluster Build System <jenkins.com>
     >NetBSD-regression: NetBSD Build System <jenkins.org>
     >(cherry picked from commit b246b07896fefb261c9fb07f3f29f0d03b81b88d)
    
    Change-Id: Ibf9c84add7265e3e1755a37958e1de38307624b2
    BUG: 1332372
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/14188
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 7 Kaushal 2016-06-28 12:16:31 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.7.12, please open a new bug report.

glusterfs-3.7.12 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] https://www.gluster.org/pipermail/gluster-devel/2016-June/049918.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user