| Summary: | requesting user information, results (associations) doesn't match 'sacctmgr' | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | Greg Wickham <greg.wickham> |
| Component: | slurmrestd | Assignee: | Marshall Garey <marshall> |
| Status: | RESOLVED INFOGIVEN | QA Contact: | |
| Severity: | 4 - Minor Issue | ||
| Priority: | --- | ||
| Version: | 22.05.7 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | KAUST | Alineos Sites: | --- |
| Atos/Eviden Sites: | --- | Confidential Site: | --- |
| Coreweave sites: | --- | Cray Sites: | --- |
| DS9 clusters: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Linux Distro: | --- |
| Machine Name: | CLE Version: | ||
| Version Fixed: | Target Release: | --- | |
| DevPrio: | --- | Emory-Cloud Sites: | --- |
| Attachments: | JSON dump of results from REST query | ||
|
Description
Greg Wickham
2023-04-09 08:01:31 MDT
You're using the user endpoint: > http://slurm:6820/slurmdb/v0.0.37/user/alamaom But calling sacctmgr show assoc (not show user): > $ sacctmgr show assoc user=alamaom format=user,account If you want the association data, then use the association[s] endpoint: https://slurm.schedmd.com/rest_api.html#slurmdbV0038GetAssociation https://slurm.schedmd.com/rest_api.html#slurmdbV0038GetAssociations Does this answer your question? Hi Marshall, Ah! Ok. Thanks. The user endpoint returns associations too thou, which is a bit confusing as it returns both active and deleted associations. -Greg Confirming the /associations endpoint works great - even includes "is_default" which is quite handy. Thanks for letting me know that the associations endpoint works great for you. (In reply to Greg Wickham from comment #3) > The user endpoint returns associations too thou, which is a bit confusing as > it returns both active and deleted associations. I only see active associations. When I delete an association (for example, a user from one of their accounts), and run the user[s] endpoint, I don't see that association for that user anymore. What deleted associations do you see with the users endpoint? Hi Marshall, In the initial example doing a "show assoc" with sacctmgr showed a single association however using the user REST endpoint found deleted associations. (See the attached file). -greg Hi Greg, Sorry for the delayed response. (In reply to Greg Wickham from comment #7) > Hi Marshall, > > In the initial example doing a "show assoc" with sacctmgr showed a single > association however using the user REST endpoint found deleted associations. The reason I could not reproduce this is that I was deleting an association without running jobs in that association, thus removing it from the database instead of just marking it as deleted. https://slurm.schedmd.com/sacctmgr.html#OPT_WithDeleted_1 With that in mind, I reproduced the user endpoint showing deleted associations. Showing deleted associations is actually the default for dbv37, but was changed for dbv38, alongside adding the "with_deleted" query parameter. See these entries in the NEWS file: -- openapi/dbv0.0.38 - set with_deleted to false by default for /user[s]. -- openapi/dbv0.0.38 - add with_deleted input parameter to GET /user[s]. -- openapi/dbv0.0.38 - add deleted flag to /user[s] output. -- openapi/dbv0.0.38 - set with_deleted to false by default for GET /qos. -- openapi/dbv0.0.38 - add with_deleted input to GET /qos. -- openapi/dbv0.0.38 - set with_deleted to false by default for GET /account[s] -- openapi/dbv0.0.38 - add with_deleted input to GET /account[s]. So, this is expected behavior. I'm closing this as infogiven, but don't hesitate to ask if you have more questions. |