Bug 1374639

Summary: glusterfs: create a directory with 0464 mode return EIO error
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: distributeAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3.9CC: bugs
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.9.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1374093 Environment:
Last Closed: 2016-12-06 05:59:09 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: 1374093    
Bug Blocks:    

Description Niels de Vos 2016-09-09 09:38:21 UTC
+++ This bug was initially created as a clone of Bug #1374093 +++

Steps to Reproduce:
On Server:
1. mkdir /bricks/gluster/data
2. gluster volume create gluster4test ${SERVER}:/bricks/gluster/data force
3. gluster volume start gluster4test
On Client:
1. mount -t glusterfs ${FSOPTS} ${SERVER}:/gluster4test /gluster/mnt
2. cd /gluster/mnt; git clone git://git.code.sf.net/p/ntfs-3g/pjd-fstest
3. cd pjd-fstest; prove -rf tests/utime/00.t

Or manually:
[root@hp-xw6600-02 pjd-fstest]# less /var/log/glusterfs/gluster-mnt.log
[root@hp-xw6600-02 pjd-fstest]# cd ..
[root@hp-xw6600-02 mnt]# ./pjd-fstest/fstest mkdir dir 0777
0
[root@hp-xw6600-02 mnt]# ./pjd-fstest/fstest chown dir 65534 65534
0
[root@hp-xw6600-02 mnt]# ./pjd-fstest/fstest -u 65534 -g 65534 create dir/file 0464
changing groups to 65534
changing uid to 65534
0
[root@hp-xw6600-02 mnt]# ./pjd-fstest/fstest -u 65534 -g 65534 mkdir dir/dir 0464
changing groups to 65534
changing uid to 65534
mkdir returned -1
EIO

--- Additional comment from Pranith Kumar K on 2016-09-08 02:27:46 CEST ---

remote:   http://review.gluster.org/15420 cluster/dht: Don't merge invalid stbuf
remote:   http://review.gluster.org/15421 system/posix-acl: Unwind with NULL xdata on error

Comment 1 Worker Ant 2016-09-13 08:08:31 UTC
REVIEW: http://review.gluster.org/15474 (system/posix-acl: Unwind with NULL xdata on error) posted (#1) for review on release-3.9 by Niels de Vos (ndevos)

Comment 2 Worker Ant 2016-09-14 04:44:02 UTC
COMMIT: http://review.gluster.org/15474 committed in release-3.9 by Pranith Kumar Karampuri (pkarampu) 
------
commit 31629c943597ab1ae05948f7ad1051b53d7577ab
Author: Pranith Kumar K <pkarampu>
Date:   Thu Sep 8 05:43:20 2016 +0530

    system/posix-acl: Unwind with NULL xdata on error
    
    In posix-acl when there are errors xdata that comes as part of input is used to
    unwind which can be used as response xdata which may lead to problems as the
    keys in the input will match with keys in the output but the values the
    response xdata may expect can be completely different.
    
    For example, we see that dht sends DHT_IATT_IN_XDATA_KEY in setxattr
    which will be unwound with the same key in the xdata-response which
    dht thinks is valid response and fills stbuf with invalid values
    leading to EIO
    
    > BUG: 1374093
    > Change-Id: I6b77a1fa1ee99cb62e181e1db2e6fea73f6eaaa3
    > Signed-off-by: Pranith Kumar K <pkarampu>
    > Reviewed-on: http://review.gluster.org/15421
    > Smoke: Gluster Build System <jenkins.org>
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > Reviewed-by: jiffin tony Thottan <jthottan>
    > Reviewed-by: Niels de Vos <ndevos>
    (cherry picked from commit c9271ff14d3efa8279cf67907548b3f43970d4fb)
    
    Change-Id: I6b77a1fa1ee99cb62e181e1db2e6fea73f6eaaa3
    BUG: 1374639
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/15474
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 3 Aravinda VK 2016-10-27 05:21:57 UTC
glusterfs-3.9.0rc2 is released[1] and packages are available for different distributions[2] to test.

[1] http://www.gluster.org/pipermail/maintainers/2016-October/001601.html
[2] http://www.gluster.org/pipermail/maintainers/2016-October/001605.html and http://www.gluster.org/pipermail/maintainers/2016-October/001606.html

Comment 4 Aravinda VK 2016-12-06 05:59:09 UTC
Gluster 3.9 GA is released http://blog.gluster.org/2016/11/announcing-gluster-3-9/