charting of meters for all resource types other than instance is broken when not grouped by project
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
High
|
Ladislav Smola | ||
Havana |
Fix Released
|
High
|
Julie Pichon |
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:
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=
tags: | added: metering-ui |
tags: | added: havana-backport-potential |
tags: | removed: havana-backport-potential |
Changed in horizon: | |
milestone: | none → icehouse-1 |
tags: | added: havana-backport-potential |
tags: | removed: havana-backport-potential |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | icehouse-1 → 2014.1 |
Oh, the query shouldn't be there. Darn I have been probably testing that on Nova instances and I forgot to make it general.
It should filter the resources according to meter name. (That is the only way I found for resource filtering.)
Will fix this