Skip to content

Missing data in quota REST API response #7836

Open
@nsc-jens

Description

@nsc-jens

dCache 10.2.11
Java 17

I think the REST API for quota has a bug. If I run a request for a project with quota > 0 I get:

curl -X GET "https://view.swestore.se:3880/api/v1/quota/group/7737" -H "accept: application/json"

[
{
"id": 7737,
"type": "GROUP",
"replica": 1214870414994,
"replicaLimit": 214748364800
}
]

This is as expected. But I set the quota to "0" I get an unexpected result:

[
{
"id": 8401,
"type": "GROUP",
"replica": 114046292506
}
]

It does report the usage but it doesn't report the quota size of zero. Perhaps a mixup between "NONE" and 0 somewhere?

We can mitigate this by setting the quota to "1" instead. We use it to implement a "read-delete-only" state for a project which is being decommissioned.

Additionally, a quota request for a project with no quota set reports:

{
"detail": "No such quota exists",
"title": "Not Found",
"status": "404"
}

which I guess is technically correct but could also have been reported as somethings like this without a tough 404 error:

[
{
"id": 8402,
"type": "GROUP",
}
]

But I have no strong opinions about this.

/jens

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions