Bug 2229112

Summary: Host Registration takes 2 attempt after changing dmi_uuid of the Satellite
Product: Red Hat Satellite Reporter: Shweta Singh <shwsingh>
Component: RegistrationAssignee: Leos Stejskal <lstejska>
Status: NEW --- QA Contact: Shweta Singh <shwsingh>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.14.0CC: lstejska, nalfassi
Target Milestone: UnspecifiedKeywords: Regression
Target Release: UnusedFlags: shwsingh: needinfo? (lstejska)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Shweta Singh 2023-08-04 08:30:11 UTC
Description of problem:
Host registration takes 2 attempt using the same curl command after dmi_uuid of the satellite is changed.


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

How reproducible:
Always

Steps to Reproduce:
1.Create a custom dmi_uuid of the satellite and update it in /etc/rhsm/facts/uuid.facts
2.Register a host with satellite, it should be registered successfully.
3.Run "subscription-manager clean" on Satellite.
4.Create another custom dmi_uuid and and update it in /etc/rhsm/facts/uuid.facts.
5.Again try to register the host.

Actual results:
The registration fails while trying Step5 but when same curl command runs again, registration is successful.

"yum-config-manager --enable <repo>\nHTTP error (422 - Unknown)" is observed when registration fails.

Expected results:
Registration should be successful in the first attempt only.

Additional info:

Comment 1 Leos Stejskal 2023-08-07 08:51:18 UTC
Hi,
I'm not able to reproduce the issue on RHEL 9

My steps:

1) Register host (curl -sS --insecure 'https://sat-stream.example.com/register?activation_keys=rhel9&location_id=2&organization_id=1&update_packages=false')
2) subscription-manager unregister
// Here I want to mention that host stays in the Satellite. I thought that it should be also removed from the Satellite

3) echo "A4975AAF-AAAA-4713-AD55-49B23DAED77B" >> /etc/rhsm/facts/uuid.facts
4) Register the host with the same command

Host is successfully registered to the Satellite