Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 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: CLOSED WORKSFORME QA Contact: Shweta Singh <shwsingh>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.14.0CC: ahumbe, lstejska, nalfassi, rlavi
Target Milestone: UnspecifiedKeywords: Regression
Target Release: UnusedFlags: rlavi: needinfo?
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: 2023-10-31 11:36:18 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 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

Comment 3 Leos Stejskal 2023-08-28 07:00:25 UTC

Hi, I tried reproducing it on stream with RHEL 9 machine and it works fine.
My steps:

1) Spin up the new RHEL 9 VM
2) Register the VM
3) Run subscription-manager clean
4) Add new UUID to the /etc/rhsm/facts/uuid.facts
5) Register the VM again

No error, the machine registered successfully.

Registration command:
curl -sS --insecure 'http://centos8-katello-devel-stable.example.com/register?activation_keys=rhel9&location_id=2&organization_id=1&update_packages=false' -H 'Authorization: Bearer ...' | bash

I should mention that the value from uuid.facts file is completely ignored,
the UUID from the subscription manager after the registration differs from the one I set in the uuid.facts.

Comment 4 Shweta Singh 2023-10-31 09:48:00 UTC
Hi Leos! I tested this again on stream snap and this issue is no longer reproducible. We are good to close this issue.

Comment 5 Leos Stejskal 2023-10-31 11:36:18 UTC
Okay, closing the BZ.