Bug 1889520

Summary: Duplicate hostnames in Insights with unique UUIDs.
Product: Red Hat Hybrid Cloud Console (console.redhat.com) Reporter: thegreek <ltiches>
Component: InventoryAssignee: aprice
Status: CLOSED DUPLICATE QA Contact: fstavela
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: agilley, ahumbe, aruzicka, cmarinea, fjansen, jpisciot, khowell, lphiri, peter.vreman, rjerrido, sbhamrah, sghai, sjagtap, tlestach, wpinheir
Target Milestone: ---Keywords: PrioBumpGSS, SubscriptionWatch, Triaged, UserExperience
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-23 14:10:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description thegreek 2020-10-19 20:30:20 UTC
Description of problem:
Subscription Watch is reporting duplicate hosts with unique UUID's. First, when investigating a duplicate hostname, I discovered that a host web page requests that an admin install the insights-client and to register the hosts. The URL to that web page is cloud.redhat.com/insights/inventory/xxxxxxxx-xxxx-xxxx-xxxxxxxxxx?appName=vulnerabilities, it will show the same results if you navigate to patch, or advisory. But,  If I select the other hosts, I will see a list of accurate CVEs, ERRATAs, etc. These duplicate hosts are also displayed here at cloud.redhat.com/insights/vulnerability/systems. Even though the inventory web page filters the duplicate hosts, a user can still navigate to a duplicate's inventory page, if a user searches by its UUID. Also, none of the target hosts have connectivity. They are using Satellite to upload the reports to cloud.redhat.com.


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


How reproducible:

We are not sure. Hosts are duplicated at random. At the moment, 15 of the 19 show duplicates, or more. Somme hostnames are shown three times.


Steps to Reproduce:
1. ./bootstrap -l admin -s sat.example.com -g rhel7 -a rhel7 -o citi -l dallas --rex -P --force --enablerepos=*
2. yum install insights-client
3. insights-client --register

Actual results:

Random duplication of hosts with unique UUIDs.

Expected results:

A single host with accurate data being reported to Satellite and then forwarded to Insights.


Additional info:

Comment 2 thegreek 2020-10-21 16:01:53 UTC
While investing the problem on my personal lab, I discovered that I was able to create duplicate entries in Insights. This was done by following theses steps; mind you, the order is very important:
1)  run the Satellite bootstrap script with the following flags: ./bootstrap -l admin -s sat.example.com -g rhel7 -a rhel7 -o citi -l dallas --rex -P --force --enablerepos=*
2) run the Satellite Insights Inventory Uploader on the Satellite UI
3) run the Satellite bootstrap script with the following flags ./bootstrap -l admin -s sat.example.com -g rhel7 -a rhel7 -o citi -l dallas --rex -P --force --enablerepos=*

Comment 3 Rich Jerrido 2020-10-22 14:43:25 UTC
(In reply to thegreek from comment #2)
> While investing the problem on my personal lab, I discovered that I was able
> to create duplicate entries in Insights. This was done by following theses
> steps; mind you, the order is very important:
> 1)  run the Satellite bootstrap script with the following flags: ./bootstrap
> -l admin -s sat.example.com -g rhel7 -a rhel7 -o citi -l dallas --rex -P
> --force --enablerepos=*
> 2) run the Satellite Insights Inventory Uploader on the Satellite UI
> 3) run the Satellite bootstrap script with the following flags ./bootstrap
> -l admin -s sat.example.com -g rhel7 -a rhel7 -o citi -l dallas --rex -P
> --force --enablerepos=*


Why would you run the bootstrap twice on the same host? You've effectively:


registered the host (with a unique UUID). 
reported it to cloud.redhat.com AND THEN
(re)registered the host with a DIFFERENT, but unique UUID. 

It does not surprise me one bit that you have multiple entries in cloud.redhat.com because these are (for all effective purposes) two separate systems. Registration generates a unique UUID to identify the system. This behavior would also happen regardless of which registration method used (bootstrap or subscription-manager). 

Note: in this workflow, the first host entry is orphaned, and will be automatically culled at c.rh.c after some period of time (I believe it is 30 days). 

Bootstrap isn't idempotent, and by default, it prevents the user from running it twice on the same host. Running --force disables this safety, and (attempts to) unregister the host from Satellite. 

Running --force is intended to migrate a system from one Satellite (6) to another.

Comment 4 thegreek 2020-10-22 15:29:57 UTC
The customers environment had an old satellite server and the client was advised to run that command once with the force flag. While reading over the bash_history of 4 servers that had duplicates, we discovered that they only ran the bootstrap command once. Following that, they ran the insights-client --register command. The insights inventory auto uploader was enabled for the new 6.8 satellite server.

Comment 6 Waldirio M Pinheiro 2020-11-02 21:52:35 UTC
*** Bug 1893456 has been marked as a duplicate of this bug. ***

Comment 15 Red Hat Bugzilla 2023-09-15 00:49:53 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days