Bug 1162226

Summary: bulk remove xattr should not fail if removexattr fails with ENOATTR/ENODATA
Product: [Community] GlusterFS Reporter: Pranith Kumar K <pkarampu>
Component: posixAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.3CC: bugs, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.5.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1160509 Environment:
Last Closed: 2015-06-03 21:08:27 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: 1160509, 1163571    
Bug Blocks:    

Description Pranith Kumar K 2014-11-10 15:18:01 UTC
+++ This bug was initially created as a clone of Bug #1160509 +++

Description of problem:
    Bulk remove xattr is internal fop that comes from afr metadata
    self-heal. some xattrs like removexattr("posix.system_acl_access"),
    removes more than one xattr on the file so removexattr on these
    xattrs will fail with either ENODATA/ENOATTR. Since all afr cares
    is removing of these xattrs and if they are already deleted, it can
    treat it as success.


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 Anand Avati on 2014-11-04 23:01:48 EST ---

REVIEW: http://review.gluster.org/9049 (storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-11-05 11:33:29 EST ---

REVIEW: http://review.gluster.org/9049 (storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr) posted (#2) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-11-06 00:42:56 EST ---

COMMIT: http://review.gluster.org/9049 committed in master by Vijay Bellur (vbellur) 
------
commit b42255e87a06679b803e6bd83d02465d82c357b6
Author: Pranith Kumar K <pkarampu>
Date:   Wed Nov 5 09:04:50 2014 +0530

    storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr
    
    Bulk remove xattr is internal fop in gluster. Some of the xattrs may have
    special behavior. Ex: removexattr("posix.system_acl_access"), removes more than
    one xattr on the file that could be present in the bulk-removal request.
    Removexattr of these deleted xattrs will fail with either ENODATA/ENOATTR.
    Since all this fop cares is removal of the xattrs in bulk-remove request and
    if they are already deleted, it can be treated as success.
    
    Change-Id: Id8f2a39b68ab763ec8b04cb71b47977647f22da4
    BUG: 1160509
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/9049
    Reviewed-by: Shyamsundar Ranganathan <srangana>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 1 Anand Avati 2014-11-10 15:19:15 UTC
REVIEW: http://review.gluster.org/9089 (storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr) posted (#1) for review on release-3.5 by Pranith Kumar Karampuri (pkarampu)

Comment 2 Anand Avati 2014-11-10 15:37:14 UTC
REVIEW: http://review.gluster.org/9089 (storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr) posted (#2) for review on release-3.5 by Pranith Kumar Karampuri (pkarampu)

Comment 3 Anand Avati 2014-11-11 05:53:44 UTC
REVIEW: http://review.gluster.org/9089 (storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr) posted (#3) for review on release-3.5 by Pranith Kumar Karampuri (pkarampu)

Comment 4 Anand Avati 2014-11-13 09:29:20 UTC
COMMIT: http://review.gluster.org/9089 committed in release-3.5 by Niels de Vos (ndevos) 
------
commit 9b590b457210ca45246ee461d845e57932fda84a
Author: Pranith Kumar K <pkarampu>
Date:   Wed Nov 5 09:04:50 2014 +0530

    storage/posix: Treat ENODATA/ENOATTR as success in bulk removexattr
    
            Backport of http://review.gluster.org/9049
    
    Bulk remove xattr is internal fop in gluster. Some of the xattrs may have
    special behavior. Ex: removexattr("posix.system_acl_access"), removes more than
    one xattr on the file that could be present in the bulk-removal request.
    Removexattr of these deleted xattrs will fail with either ENODATA/ENOATTR.
    As all this fop cares is removal of the xattrs in bulk-remove request and
    if they are already deleted, it can be treated as success.
    
    BUG: 1162226
    Change-Id: I0629b48b854cda923c47bc5f50558bf42c60149b
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/9089
    Reviewed-by: Raghavendra G <rgowdapp>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>

Comment 5 Niels de Vos 2015-06-03 21:08:27 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.5.4, please reopen this bug report.

glusterfs-3.5.4 has been announced on the Gluster Packaging mailinglist [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://thread.gmane.org/gmane.comp.file-systems.gluster.packaging/2
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user