Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1824183 - Virtual host get counted as physical hosts on cloud.redhat.com
Summary: Virtual host get counted as physical hosts on cloud.redhat.com
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.6.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: 6.8.0
Assignee: Ron Lavi
QA Contact: Mirek Długosz
URL:
Whiteboard:
: 1862259 (view as bug list)
Depends On:
Blocks: 1824308
TreeView+ depends on / blocked
 
Reported: 2020-04-15 13:54 UTC by Parag Kamble
Modified: 2020-10-27 13:01 UTC (History)
7 users (show)

Fixed In Version: tfm-rubygem-foreman_rh_cloud-1.0.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1824308 1862259 (view as bug list)
Environment:
Last Closed: 2020-10-27 13:01:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
CPU Socket graph (41.71 KB, image/png)
2020-04-15 13:54 UTC, Parag Kamble
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman_rh_cloud pull 171 0 None closed BZ 1824183 - add infrastructure_type field to system_profile 2021-01-06 21:05:40 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:01:50 UTC

Description Parag Kamble 2020-04-15 13:54:56 UTC
Created attachment 1679068 [details]
CPU Socket graph

Description of problem:
When satellite inventory is uploaded to cloud all virtual hosts in the inventory is get counted in physical host and virtual hosts count remains zero. 

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

Satellite Version : 6.6.3

How reproducible:


Steps to Reproduce:
1. attach some virtual and some physical hosts to satellite (2 physical and 2 virtual hosts).
2. upload inventory data to the cloud. 
3. verify host inventory is get updated correctly specially count GET api/inventory/v1/hosts.
4. verify CPU socket usage graph there should be correct physical and virtual count but after observation there is no virtual hosts get added and all host are considered as physical. 

Actual results:
4 sockets from physical hosts and 2 sockets for virtual hosts should have added


Expected results:
6 socket  has added in Physical hosts

Additional info:

Virtual hosts facts:

[root@kvm-04-guest10 ~]#  subscription-manager facts | grep -i is_guest
virt.is_guest: True

[root@kvm-04-guest10 ~]# hostname
kvm-04-guest10.hv2.lab.eng.bos.redhat.com


Yupana results doesn't include IS_VIRTUAL flag.

{

    "display_name":"kvm-04-guest10.hv2.lab.eng.bos.redhat.com",
    "fqdn":"kvm-04-guest10.hv2.lab.eng.bos.redhat.com",
    "account":"6291899",
    "subscription_manager_id":"9ccb5d75-a366-4469-908e-6574e9756960",
    "satellite_id":"9ccb5d75-a366-4469-908e-6574e9756960",
    "bios_uuid":"e0322ea1-0ebb-4866-a842-7c9bdcfe1e84",
    "vm_uuid":"e0322ea1-0ebb-4866-a842-7c9bdcfe1e84",
    "ip_addresses":[
        "10.16.56.77"
    ],
    "mac_addresses":[
        "52:54:00:50:04:10"
    ],
    "system_profile":{
        "number_of_cpus":1,
        "number_of_sockets":1,
        "cores_per_socket":1,
        "system_memory_bytes":3973660672,
        "network_interfaces":[
            {
                "ipv4_addresses":[
                    "10.16.56.77"
                ],
                "ipv6_addresses":[
                ],
                "mac_address":"52:54:00:50:04:10",
                "name":"eth0"
            }
        ],
        "bios_vendor":"Seabios",
        "bios_version":"0.5.1",
        "bios_release_date":"01/01/2011",
        "cpu_flags":[],
        "os_release":"Red Hat Enterprise Linux Server",
        "os_kernel_version":"3.10.0-1062.el7.x86_64",
        "arch":"x86_64",
        "subscription_status":"Fully entitled",
        "katello_agent_running":false,
        "satellite_managed":true,
        "installed_products":[
            {
                "name":"Red Hat Enterprise Linux Server",
                "id":"69"
            }
        ],
        "installed_packages":[]
    },
    "facts":[
        {
            "namespace":"satellite",
            "facts":{
                "satellite_version":"6.6.3",
                "system_purpose_usage":"",
                "system_purpose_role":"",
                "distribution_version":"7.7",
                "organization_id":1
            }
        }
    ],
    "tags":[
        {
            "namespace":"satellite",
            "key":"organization_id",
            "value":"1"
        }
    ]

},

Comment 3 Kevin Howell 2020-04-15 19:13:11 UTC
System profile's "infrastructure_type" field should be reported as "virtual" or "physical" based on the virt.is_guest fact. Without this change, the overall total can still be accurate (with a tally workaround), but physical/virtual counts will be inaccurate.

Regardless, there are a couple of tally changes that need to be implemented; I will clone this card to component Subscription Watch" for that purpose.

Comment 4 Kevin Howell 2020-04-15 19:32:49 UTC
> Without this change, the overall total can still be accurate (with a tally workaround), but physical/virtual counts will be inaccurate.

I considered the workaround (which would be to use hypervisor-guest mappings to infer whether a system is virtual), but it's insufficient to make the total completely accurate, as it doesn't correctly identify guests where for some reason the hypervisor-guest mappings are not reported, so I think it's better to go ahead and pursue a full solution as described in comment 3 (set infrastructure_type).

Comment 7 Mirek Długosz 2020-06-18 13:07:01 UTC
Verified that "infrastructure_type" field is present in report json, with values "physical" and "virtual". Value is decided based on "virt::is_guest" value.
Only Satellite-side changes were verified. I believe subscription watch QE team verified cloud.rh.com side back when we tested plugin 1.0.6 for Satellite 6.7.1 release.

Tested on:
Satellite 6.8.0 snap 5
pulp-server-2.21.2-1.el7sat.noarch
satellite-6.8.0-0.4.beta.el7sat.noarch
foreman-2.1.0-0.20.rc2.el7sat.noarch
katello-3.16.0-0.3.rc1.el7sat.noarch
tfm-rubygem-foreman_rh_cloud-2.0.7-1.el7sat.noarch

Comment 8 James Jeffers 2020-08-03 14:50:18 UTC
*** Bug 1862259 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2020-10-27 13:01:20 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 (Important: Satellite 6.8 release), 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-2020:4366


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