yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07506
[Bug 1243796] Re: charting of meters for all resource types other than instance is broken when not grouped by project
** Changed in: horizon/havana
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1243796
Title:
charting of meters for all resource types other than instance is
broken when not grouped by project
Status in OpenStack Dashboard (Horizon):
Fix Released
Status in OpenStack Dashboard (Horizon) havana series:
Fix Released
Bug description:
The 'Group by' dropdown on the Stats tab of the admin/Resource Usage
panel allows the statistics to be grouped by either Project or '--'.
From the code, it seems the intent of the '--' option is to group by
resource ID, as opposed to project ID.
This works as expected for the Compute (Nova) meters, but is broken
for all the meters associated with any other resource type (glance
images, swift objects, etc.)
This is because the strategy used to query statistics by resource is
to first find all the resources of the relevant type, then iterate
over the resources separately querying for the statistics associated
with the meter in question for each individual resource.
The problem is that this initial query to discover the relevant
resources is hard-coded in the group-by resource case to only ever
identify instances:
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/admin/metering/views.py#L124
As a result, the panel attempts to retrieve statistics for non-
instance meters (e.g. 'image.download' or 'storage.objects')
constrained to a resource ID associated with an instance. All of those
queries are guaranteed never to yield any data.
Instead, this iterative strategy should be replaced with a *single*
statistics query with the 'groupby=resource_id' param set.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1243796/+subscriptions