Bug 1889520 - Duplicate hostnames in Insights with unique UUIDs. [NEEDINFO]
Summary: Duplicate hostnames in Insights with unique UUIDs.
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.8.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: Mirek Długosz
URL:
Whiteboard:
: 1893456 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-19 20:30 UTC by thegreek
Modified: 2020-12-02 00:58 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
sghai: needinfo? (ltiches)
sjagtap: needinfo? (khowell)


Attachments (Terms of Use)

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. ***


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