[LU-1482] attribute not permitted on Lustre versions 2.x Created: 05/Jun/12 Updated: 08/Sep/16 Resolved: 08/Sep/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.1.0, Lustre 2.2.0, Lustre 2.1.1 |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Pierre Choukroun | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | None | ||
| Environment: |
MDS Redhat 6 64 bit with Lustre version 2.2 |
||
| Issue Links: |
|
||||||||||||
| Rank (Obsolete): | 8361 | ||||||||||||
| Description |
|
Attribute are not permitted on version 2.x but works on version 1.8.x to reproduce the problem Lustre clients are mounted with option acl,user_xattr #!/bin/bash the output |
| Comments |
| Comment by Andreas Dilger [ 18/Jun/12 ] |
|
This does appear to be a valid test case. Looking at the kernel code, it seems that users that do not own a file should still be able to create user.* xattrs on a file they have write permission on. I suspect some strange interaction between ACLs and the xattr permission checking is the cause. Is this reproducible with a RHEL6 client (filesystem could be mounted temporarily on the MDS for testing purposes)? However, I'm reducing the severity of this problem, since it is a relatively obscure use case, and is unlikely to be fixed in the short term. |
| Comment by Pierre Choukroun [ 22/Aug/12 ] |
|
The attribute problem may be a corner case for you, but it is a show stopper for users of the LHC Computing Grid’s STORM storage resource manager (http://storm.forge.cnaf.infn.it/) that want to upgrade to Lustre 2.X Attributes are used to store checksums of every file which, after every gridftp transfer, are compared between source and destination. As long as this bug remains unfixed, we cannot upgrade Lustre. I hope you will upgrade the priority for fixing this bug so that we and the other STORM sites around the world using Lustre can upgrade. |
| Comment by Goncalo Filipe Mauricio dos Santos Borges [ 13/May/13 ] |
|
This issue seems to be stalled since June 2012 with no evolution whatsoever. The attribute issue is really a showstopper in our case since it is avoiding the migration to lustre 2.1 and its interaction with the StoRM SRM system. We are a Tier-2 for WLCG with a storage capacity of about 600 TB. As we, there are a couple of more sites in the same situation, and therefore, the impact of this issue is not small. I've just tried it with a lustre 1.8 client in RH6:
|
| Comment by Goncalo Filipe Mauricio dos Santos Borges [ 22/May/13 ] |
|
Dear All After some investigation, mostly from two of my colleagues, we were able to pinpoint the problem. The main difference between lustre 1.8 and 2.x series is that the acls are now checked on the server side, while in the older 1.8 versions, these was done in the client side. This lead to some restructure of the code, and the current implementation relies on very simple validations. These very simple validations are done in mdd_xattr_sanity_check function under lustre/mdd/mdd_object.c. The fundamental piece of code is if ((uc->mu_fsuid != tmp_la->la_uid) && which basically tells you that only the owner of the file is allowed to change the extended atributes. We have developed a dirty hack to overcome this issue but we do not want to make it public since it may not be general enough, or may have hidden problems since I'm sure we do not have a full understanding of the code. I'm certain that Whamcloud people can do it much better, and now that we have identified the problem, maybe the fix could be delivered faster than expected. Thank you |
| Comment by Jeremy Maris (Inactive) [ 18/May/14 ] |
|
We are also a Tier-2 for WLCG, and have held off upgrading from Lustre 1.8.9 because of this problem. The bug is is still there in v2.4.1; tested with ext4/ldiskfs back-end:
setfattr: dummy_file_test_xattr: Operation not permitted ----------- Wil this problem ever be addressed? Jeremy |
| Comment by Wang Shilong (Inactive) [ 12/Aug/15 ] |
|
I think maybe something like this should fix issue? diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 5938bc9..441c3db 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -951,8 +951,8 @@ static int mdd_xattr_sanity_check(const struct lu_env *env, !md_capable(uc, CFS_CAP_FOWNER)) RETURN(-EPERM); } else { - if ((uc->uc_fsuid != tmp_la->la_uid) && - !md_capable(uc, CFS_CAP_FOWNER)) + if (uc->uc_fsuid != tmp_la->la_uid && + !md_capable(uc, CFS_CAP_CHOWN)) RETURN(-EPERM); } We don't need OWNER rights always.. |
| Comment by Gerrit Updater [ 12/Aug/15 ] |
|
Wang Shilong (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/15959 |
| Comment by Gerrit Updater [ 31/Mar/16 ] |
|
Wang Shilong (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/19258 |
| Comment by Gerrit Updater [ 25/Jul/16 ] |
|
Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/21496 |
| Comment by Gerrit Updater [ 08/Sep/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21496/ |
| Comment by Peter Jones [ 08/Sep/16 ] |
|
Landed for 2.9 |