Skip to content

Conversation

@onnozweers
Copy link
Contributor

Fixes #104

With --whoami, ada will check whether the user has any quota
(on their UID and on their main GID). If they have, the
disk & tape quotas are shown, including percentages.

If the API returns 404 for both UID and GID quota, it means
quotas have not been set, so Ada does not show anything.

If the API returns other error messages, Ada will show them.

I'm thinking of implementing a `ada --quota` command which
shows all quotas, not only the user's own. That would be a next commit.
Added a check if bash is new enough for arrays;
if not, a warning is printed
@onnozweers onnozweers requested a review from hailihu August 11, 2025 11:40
@onnozweers onnozweers added the enhancement New feature or request label Aug 11, 2025
@onnozweers onnozweers linked an issue Aug 11, 2025 that may be closed by this pull request
@onnozweers
Copy link
Contributor Author

% ada/ada --quota all 
Quota:       custodial (tape)  custodialLimit         %     replica (disk)  replicaLimit           %
USER:31029   5,124,339,119     1,000,000,000,000,000  0.0%  1,073,742,937   10,000,000,000         10.7%
GROUP:31040  5,124,338,950     null                   -     1,073,742,937   1,000,000,000,000      0.1%
GROUP:40304  0                 null                   -     0               1,000,000,000,000,000  0%

Copy link
Contributor

@hailihu hailihu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We could a unit/integration test, but not sure what makes sense. The results will differ per user who runs the tests.

```
% ../SpiderScripts/ada/ada --quota own
You do not have any quota set on your user ID or primary group ID.

(git branch: 104-support-quota)
% ../SpiderScripts/ada/ada --quota all
Quota:       custodial (tape)  custodialLimit         %     replica (disk)  replicaLimit           %
USER:31029   5,124,339,119     1,000,000,000,000,000  0.0%  1,073,742,937   10,000,000,000         10.7%
GROUP:31040  5,124,338,950     null                   -     1,073,742,937   1,000,000,000,000      0.1%
GROUP:40304  0                 null                   -     0               1,000,000,000,000,000  0%
```
@hailihu hailihu merged commit 44e1f34 into master Sep 2, 2025
1 check passed
@hailihu hailihu deleted the 104-support-quota branch September 9, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support quota

3 participants