Description of problem: reports of the count of vms by cloud tenant are off for openstack providers Version-Release number of selected component (if applicable): 5.8.1.5 How reproducible: customer environemnt Steps to Reproduce: 1.create an openstack provider with multiple cloud tenants 2.attach to cloudforms 3.generate reports on the numbers of vms in the providers 4. generate reports on the number of vms per cloud tenant Actual results: the number of total vms on by cloud tenant is way above the number of vms in the provider Expected results: the numbers add up Additional info:
Ah, I think I've reproduced this issue; note that the UI displays the numbers correctly, but the report number is off. Is this your experience as well?
Okay, I think I've tracked down the source of the issue. It has to do with the way the CloudTenant model defines total_vms: https://github.com/ManageIQ/manageiq/blob/master/app/models/cloud_tenant.rb#L34 If you call total_vms in ruby, then it'll produce the desired outcome: it goes through the Vm model and filter out templates (images). However, I think that ruport may look directly at the vms *table*, as in my testing the incorrect number corresponds to vms + templates. I verified this by adding an additional image to a tenant. After I did so, the incorrect number incremented by one. Note that this behavior also occurs with cloud provider vm counts. However, the network manager vm counts are correct, and I think that may be because the network manager has additional code around total_vms.
One added note: I reproduced this issue through a custom report that selected Cloud Tenant as the source and used the Total Vms field.
Created attachment 1452943 [details] Cloud Tenants
Created attachment 1452944 [details] Cloud Report
Created attachment 1452945 [details] Report results
Checked at CFME 5.10 Description of problem: Cloud reports shows the same number of the cloud Instances to the all Tenants Steps to Reproduce: 1.Create an Openstack provider with multiple cloud tenants (attachment: Cloud Tenants) 2.Attach to the Cloudforms 3.Generate report for Cloud Provider: Total Vms,Cloud Tenants Name (attachment: Cloud Report) 4. Run report Actual results: Report shows 4 Vms for all tenants (attachment: Report_results) Expected results: Report shows 4 Vms for admin tenant and 0 for Project1 and Project2
Verified on CFME 5.10.0.12
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