Closed cmoussa1 closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.34%. Comparing base (
283126a
) to head (1374786
). Report is 12 commits behind head on master.
Thanks for reviewing @grondo - I'll set MWP here so I can get this landed in time for some testing
Problem
The instance owner cannot run jobs when the priority plugin is loaded because they are not a part of the flux-accounting database. flux-accounting should be able to handle this automatically so that administrators do not have to manually add instance owner information.
This PR sends instance owner information to the priority plugin along with the rest of the flux-accounting DB information during an accounting update. It leverages Flux's
handle.attr_get("security.owner")
to get the uid and corresponding username of the instance owner. Once retrieved, it is sent and stored by the plugin, which will allow the instance owner to submit jobs with the plugin loaded. I set the limits values very high for the instance owner, but just gave it a default fair-share value of 0.5. I am definitely open to making this value higher, however.I had to adjust a few of the existing sharness tests that created users with conflicting uid's as the instance owner in the testsuite, so the second commit in this PR is just some cleanup and adjusting of some of those tests to use a different uid. I also refined a couple of the tests that use
jq
to search for key-value pairs by first callingselect()
with a uid instead of manually indexing the JSON object.Finally, I added a short set of tests that loads the plugin and and submits a job as the instance owner and makes sure it receives a priority.
Fixes #476