Bug 764865 (GLUSTER-3133)

Summary: Object-Storage: users addition happening only in distribute volumes
Product: [Community] GlusterFS Reporter: Saurabh <saurabh>
Component: object-storageAssignee: Gaurav <ggangalw>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: pre-releaseCC: aavati, ggangalw, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gaurav 2011-07-06 05:17:51 UTC
Please check backend for glusterfs has "user-xattr" enabled.
It seems its failing in setxattr.

Comment 1 Saurabh 2011-07-06 05:49:26 UTC
I took the wrong back end to create the volumes

Comment 2 Saurabh 2011-07-06 07:27:28 UTC
Scenario is,

  1. try create a dist-rep/rep(only) volume.
  2. use swauth-add-user command to create account and users.
  
  Expected Result: the addition of the account, fuse mount and user should get added.
  
  Actual Result: the fuse mount happens for the account but otherwise it fails, though same is a pass for distribute volume.

  root@gluster-Ubuntu1:~# gluster volume info rep

Volume Name: rep
Type: Replicate
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 192.168.1.223:/mnt/rep1
Brick2: 192.168.1.223:/mnt/rep2
root@gluster-Ubuntu1:~# 


root@gluster-Ubuntu1:~# swauth-add-user -a -K sj rep tester5 testing5 -A https://127.0.0.1:443/auth/
Traceback (most recent call last):
  File "/usr/local/bin/swauth-add-user", line 5, in <module>
    pkg_resources.run_script('swift==1.4-dev', 'swauth-add-user')
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.6/dist-packages/swift-1.4_dev-py2.6.egg/EGG-INFO/scripts/swauth-add-user", line 79, in <module>
    if not check_valid_account(account):
  File "/usr/local/lib/python2.6/dist-packages/swift-1.4_dev-py2.6.egg/swift/common/utils.py", line 1203, in check_valid_account
    return _check_valid_account(account)
  File "/usr/local/lib/python2.6/dist-packages/swift-1.4_dev-py2.6.egg/swift/common/utils.py", line 1184, in _check_valid_account
    if not check_user_xattr(os.path.join(MOUNT_PATH, account)):
  File "/usr/local/lib/python2.6/dist-packages/swift-1.4_dev-py2.6.egg/swift/common/utils.py", line 1151, in check_user_xattr
    setxattr(path, 'user.key1', 'value1')
  File "/usr/lib/pymodules/python2.6/xattr/__init__.py", line 188, in setxattr
    return xattr(f).set(attr, value, options=options)
  File "/usr/lib/pymodules/python2.6/xattr/__init__.py", line 81, in set
    self._set(name, value, 0, options | self.options)
  File "/usr/lib/pymodules/python2.6/xattr/__init__.py", line 16, in _func
    return func(first, *args)
IOError: [Errno 95] Operation not supported: '/mnt/swift/rep'


using the same command for adding the same users in a dist volume is a pass,
root@gluster-Ubuntu1:~# swauth-add-user -a -K sj test tester5 testing5 -A https://127.0.0.1:443/auth/

root@gluster-Ubuntu1:~# gluster volume info test

Volume Name: test
Type: Distribute
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 192.168.1.223:/mnt/sdb1/test1
Brick2: 192.168.1.223:/mnt/sdb1/test2


mount information,

root@gluster-Ubuntu1:~# mount
/dev/loop0 on /mnt/sdb1 type xfs (rw,noatime,nodiratime,nobarrier,logbufs=8)
localhost:auth on /mnt/swift/auth type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)
localhost:test on /mnt/swift/test type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)
localhost:test1 on /mnt/swift/test1 type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)
localhost:rep on /mnt/swift/rep type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)

here test1 is a distribute-replicate volume and the issue above was also seen for this volume also.


information from the auth volume,

root@gluster-Ubuntu1:~# ls /mnt/swift/auth/
test  tmp
root@gluster-Ubuntu1:~# ls /mnt/swift/auth/test/
tester  tester1  tester3  tester5