[LU-15548] Interop: sanity-quota test 40b fails with ‘project id expected 2 not 1' Created: 10/Feb/22  Updated: 01/Sep/22  Resolved: 30/Mar/22

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

Type: Bug Priority: Minor
Reporter: James Nunez (Inactive) Assignee: Dongyang Li
Resolution: Fixed Votes: 0
Labels: quota

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

sanity-quota test_40b started failing with ‘project id expected 2 not 1' on January 10, 2022 with 2.14.56.67 servers and 2.14.0 clients with logs at https://testing.whamcloud.com/test_sets/673d6bdc-3a8b-470e-998a-2cfe113ac0a5.

On the same day, we see a filure between 2.14.56.67 servers and 2.12.7 clients with logs at https://testing.whamcloud.com/test_sets/e8909fc4-8359-452e-adf8-2c02d8ae09c6.

Looking at the suite_log, we see

== sanity-quota test 40b: Mv across different project ID ============================================= 05:45:15 (1641793515)
CMD: trevis-48vm4 /usr/sbin/lctl get_param -n version 2>/dev/null
Waiting for local destroys to complete
Creating test directory
CMD: trevis-48vm3,trevis-48vm4 lctl set_param fail_val=0 fail_loc=0
fail_val=0
fail_loc=0
fail_val=0
fail_loc=0
lfs project -sp 1 /mnt/lustre/d40b.sanity-quota/dir1
lfs project -sp 2 /mnt/lustre/d40b.sanity-quota/dir2
 sanity-quota test_40b: @@@@@@ FAIL: project id expected 2 not 1 
  Trace dump:
  = /usr/lib64/lustre/tests/test-framework.sh:6273:error()
  = /usr/lib64/lustre/tests/sanity-quota.sh:3489:test_40b()

There were a few patches that landed to master on January 6 that modify the quota/project id code:
https://review.whamcloud.com/45256 - LU-15097 quota: stop pool_recalc before killing pool
https://review.whamcloud.com/45032 - LU-15031 quota: reseed glbe in qmt_lvbo_udate
https://review.whamcloud.com/43987 - LU-13587 quota: protect qpi in proc
https://review.whamcloud.com/45679 - LU-12056 ldiskfs: add trusted.projid virtual xattr



 Comments   
Comment by Peter Jones [ 11/Feb/22 ]

Dongyang

Does this seem related to LU-12056?

Peter

Comment by Dongyang Li [ 14/Feb/22 ]

LU-12056 added project id xattr as an interface to check and set project id.
on client we will hide the project id xattr if parent has inherit flag set, meaning all the dir/files under parent should inherit the project id from parent.
older client doesn't do the hiding, so if we have 2 dirs dir1 and dir2, having project id 1 and 2, both have inherit flag set,
mv dir1/file to dir2/file will trigger the xattr set on dir2/file, with project id xattr being 1.

So the impact is on the old client, if we are moving a file to a different dir, and the src dir has project id inherit xattr set, then the file will retain the old project id after it's in the dest dir.

Comment by Andreas Dilger [ 07/Mar/22 ]

Should we have a parameter to disable the project xattr exporting to clients, since I think it will be a case of some users will find this helpful, and other users will not. The virtual xattr should probably be disabled by default for clients, but enabled for ldiskfs.

Comment by Gerrit Updater [ 23/Mar/22 ]

"Li Dongyang <dongyangli@ddn.com>" uploaded a new patch: https://review.whamcloud.com/46900
Subject: LU-15548 osd-ldiskfs: hide virtual projid xattr
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 58d18aa4a8382954c5c1b65c7bc8e5cbd08e1112

Comment by Gerrit Updater [ 30/Mar/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46900/
Subject: LU-15548 osd-ldiskfs: hide virtual projid xattr
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ef826db1f43b2849af26491028f4cfc25595faf6

Comment by Peter Jones [ 30/Mar/22 ]

Landed for 2.15

Comment by Gerrit Updater [ 05/Aug/22 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/48151
Subject: LU-15548 tests: skip conf-sanity/131 for older servers
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a901bc0e0b4bf81b25be7680b07f813af0e23a11

Comment by Gerrit Updater [ 01/Sep/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/48151/
Subject: LU-15548 tests: skip conf-sanity/131 for older servers
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ac6528af8dc5961a6331d2b12a9f20a17ac0b605

Generated at Sat Feb 10 03:19:15 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.