IU UID/GID Mapping Feature (LU-3291)

[LU-4647] Add idmapping functions for nodemap Created: 18/Feb/14  Updated: 28/Aug/15  Resolved: 28/Aug/15

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

Type: Technical task Priority: Critical
Reporter: Joshua Walgenbach (Inactive) Assignee: Nathaniel Clark
Resolution: Fixed Votes: 0
Labels: HB, patch

Issue Links:
Related
is related to LU-5963 wrong hashing in LU-4647 Resolved
is related to LU-1882 conf-sanity test_45: umount2: Device ... Resolved
is related to LUDOC-265 Nodemap lctl functions need to be doc... Resolved
Rank (Obsolete): 12712

 Comments   
Comment by Andreas Dilger [ 03/Mar/14 ]

http://review.whamcloud.com/9299

Comment by Jodi Levi (Inactive) [ 14/Mar/14 ]

http://review.whamcloud.com/#/c/9529/

Comment by Andreas Dilger [ 01/May/14 ]

I noticed http://review.whamcloud.com/7936 coming down the pipe as well, and while the client-side changes obviously don't affect this feature, it will need some idmap handling on the server side.

Comment by Kit Westneat [ 21/May/14 ]

Added tests here:
http://review.whamcloud.com/10406

Comment by Kit Westneat [ 27/Jun/14 ]

I was doing some testing today and ran into a weird issue. Basically runas doesn't seem to work unless there is a supplemental group (it doesn't matter what it is):

[root@c1 mnt]# /root/lustre-release/lustre/tests/runas -u 503  touch `pwd`/tmp_dir/file_test
running as uid/gid/euid/egid 503/503/503/503, groups:
 [touch] [/mnt/tmp_dir/file_test]
