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.
New commit detected on ManageIQ/manageiq-providers-openstack/master:
Author: Scott Seago <email@example.com>
AuthorDate: Thu Apr 19 13:26:24 2018 -0400
Commit: Scott Seago <firstname.lastname@example.org>
CommitDate: Thu Apr 19 13:26:24 2018 -0400
Bug 1506987: per_volume_gigabytes_used definition is missing
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
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 18.104.22.168
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.