Bug 1506987 - Incorrect display of "Cloud Resource Quotas: Used"
Summary: Incorrect display of "Cloud Resource Quotas: Used"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: GA
: 5.10.0
Assignee: Scott Seago
QA Contact: Danylo Kholodov
URL:
Whiteboard:
Depends On:
Blocks: 1480288
TreeView+ depends on / blocked
 
Reported: 2017-10-27 10:54 UTC by Gellert Kis
Modified: 2021-03-11 16:07 UTC (History)
14 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:00:32 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 0 None None None 2019-02-07 23:00:38 UTC

Comment 7 Adam Grare 2017-12-18 20:50:35 UTC
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?

Comment 10 Scott Seago 2018-04-19 17:36:41 UTC
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.

Comment 12 CFME Bot 2018-04-19 19:04:34 UTC
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(+)

Comment 13 Danylo Kholodov 2018-07-11 11:59:31 UTC
Verified on CFME 5.10.0.3

Comment 14 errata-xmlrpc 2019-02-07 23:00:32 UTC
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


Note You need to log in before you can comment on or make changes to this bug.