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

Fix TenantCapacity usage #2184

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

allanrogerr
Copy link
Contributor

@allanrogerr allanrogerr commented Jun 25, 2024

Issue

The current usage of the TenantCapacity component works on the formula capacity_usage/capacity_raw.
capacity_usage is the sum of all the used space on all disks as calculated by the madmin.AdminClient.StorageInfo function
capacity_raw is the sum of all the PVC capacities on each volume on each server.

Since capacity_usage can be greater that capacity_raw, the resulting TenantCapacity component will show 100% usage, visually showing the tenant as out of storage.

Fix

A better comparison would be capacity_usage/(capacity+capacity_usage) where capacity is the sum of all the available space on all disks as calculated by the madmin.AdminClient.StorageInfo function.

Test

Create a MinIO operator tenant.
Create and populate a bucket.
Observe the TenantCapacity component correctly indicate the proportion of usage of the available storage; and not exceed 100% while approaching it.

Copy link
Contributor

@shtripat shtripat left a comment

Choose a reason for hiding this comment

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

LGTM. Verified.
May be a new PR to fix text version of Usable Capacity
Screenshot from 2024-06-26 14-57-51

@harshavardhana harshavardhana merged commit 52137a2 into minio:master Jun 26, 2024
31 checks passed
@ramondeklein
Copy link
Contributor

@allanrogerr Does this also need to be fixed in Enterprise console?

@allanrogerr
Copy link
Contributor Author

@allanrogerr Does this also need to be fixed in Enterprise console?

Yes. I will also add release notes.

@allanrogerr allanrogerr self-assigned this Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants