Bug 1020673

Summary: Unable to update existing files and can't create new file or directory after enabling cluster.nufa + quota (nufa should be on before quota).
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rachana Patel <racpatel>
Component: quotaAssignee: Manikandan <mselvaga>
Status: CLOSED NOTABUG QA Contact: storage-qa-internal <storage-qa-internal>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: grajaiya, mselvaga, mzywusko, rhs-bugs, saujain, smohan, storage-qa-internal, vagarwal, vbellur
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-05 09:07:44 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 Rachana Patel 2013-10-18 07:21:22 UTC
Description of problem:
If you enable cluster.nufa first and then quota, unable to write under directory for which quota limit is set and workaround is disable quota(disabling nufa doesn't make difference in error)

while running cluster.nufa test plan on DHT volume (FUSE mount), found that when quota is enabled sometimes I am unable to write to existing files and unable to create new files/Directory. It fails with 'Invalid argument' or 'No such...'

Tried few possible sequence to narrow down cases and reproduce it with exact steps and findings are
for DHT volume mounted using FUSE

1. unable to create new entry or write in existing file :-

- enable cluster.nufa. 
- Now enable quota and set limit for '/' (or create data and set limit for any dir,) and try to create new file/Directory or modify existing files under quota enabled directory. It will fail. 
e.g.
[root@rhs-client22 rpm]# mkdir  /mnt/test_nufa2/new/dcreate
mkdir: cannot create directory `/mnt/test_nufa2/new/dcreate': Invalid argument
[root@rhs-client22 rpm]# touch /mnt/test_nufa2/new/can1
touch: setting times of `/mnt/test_nufa2/new/can1': No such file or directory
- creation of files and directory under other directories(quota limit is not set) is completed successfully
- now disable quota on volume and error is gone
- If you do not disable quota but make cluster.nufa off then you will face same error on write

2. No error:-
- enable quota on volume and set limit for Directory.
- create some data and then set cluster.nufa on or set it on and then create data(both has same result)
- enable cluster.nufa. 
- try to write or create new entries and no error



Version-Release number of selected component (if applicable):
Big bend RHS ISO 
+ glusterfs-*-3.4.0.35rhs-1.el6rhs.x86_64


How reproducible:
always

Steps to Reproduce:
1.create a DHT volume and enable cluster.nufa
# gluster volume create test_nufa1 10.70.37.204:/rhs/brick1/b1 10.70.37.142:/rhs/brick1/b1
# gluster volume start test_nufa1
# gluster volume start test_nufa1

2.mount this volume using FUSE
[root@rhs-client22 rpm]# mount | grep test_nufa1
10.70.37.204:/test_nufa1 on /mnt/test_nufa1 type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)

3. enable quota and set limit for directory
# gluster volume quota test_nufa1 enable
# gluster volume quota test_nufa1 limit-usage / 50MB 50%

4. create dir and files under from mount point

[root@rhs-client22 rpm]# touch /mnt/test_nufa1/f11
touch: setting times of `/mnt/test_nufa1/f11': No such file or directory
[root@rhs-client22 rpm]# mkdir /mnt/test_nufa1/new
mkdir: cannot create directory `/mnt/test_nufa1/new': Invalid argument


Actual results:
write is failing and getting error for quota and nufa enabled directory

Expected results:
write should not fail if quota limit is not exceeded

Additional info:

Comment 2 Rachana Patel 2013-10-18 10:21:05 UTC
log snippet:-

[2013-10-18 04:25:11.682013] W [client-rpc-fops.c:2058:client3_3_create_cbk] 0-test_nufa1-client-1: remote operation failed: Invalid argument. Path: /f11
[2013-10-18 04:25:11.682108] W [fuse-bridge.c:2398:fuse_create_cbk] 0-glusterfs-fuse: 5: /f11 => -1 (Invalid argument)
[2013-10-18 04:25:11.682501] W [defaults.c:1291:default_release] (-->/usr/lib64/glusterfs/3.4.0.35rhs/xlator/protocol/client.so(client3_3_create_cbk+0xa11) [0x7ff75590d671] (-->/usr/lib64/glusterfs/3.4.0.35rhs/xlator/protocol/client.so(client_local_wipe+0x28) [0x7ff7558fbe78] (-->/usr/lib64/libglusterfs.so.0(fd_unref+0x144) [0x7ff75a389864]))) 0-fuse: xlator does not implement release_cbk
[2013-10-18 04:25:46.649261] W [client-rpc-fops.c:322:client3_3_mkdir_cbk] 0-test_nufa1-client-0: remote operation failed: Invalid argument. Path: /new
[2013-10-18 04:25:46.649342] W [fuse-bridge.c:567:fuse_entry_cbk] 0-glusterfs-fuse: 9: MKDIR() /new => -1 (Invalid argument)

Comment 3 Rachana Patel 2013-10-18 10:22:49 UTC
able to reproduce by following same steps(nufa first then quota) on  dist-rep volume - 2X2, mounted using FUSE.

log snippet for the same:-
[2013-10-18 08:23:09.452624] W [fuse-bridge.c:2398:fuse_create_cbk] 0-glusterfs-fuse: 11: /f1 => -1 (Invalid argument)
[2013-10-18 08:23:09.453900] W [defaults.c:1291:default_release] (-->/usr/lib64/glusterfs/3.4.0.35rhs/xlator/cluster/replicate.so(afr_create_done+0x13d) [0x7f16eaf9024d] (-->/usr/lib64/glusterfs/3.4.0.35rhs/xlator/cluster/replicate.so(afr_local_cleanup+0x15c) [0x7f16eafcc49c] (-->/usr/lib64/libglusterfs.so.0(fd_unref+0x144) [0x3cc183a864]))) 0-fuse: xlator does not implement release_cbk
[2013-10-18 08:23:19.488014] W [client-rpc-fops.c:322:client3_3_mkdir_cbk] 0-dist-rep-client-2: remote operation failed: Invalid argument. Path: /f1
[2013-10-18 08:23:19.488090] W [client-rpc-fops.c:322:client3_3_mkdir_cbk] 0-dist-rep-client-3: remote operation failed: Invalid argument. Path: /f1
[2013-10-18 08:23:19.488131] W [fuse-bridge.c:567:fuse_entry_cbk] 0-glusterfs-fuse: 15: MKDIR() /f1 => -1 (Invalid argument)
(END) 


will upload sos report soon

Comment 5 Vivek Agarwal 2013-10-21 06:39:45 UTC
Per bug triage, not important for U1

Comment 7 Manikandan 2015-08-05 09:07:44 UTC
Nufa is currently not supported. So closing this bug.