Hey Marek, it looks like we're using the quota limit not the actual usage here. Does it make sense to have e.g. per_volume_gigabytes be the usage and add a per_volume_gigabytes_limit which is the limit?
As it turns out, the speculation in the comments above was incorrect. The -1 reported is not the quota limit, although it happens to be the same value. -1 is indeed the default limit for the per_volume_gigabytes parameter, meaning "there is no limit", but -1 is *also* the value reported by MIQ for current resource usage when the method for retrieving the current usage for a given resource is not defined. In this case, the "per_volume_gigabytes_used" method did not exist in the class ManageIQ::Providers::Openstack::CloudManager::CloudResourceQuota. The fix is to add this method. For the total gigabytes_used method, the value returned is the sum of the sizes of all cloud volumes for the tenant. For per_volume_gigabytes_used, the value will be the size of the largest cloud volume for the tenant.
https://github.com/ManageIQ/manageiq-providers-openstack/pull/276
New commit detected on ManageIQ/manageiq-providers-openstack/master: https://github.com/ManageIQ/manageiq-providers-openstack/commit/6601f8b760a3e6e0e3c9e7f8f9eb8d3603ffe0aa commit 6601f8b760a3e6e0e3c9e7f8f9eb8d3603ffe0aa Author: Scott Seago <sseago> AuthorDate: Thu Apr 19 13:26:24 2018 -0400 Commit: Scott Seago <sseago> CommitDate: Thu Apr 19 13:26:24 2018 -0400 Bug 1506987: per_volume_gigabytes_used definition is missing https://bugzilla.redhat.com/show_bug.cgi?id=1506987 For cloud resource quota reporting, per_volume_gigabytes_used is missing, causing -1 to be shown instead of a real value. The per_volume_gigabytes quota parameter is not a true quota limit, since it's not an aggregate across volumes but a per-volume limit. However, since OpenStack defines it as a quota param along with the aggregate values, MIQ treats it in the same way as the other parameters. In this case, we're reporting the size of the largest volume, since the limit is a per-volume limit rather than an aggregate one. app/models/manageiq/providers/openstack/cloud_manager/cloud_resource_quota.rb | 6 + 1 file changed, 6 insertions(+)
Verified on CFME 5.10.0.3
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:0212