Description of problem: Login to CloudForms and select "Optimize" -> "Utilization", and then the "Details" report, all of the chart data points are either "0Mhz" (trend of CPU used), "0B" (trend of RAM used) or "0B" (trend of used disk space). Having C&U collection for the region set to "Collect for all clusters" and "Collect for all datastores". In addition, already verified that all instances are reporting CPU, RAM and Disk IO metrics via OSP Gnocchi, and this is visible in the CFME UI. Version-Release number of selected component (if applicable): CFME 5.7.1.3 OSP 10 with Gnocchi configured for metrics collection How reproducible: See below Steps to Reproduce: 1. Add OSP 10 provider to CFME 2. Setup metrics collection from CFME as well as OSP10 side 3. Check metrics info is available from instance level 4. Navigate to "Optimize" -> "Utilization" UI for region level report. Actual results: No data available Expected results: Corresponding date is reported Additional info: Had a check with CFME 4.8.0, having same issue.
After some debugging with GreggT, we found that the UI code is intentionally not showing cloud environments in the Optimize -> Utilization tree. The commit that "removed" ems_clouds: https://github.com/ManageIQ/manageiq/commit/182f1a4e7a2db48e6882b9d5a1506d1d517b2c49 https://bugzilla.redhat.com/show_bug.cgi?id=985562 From that BZ "Filter out cloud providers from the Optimize trees" "Since we don't have that capability for cloud providers (EC2 and OpenStack) we should not present those providers in the trees for selection." Undoing much of that commit brings back the missing ems_clouds such as openstack, azure, etc. diff --git a/app/presenters/tree_builder_region.rb b/app/presenters/tree_builder_region.rb index bcd44550a..47b92f87a 100644 --- a/app/presenters/tree_builder_region.rb +++ b/app/presenters/tree_builder_region.rb @@ -21,11 +21,7 @@ class TreeBuilderRegion < TreeBuilder end def x_get_tree_region_kids(object, count_only) - emstype = if [:bottlenecks, :utilization].include?(@type) - object.ems_infras - else - object.ext_management_systems - end + emstype = object.ext_management_systems emses = Rbac.filtered(emstype) storages = Rbac.filtered(object.storages) if count_only @@ -53,7 +49,7 @@ class TreeBuilderRegion < TreeBuilder id = from_cid(nodes.last.split('-').last) if object_ems?(nodes, object) rec = MiqRegion.find_by_id(id) - objects = rbac_filtered_sorted_objects(rec.ems_infras, "name") + objects = rbac_filtered_sorted_objects(rec.ext_management_systems, "name") count_only_or_objects(count_only, objects) elsif object_ds?(nodes, object) rec = MiqRegion.find_by_id(id)
Created attachment 1336209 [details] screenshots
Loic, I don't understand. This was a feature asked for back in 2013. It seems like the feature is now invalid and we need to reimplement it correctly. > So, you must add Director as > an infra provider. Are you saying that the user needs to create the openstack director manually as an infra provider to make this work? Or, are you saying, that we as developers are failing to add this correctly as an infra provider? Is the whole utilization tab relevant for all infra providers and openstack infra? Is it just some specific areas of utilization? Can we go back to showing all of the management systems and show no data for the cloudy environments that don't collect the relevant data? Filtering it out in the tree builder code seems like a bad idea. We should offer all providers we know about and allow the user to filter them. What do you think?
(In reply to Joe Rafaniello from comment #30) > Loic, I don't understand. This was a feature asked for back in 2013. It > seems like the feature is now invalid and we need to reimplement it > correctly. > > > So, you must add Director as > > an infra provider. > > Are you saying that the user needs to create the openstack director manually > as an infra provider to make this work? Or, are you saying, that we as > developers are failing to add this correctly as an infra provider? > > Is the whole utilization tab relevant for all infra providers and openstack > infra? > Is it just some specific areas of utilization? > > Can we go back to showing all of the management systems and show no data for > the cloudy environments that don't collect the relevant data? Filtering it > out in the tree builder code seems like a bad idea. We should offer all > providers we know about and allow the user to filter them. > > What do you think? OpenStack Director is part of the Infra Provider options, it is already there. You can add OpenStack Director today like you will add Vmware. Then CF will collect metrics for Clusters and Hosts.. in CF 4.2, we validated/Corrected that OpenStack Director is showing in Optimize>utilisation.. It seems in 4.5, it seems there is an issue because In our demo lab, we see only one Provider which is RHEV, we don't see anything else Vmware, OpenStack Director are not there...
https://github.com/ManageIQ/manageiq/pull/16178
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/cb3cb72d336ade55203056436cdb7a0850d9807a commit cb3cb72d336ade55203056436cdb7a0850d9807a Author: Gregg Tanzillo <gtanzill> AuthorDate: Wed Oct 11 17:17:18 2017 -0400 Commit: Gregg Tanzillo <gtanzill> CommitDate: Fri Oct 13 06:58:21 2017 -0400 Ensure that `base_class` of first target is used for RBAC scope When targets are passed and the instances are of different subclasses through STI, the base class needs to be used for building the scope to prevent ActiveRecord from also scoping to the subclass and limiting the results to only instances of that class. https://bugzilla.redhat.com/show_bug.cgi?id=1480812 https://bugzilla.redhat.com/show_bug.cgi?id=1467756 lib/rbac/filterer.rb | 5 +++++ spec/lib/rbac/filterer_spec.rb | 43 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-)
Note, the code change for this BZ only fixes that fact that a single ems_infra class were being displayed, such as seeing only rhev, and not openstack infra, vmware, etc. This BZ does not change the fact that we only show virtual infrastructure providers in the optimize/utilization. We still "assume" that cloud environments will not have the metrics data to be relevant in these screens.
(In reply to Joe Rafaniello from comment #34) > Note, the code change for this BZ only fixes that fact that a single > ems_infra class were being displayed, such as seeing only rhev, and not > openstack infra, vmware, etc. > > This BZ does not change the fact that we only show virtual infrastructure > providers in the optimize/utilization. We still "assume" that cloud > environments will not have the metrics data to be relevant in these screens. Yes, that is make sense