Bug 1494589 - reports of the count of vms by cloud tenant are off (openstack)
Summary: reports of the count of vms by cloud tenant are off (openstack)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.8.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.10.0
Assignee: Libor Pichler
QA Contact: Danylo Kholodov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-22 14:58 UTC by Felix Dewaleyne
Modified: 2019-02-07 23:02 UTC (History)
8 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:02:46 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:


Attachments (Terms of Use)
Cloud Tenants (74.76 KB, image/png)
2018-06-19 13:21 UTC, Danylo Kholodov
no flags Details
Cloud Report (153.73 KB, image/png)
2018-06-19 13:23 UTC, Danylo Kholodov
no flags Details
Report results (82.97 KB, image/png)
2018-06-19 13:24 UTC, Danylo Kholodov
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 None None None 2019-02-07 23:02:54 UTC

Description Felix Dewaleyne 2017-09-22 14:58:31 UTC
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:

Comment 4 Tzu-Mainn Chen 2017-10-09 15:42:50 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?

Comment 5 Tzu-Mainn Chen 2017-10-10 13:52:44 UTC
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.

Comment 6 Tzu-Mainn Chen 2017-10-10 13:54:09 UTC
One added note: I reproduced this issue through a custom report that selected Cloud Tenant as the source and used the Total Vms field.

Comment 9 Danylo Kholodov 2018-06-19 13:21:19 UTC
Created attachment 1452943 [details]
Cloud Tenants

Comment 10 Danylo Kholodov 2018-06-19 13:23:19 UTC
Created attachment 1452944 [details]
Cloud Report

Comment 11 Danylo Kholodov 2018-06-19 13:24:02 UTC
Created attachment 1452945 [details]
Report results

Comment 12 Danylo Kholodov 2018-06-19 13:27:08 UTC
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

Comment 14 Danylo Kholodov 2018-08-28 14:42:26 UTC
Verified on CFME 5.10.0.12

Comment 15 errata-xmlrpc 2019-02-07 23:02:46 UTC
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


Note You need to log in before you can comment on or make changes to this bug.