Bug 1494589
Summary: | reports of the count of vms by cloud tenant are off (openstack) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Felix Dewaleyne <fdewaley> | ||||||||
Component: | Reporting | Assignee: | Libor Pichler <lpichler> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Danylo Kholodov <dkholodo> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | high | ||||||||||
Version: | 5.8.0 | CC: | fdewaley, jhajyahy, jhardy, niroy, obarenbo, simaishi, smallamp, tzumainn | ||||||||
Target Milestone: | GA | ||||||||||
Target Release: | 5.10.0 | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | 5.10.0.0 | Doc Type: | If docs needed, set a value | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2019-02-07 23:02:46 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | Openstack | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Felix Dewaleyne
2017-09-22 14:58:31 UTC
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 |