Bug 1595583 - Number of instances shows one more than actual value in Networks>subnets
Summary: Number of instances shows one more than actual value in Networks>subnets
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.0
Assignee: Keenan Brock
QA Contact: Ido Ovadia
Depends On:
Blocks: 1595269
TreeView+ depends on / blocked
Reported: 2018-06-27 07:55 UTC by Niladri Roy
Modified: 2019-02-07 23:03 UTC (History)
13 users (show)

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

Attachments (Terms of Use)

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

Description Niladri Roy 2018-06-27 07:55:38 UTC
Description of problem:
In the Networks> Subnets view, for openstack provider subnets, the number of instances show one more than actual value. for example, if the number of instances is 2 for that subnet, it would show 3

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Go to Networks > Subnets 
2. Notice the number of instances would be one more than the value shown in Networks > Networks

Actual results:
Number of instances shows 1 more than actual value

Expected results:
Number of instances should be shown accurately

Additional info:

Comment 4 Gilles Dubreuil 2018-06-28 13:03:36 UTC
Hi Niladri,

To clarify the description of the issue, the number of subnets shown in CloudForms (Network -> Subnet) is more than the number of subnets visible in OpenStack. Is that correct? 

Are undercloud (director - infra) and overcloud defined in CF? In which case any network and subnet defined in the undercloud are also added to the list of visible items in the Cloud Network and Cloud Subnet pages. So by default that makes +1 network and +1 subnet.


Comment 7 Gilles Dubreuil 2018-06-29 03:20:46 UTC
I confirm the total number of instances displayed in the "Cloud Subnet" summary page is wrong. The total has one more count than it should.   

The right value is actually available on each subnet detail by clicking on a specific subnet. That could be used as a workaround for now.

This issue can be reproduced on master/HEAD branch where it would have to be fixed before being back ported to current version.

Comment 11 CFME Bot 2018-07-10 15:41:31 UTC
New commit detected on ManageIQ/manageiq/master:

commit f0a3dd571bf4fa71e68e5a7b174f93b8d497a459
Author:     Keenan Brock <keenan@thebrocks.net>
AuthorDate: Mon Jul  9 16:41:51 2018 -0400
Commit:     Keenan Brock <keenan@thebrocks.net>
CommitDate: Mon Jul  9 16:41:51 2018 -0400

    Network Subnet total_vms work correctly


    CloudSubnet#total_vms does not use distinct for the count
    CloudNetwork#total_vms does

    after: both use distinct (since it is going :through a has_many

 app/models/cloud_subnet.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 12 Keenan Brock 2018-07-10 16:02:31 UTC
Hi Prasad,

That patch fixes the problems: https://github.com/ManageIQ/manageiq/pull/17683
Leaving as ON_DEV until a build is made


Comment 13 Ido Ovadia 2018-08-14 15:04:19 UTC

Comment 14 errata-xmlrpc 2019-02-07 23:03:14 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.


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