[LU-8851] nodemap: add flags to limit mapping to UID or GID only Created: 18/Nov/16  Updated: 15/Dec/21  Resolved: 01/May/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.10.0

Type: Improvement Priority: Minor
Reporter: Kit Westneat Assignee: Kit Westneat
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Related
is related to LU-13172 nodemap: a squashed primary GID allow... Open
is related to LU-3291 IU UID/GID Mapping Feature Resolved
is related to LU-9671 Group quota not enforced on clients w... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

There could be cases where different systems have the same UIDs but different GIDs, or vice versa, and therefore need mapping only for UIDs or GIDs. There should be a way to enable only UID mapping or only GID mapping.



 Comments   
Comment by Gerrit Updater [ 18/Nov/16 ]

Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: http://review.whamcloud.com/23853
Subject: LU-8851 nodemap: add uid/gid only flags to control mapping
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0ae6cd826a556c30d5d5ae4f68b933e398ed6935

Comment by Stephane Thiell [ 31/Jan/17 ]

So far this patch works fine with the 2.9 community release.

I have used it quite a lot and only a single time I noticed an error message when using nodemap_add_idmap but it did work as expected in the end:

[3785311.191429] LustreError: 117363:0:(mgs_handler.c:779:mgs_iocontrol_nodemap()) MGS: OBD_IOC_NODEMAP command CE046 for xstream: rc = -2

Don't worry, I will report any other suspicious behavior.

I guess the patch has several green lights from reviewers. Would Intel be ok to provide this patch in 2.9 FE?

Thanks!

Comment by Stephane Thiell [ 20/Mar/17 ]

Hi Kit,

We have been using this patch for some time now, it is a critical patch to us and we're very happy to have it. We have noticed that lfs quota is broken from the GID-only clients with nodemap enabled.

Example canonical GID 3199 on Oak mapped to 2709 on XStream:

[root@oak-rbh01 ~]# lfs quota -gh oak_ruthm /oak
Disk quotas for group oak_ruthm (gid 3199):
     Filesystem    used   quota   limit   grace   files   quota   limit   grace
           /oak  4.028T  9.313T     10T       -  115749  1450000 1500000       -
[sthiell@xstream-ln01 ~]$ lfs quota -hg srcc /oak
Disk quotas for group srcc (gid 2709):
     Filesystem    used   quota   limit   grace   files   quota   limit   grace
           /oak  4.028T      0k      0k       -       0       0       0       -

We have both group disk and inodes quota enabled but only the disk usage is reported, weird heh?

We're seeing the same behaviour on both Lustre 2.5 (Cray C3) and IEEL 3.0 (Lustre 2.7 based) clients. Intel, this is also tracked in DELL-291.

I also see that a quota test failed. I checked your patch, but I didn't find anything related to quota. Kit, do you have an idea of what could be wrong here?

Thanks much!
Stephane

Comment by Kit Westneat [ 27/Mar/17 ]

Hi Stephane,

I'm glad the patch is working out! While I was digging into this, I found a typo in the nodemap quota code where if you check group quota, it actually maps the UID. I created LU-9258 and uploaded:
https://review.whamcloud.com/26209

Can you check out this patch and see if it fixes your issues?

Thanks,
Kit

Comment by Stephane Thiell [ 27/Mar/17 ]

Hi Kit,

Good catch!!! Will do ASAP and let you know how it goes. Thanks so much!

All the best,
Stephane

Comment by Gerrit Updater [ 01/May/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/23853/
Subject: LU-8851 nodemap: add uid/gid only flags to control mapping
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f7815c80d95b20c97317fbd7010013dca009121e

Comment by Peter Jones [ 01/May/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:21:06 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.