Bug 764868 (GLUSTER-3136)

Summary: Object-Storage: "mkdir" used when user addition happens when volume is stopped
Product: [Community] GlusterFS Reporter: Saurabh <saurabh>
Component: object-storageAssignee: Gaurav <ggangalw>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: pre-releaseCC: 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 Saurabh 2011-07-06 07:47:04 UTC
In accordance to the issue mentioned earlier, I tried to stop the auth volume and tried to add a user, though user addition didn't happen but again the response is, that "account not valid",


root@gluster-Ubuntu1:~# swauth-add-user -a -K sj test1 tester7 testing7 -A https://127.0.0.1:443/auth/
mkdir: cannot create directory `/mnt/swift/auth': File exists
Command failed: sudo mkdir -p /mnt/swift/auth
Error : Auth account not present
Account not valid: test1
root@gluster-Ubuntu1:~# gluster volume info auth

Volume Name: auth
Type: Distribute
Status: Stopped
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 192.168.1.223:/mnt/sdb1/auth1
Brick2: 192.168.1.223:/mnt/sdb1/auth2
root@gluster-Ubuntu1:~# gluster volume info test1

Volume Name: test1
Type: Distributed-Replicate
Status: Started
Number of Bricks: 2 x 3 = 6
Transport-type: tcp
Bricks:
Brick1: 192.168.1.223:/mnt/sdb1/t1
Brick2: 192.168.1.223:/mnt/sdb1/t-t1
Brick3: 192.168.1.223:/mnt/sdb1/t2
Brick4: 192.168.1.223:/mnt/sdb1/t-t2
Brick5: 192.168.1.223:/mnt/sdb1/t3
Brick6: 192.168.1.223:/mnt/sdb1/t-t3
root@gluster-Ubuntu1:~# 


Better if we can handle this issue also some other way.

Comment 1 Saurabh 2011-07-06 10:33:47 UTC
When the volume is stopped
and trial to add a user to this account results in a response that the
"mkdir" of the fuse mount directory which is already mounted as the account creation earlier, whereas if the volume is in "start" mode the user-addition happens "swiftly"


Failure traces:-

root@gluster-Ubuntu1:~# gluster volume stop test1
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
Stopping volume test1 has been successful
root@gluster-Ubuntu1:~# swauth-add-user -a -K sj test1 tester6 testing6 -A https://127.0.0.1:443/auth/
mkdir: cannot create directory `/mnt/swift/test1': File exists
Command failed: sudo mkdir -p /mnt/swift/test1
Account not valid: test1


My suggestion will be to handle it some other way, like putting up response string like "corresponding volume is stopped"

Comment 2 Saurabh 2011-07-18 07:11:20 UTC
root@Unbuntu:~# ./glusterfs/inst/sbin/gluster volume stop test
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
Stopping volume test has been successful
root@Unbuntu:~# gluster-object-add-user -K sj -A https://127.0.0.1:443/auth test tester2 testing2
root@Unbuntu:~# 
root@Unbuntu:~# ls /mnt/swift/auth
dist  dr1  drep  drep3  test  tmp
root@Unbuntu:~# ls /mnt/swift/auth/test
saurabh  tester  tester1  tester2
root@Unbuntu:~# 
root@Unbuntu:~# 
root@Unbuntu:~# ./glusterfs/inst/sbin/gluster volume stop auth
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
Stopping volume auth has been successful
root@Unbuntu:~# 
root@Unbuntu:~# 
root@Unbuntu:~# gluster-object-add-user -K sj -A https://127.0.0.1:443/auth test tester3 testing3
User creation failed: 500 Server Error
root@Unbuntu:~# ./glusterfs/inst/sbin/gluster volume start test
Starting volume test has been successful
root@Unbuntu:~# 
root@Unbuntu:~# 
root@Unbuntu:~# gluster-object-add-user -K sj -A https://127.0.0.1:443/auth test tester3 testing3
User creation failed: 500 Server Error