Bug 1135514

Summary: setfattr/getfattr of a 'key' fails when 'value' is null
Product: [Community] GlusterFS Reporter: Ravishankar N <ravishankar>
Component: coreAssignee: Ravishankar N <ravishankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-14 17:27:26 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:

Description Ravishankar N 2014-08-29 13:50:37 UTC
Description of problem:
Disk based file systems allow to get/set extended attribute key-value pairs where value can be null. But the operation fails when fuse/libgfapi clients to do the same on a gluster volume.

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

How reproducible:
Always.

Steps to Reproduce:
Create a gluster volume and fuse mount it.Then:
--------------
[root@vm1 ~]# touch /mnt/fuse_mnt/file
[root@vm1 ~]# setfattr -n user.attrib1 /mnt/fuse_mnt/file
setfattr: /mnt/fuse_mnt/file: Invalid argument
[root@vm1 ~]#
[root@vm1 ~]#
[root@vm1 ~]# setfattr -n user.attrib1 /bricks/brick2/file
[root@vm1 ~]# getfattr -d -m . /bricks/brick2/file
getfattr: Removing leading '/' from absolute path names
# file: bricks/brick2/file
trusted.gfid=0sQ9GwWt98Q0K5u9yXMARVlw==
user.attrib1

[root@vm1 ~]#
[root@vm1 ~]# getfattr -d -m . /mnt/fuse_mnt/file
/mnt/fuse_mnt/file: user.attrib1: No such attribute
[root@vm1 ~]#
-----------------------------------

Actual results:
Operation fails on fuse mount

Expected results:
Should pass.

Comment 1 Anand Avati 2014-08-29 14:13:22 UTC
REVIEW: http://review.gluster.org/8567 (glusterfs: allow setxattr of keys with null values.) posted (#1) for review on master by Ravishankar N (ravishankar)

Comment 2 Anand Avati 2014-09-04 06:11:31 UTC
REVIEW: http://review.gluster.org/8567 (glusterfs: allow setxattr of keys with null values.) posted (#2) for review on master by Ravishankar N (ravishankar)

Comment 3 Anand Avati 2014-09-15 03:10:05 UTC
REVIEW: http://review.gluster.org/8567 (glusterfs: allow setxattr of keys with null values.) posted (#3) for review on master by Ravishankar N (ravishankar)

Comment 4 Anand Avati 2014-09-29 08:13:12 UTC
COMMIT: http://review.gluster.org/8567 committed in master by Vijay Bellur (vbellur) 
------
commit 2a2f1130689d388f26b41f5df3e0bf572e0addb5
Author: Ravishankar N <ravishankar>
Date:   Fri Aug 29 10:42:02 2014 +0000

    glusterfs: allow setxattr of keys with null values.
    
    Disk based file systems allow to get/set extended attribute key-value pairs where
    value can be null. Fuse/libgfapi clients must be able to do the same on a
    gluster volume.
    
    Change-Id: Ifc11134cc07f1a3ede43f9d027554dcd10b5c930
    BUG: 1135514
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/8567
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Reviewed-by: Jeff Darcy <jdarcy>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 5 Niels de Vos 2015-05-14 17:27:26 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.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 6 Niels de Vos 2015-05-14 17:35:34 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.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 7 Niels de Vos 2015-05-14 17:37:56 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.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 8 Niels de Vos 2015-05-14 17:43:29 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.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user