Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noobaa/Quota: Provide correct error message #8668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aspandey
Copy link
Contributor

@aspandey aspandey commented Jan 9, 2025

When we exceed the object quota for a bucket,
we should provide an error message which can
convey the clear problem.

https://issues.redhat.com/browse/DFBUGS-242

Testing -
1 - Create noobaa bucket
nb bucket create test.bucket
2 - Set object quota on test.bucket
nb bucket update test.bucket --max-objects=1
3 - Copy one object on this bucket
s3 cp ../test.file s3://test.bucket

4 - Check status of bucket -
date; nb bucket status test.bucket
You might see that everything is fine. At this point you can upload more object but there will not be any issue.
It is because the number of objects has not been update on database.

Keep checking the status. After 2 minutes or so, you will see following status -
Bucket status:
Bucket : test.bucket
Type : REGULAR
Mode : EXCEEDING_QUOTA
ResiliencyStatus : OPTIMAL
QuotaStatus : EXCEEDING_QUOTA
Num Objects : 1
Data Size : 32.620 KB
Data Size Reduced : 11.995 KB
Data Space Avail : 6.243 GB
Num Objects Avail : 0

After this any more object upload will fail.
s3 cp ../system.go s3://test.bucket

You will see following error message -
upload failed: ../test.file to s3://test.bucket/test.file An error occurred (ObjectQuotaExceeded) when calling the PutObject operation: Object quota exceeded for the bucket.

When we exceed the object quota for a bucket,
we should provide an error message which can
convey the clear problem.

https://issues.redhat.com/browse/DFBUGS-242

Signed-off-by: Ashish Pandey <[email protected]>
@aspandey aspandey force-pushed the object-quota-issue branch from 64f65f2 to 9ba2dcf Compare January 9, 2025 07:36
@aspandey aspandey requested a review from dannyzaken January 9, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant