[LU-17166] add TBF rule for projid Created: 04/Oct/23  Updated: 10/Oct/23

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Andreas Dilger Assignee: Etienne Aujames
Resolution: Unresolved Votes: 0
Labels: easy

Issue Links:
Related
is related to LU-9658 Add QoS for uid and gid in NRS-TBF Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

It appears that there was no rule added for NRS TBF to allow selecting the project ID for an RPC.



 Comments   
Comment by Stephane Thiell [ 05/Oct/23 ]

YES! Would be great to have. We're interested to use this on a system instead of NRS TBF GID.

Comment by Andreas Dilger [ 06/Oct/23 ]

sthiell, contributions are of course welcome. I don't think this would be more than a cargo-cult copying of the uid/gid/jobid functionality that already exists, so likely very low complexity.

Comment by Etienne Aujames [ 08/Oct/23 ]

Hi Andreas,

projid is not in every RPCs (present in mdt_body but for the OSTs this used in quota requests only), so we can use a free field in ptlrpc_body (e.g: pb_padding64_1) to tag the requests and add a new compatibility flag.
And unlike for uid/gid, we can not take the ids of the process because project id is only an attr. I think we can access to the projid via the inode information on the clients: (struct ll_inode_info *) ->lli_projid

Comment by Andreas Dilger [ 09/Oct/23 ]

The struct obdo::o_projid field should be included in almost every OST RPC? I could imagine that there may be cases where it is not set by the client, but that can be fixed in the client.

Comment by Etienne Aujames [ 10/Oct/23 ]

Ok, that should work for ost_io service.
For now, o_projid is set only for write request, but we can modify the client to send it for write and read.
So for now, we could restrict the development to ost_io (that should be easy).
But for ost and mdt services, that should require more work on the client to include projid in the requests.

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