Bug #17828
libceph setxattr returns 0 without setting the attr
Status:
Need More Info
Priority:
Normal
Assignee:
-
Category:
Correctness/Safety
Target version:
-
% Done:
0%
ceph-qa-suite:
fs
Component(FS):
libcephfs
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Using the jewel libcephfs python bindings I ran the following code snippet:
import rados import cephfs import xattr cluster = rados.Rados(conffile='/etc/ceph/ceph.conf') l = cephfs.LibCephFS() l.create_with_rados(cluster) l.init() l.mount() l.setxattr(path='/test-quota', name='ceph.quota.max_files', value='20', flags=xattr.XATTR_CREATE) l.sync_fs()
I then mounted the CephFs root using ceph-fuse and found that getfattr failed to show any attributes set. I didn't see any errors bubble up through python so I'm not sure what is wrong here. Maybe I'm giving it the wrong path. setfattr works correctly through ceph-fuse. My directory test-quota here is just a top level directory in the filesystem.
History
#1 Updated by John Spray about 7 years ago
- Project changed from mgr to CephFS
This ticket didn't get noticed because it was filed in the 'mgr' component instead of the 'fs' component.
Chris: did this issue persist for you? Do you see the quota xattr set from the libcephfs side if you try and read it back? Can you grab a "debug client = 20" client log from the libcephfs client while it's doing the setxattr?
#2 Updated by John Spray about 7 years ago
- Category set to Correctness/Safety
- Component(FS) libcephfs added
#3 Updated by Zheng Yan about 7 years ago
- Status changed from New to Need More Info
ceph.quota.max_files is hidden xattr. It doesn't show in listxattr. you need to get it explictly (getfattr -n ceph.quota.max_files somedir)