touch: cannot touch `/mnt/tmp_dir/file_test': Permission denied
[root@c1 mnt]# /root/lustre-release/lustre/tests/runas -u 503 -G99999 touch `pwd`/tmp_dir/file_test
adding supp group 99999
running as uid/gid/euid/egid 503/503/503/503, groups: 99999
 [touch] [/mnt/tmp_dir/file_test]

I wanted to check in to see if anyone else can reproduce it, or if it's something about my build/system. Also if anyone has any theories as to why it's happening.

Thanks,
Kit

Comment by Andreas Dilger [ 27/Jun/14 ]

This should probably be a separate bug.

Comment by Cliff White (Inactive) [ 01/Jul/14 ]

Kit, can you open your issue as a new bug, please?

Comment by Cliff White (Inactive) [ 11/Jul/14 ]

Kit, your patch http://review.whamcloud.com/#/c/10406/ is failing testing, can you address the issues?

Comment by Kit Westneat [ 11/Jul/14 ]

Hi Cliff, I'm not sure what's going on. It seems like it's having a problem creating a file as root. Do these nodes run with root squash on or anything? Is there a way to get interactive access to the test or is it batch only? I can't reproduce the issue on my test machine.

Comment by Kit Westneat [ 15/Jul/14 ]

I think I figured it out - the earlier tests were enabling nodemap and the new tests expect it to be disabled at start. I uploaded a fix for it.

There still seems to be a problem with the tests, but it's failing on other non-nodemap tests as well. They are all getting timeout errors. Is it possible that there is a problem with the test cluster?

Comment by Kit Westneat [ 19/Jul/14 ]

Looking at it again, it looks like the OSS kernel panic'd:
22:04:24:IP: [<ffffffffa08882e5>] tgt_request_preprocess+0x705/0x1470 [ptlrpc]

I dug into it some, and it looks like the clients aren't being reassigned a nodemap after the nodemap_destroy, so they are just pointing to NULL nodemaps. Josh is working on an updated patch and will resubmit it.

Comment by Cliff White (Inactive) [ 19/Sep/14 ]

Any updates on this ? The last patch also failed testing.

Comment by Kit Westneat [ 05/Nov/14 ]

Found a new bug while working on 10406:
http://review.whamcloud.com/#/c/12575/

Comment by Alexey Lyashkov [ 29/Nov/14 ]

I hope Intel will block to close that ticket until oxygen comments will don't added to the code with good debug options.
It's very strange to land code without ANY debug in code. Why Intel allow to do it? did Intel do any testing? recovery-small failed to stop any service with export reference leak with simple test SLOW=yes sh recovery-small.sh.

Comment by Cliff White (Inactive) [ 01/Dec/14 ]

Alex, this is in reference to http://review.whamcloud.com/#/c/12575/ ?

Comment by Alexey Lyashkov [ 01/Dec/14 ]

Cliff,

I don't know a patch pointed you. my patch in LU-5963 very simple.

@@ -50,7 +52,12 @@ void nm_member_putref(struct obd_export *exp)
 static __u32 nm_member_hashfn(cfs_hash_t *hash_body,
                           const void *key, unsigned mask)
 {
-       return cfs_hash_djb2_hash(key, strlen(key), mask);
+       unsigned long hash;
+//     return cfs_hash_djb2_hash(key, strlen(key), mask);
+       hash = hash_long((unsigned long)key, hash_body->hs_bkt_bits) & mask;
+
+       CDEBUG(D_INFO, "hashing %p -> %lu\n", key, hash);
+       return hash;
 }

but some debug need added anyway.

Comment by Gerrit Updater [ 04/Dec/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12575/
Subject: LU-4647 nodemap: fix problem with node reclassification
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ec6aae2e3aa4174e3c8fdd8e75a9a4186e3abdc4

Comment by Jodi Levi (Inactive) [ 09/Dec/14 ]

Patch landed to Master.

Comment by Andreas Dilger [ 09/Dec/14 ]

I think the recently landed patch is not addressing the issue that Alexey pointed out.

Comment by Andreas Dilger [ 09/Dec/14 ]

Sorry, I see that the hash function patch landed via http://review.whamcloud.com/12881 from LU-5963.

Comment by Gerrit Updater [ 10/Dec/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/10406/
Subject: LU-4647 nodemap: add tests to sanity-sec for nodemap mapping
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 50f95dd6e5159981f6b950d2fab674955442603b

Comment by Gerrit Updater [ 11/Dec/14 ]

Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/13028
Subject: LU-4647 tests: enable sanity-sec for DNE mode
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 44d7be42028c31c49c9929053ea77adae3abde8e

Comment by Gerrit Updater [ 12/Jan/15 ]

Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: http://review.whamcloud.com/13343
Subject: LU-4647 tests: modify sanity-sec to test multiple MDSes
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e2de239ed18bd9a346e5c4deb1e2762f6d6b07d0

Comment by Jodi Levi (Inactive) [ 12/Jan/15 ]

Reopening based on comments and new patches

Comment by Gerrit Updater [ 10/Feb/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13478/
Subject: LU-4647 lctl: add nodemap man pages to lctl
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e477f21ed67bfb76aba2b7cede8f62cc0cbd2ff7

Comment by Gerrit Updater [ 29/Mar/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13343/
Subject: LU-4647 tests: modify sanity-sec to test multiple MDSes
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e62ce6e1252b33b37130556f31ceb22e8410dfcb

Comment by Gerrit Updater [ 11/May/15 ]

Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/14769
Subject: LU-4647 tests: clean up sanity-sec code style issues
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d4240b487f7b16ac69f46452192bffdc475d6aae

Comment by Gerrit Updater [ 26/May/15 ]

Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/14933
Subject: LU-4647 tests: properly cleanup after test failure
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: af43e0b4c60f7e7d1ab7202bfab66785fe6edd52

Comment by Gerrit Updater [ 28/May/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14933/
Subject: LU-4647 tests: properly cleanup after test failure
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c19992eb6809170acf885f1895fec628982b05ad

Comment by Gerrit Updater [ 28/Aug/15 ]

Andreas Dilger (andreas.dilger@intel.com) merged in patch http://review.whamcloud.com/14769/
Subject: LU-4647 tests: clean up sanity-sec code style issues
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4fab3b2dfd4225f096e9a38ac14bcf61c41a81d4

Comment by Peter Jones [ 28/Aug/15 ]

Landed for 2.8

Generated at Sat Feb 10 01:44:37 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.