Bug 1962253

Summary: Global registration succeeded but throwing error messages when auto-attach is true
Product: Red Hat Satellite Reporter: Gaurav Talreja <gtalreja>
Component: RegistrationAssignee: Leos Stejskal <lstejska>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: ahumbe, lstejska, oezr, okhatavk, vijsingh
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: foreman-3.1.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:32:29 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 Gaurav Talreja 2021-05-19 15:17:10 UTC
Description of problem:
Global registration succeeded but throwing error messages when auto-attach is true, and the content host gets registered on Satellite 6.10 (Intermittently with auto-attach: False)

Version-Release number of selected component (if applicable):
Satellite 6.10 Snap 1.0

How reproducible:
Always

Steps to Reproduce:
1. Create AK with auto-attach: true
2. Navigate to the Register content host page, generate a curl command to register host.
3. Run curl command on RHEL 7.9 host

Actual results:
The content host gets registered but with some errors.

Expected results:
The content host should get registered with No errors.  

Additional info:

The system has been registered with ID: <id>
The registered system name is: <content-host>
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

ERROR: not_found
Host was not found by the subscription UUID: 'attempting', this can happen if the host is registered already, but not to this Foreman

Comment 1 Marek Hulan 2021-07-14 15:12:04 UTC
Are you sure this host wasn't reused for testing, e.g. it was properly unregistered before you tried the new registration? Is the 'attempting' really part of the output or you replaced the UUID with this? I can imagine that auto-attach modifies the stdout of the sub-man identity command we use to find out the UUID from. That's why we'd see "attempting" as a wrong UUID.

Comment 2 Leos Stejskal 2021-07-15 11:42:14 UTC
Hi,
I wasn't able reproduce the issue,
registration with activation key auto_attach: true works fine.
I'm proposing to close the issue as NOT A BUG

Comment 6 Gaurav Talreja 2021-09-20 18:44:55 UTC
Hi Leos/Marek,

Yes, `insights-client` related errors are expected, as I didn't have rhel7-server repos for it, and using custom repos for testing.

I've been trying to reproduce on Snap 19 and was able to reproduce it again.

So to reproduce, I'm reusing the same host across 2 satellite boxes, after using the host on the first satellite, I properly unregister/clean before reusing this host for testing, also deleted the host from Satellite WebUI, also removed the katello-ca-consumer-* package, and while registering the same host to the second host I'm hitting this issue.

I'm not sure if this host remains semi-registered as you mentioned after the first satellite sub-man clean/unsubscribe, what steps do I need to follow for complete unsubscribed? 


Please let me know if you need anything or am I missing something.


Thanks,
Gaurav

Comment 9 Leos Stejskal 2022-01-03 07:44:15 UTC
Hi,
sorry but I do not understand the third point:

> regenerate the command without `the ignore_subman_errors` when the command contains `ignore_subman_errors=false`? 

Whats the value of `the ignore_subman_errors`?

> So it seems parameter ignore_subman_errors is being set true if we set false in step3, is that expected?

No that is not expected, i can confirm that it's a bug.

Comment 10 Leos Stejskal 2022-01-03 07:45:42 UTC
Created redmine issue https://projects.theforeman.org/issues/34206 from this bug

Comment 11 Bryan Kearney 2022-01-05 16:04:20 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34206 has been resolved.

Comment 14 Leos Stejskal 2022-08-30 11:58:55 UTC
Hi Gaurav,
the error messages says:
"Unable to find available subscriptions for all your installed products."

Registration failed (correctly) due to error when installing insights-client,
my guess is that you don't have correct subscriptions and repositories enabled in satellite.

This is not related to the registration feature at all, it's between subscription manager and subscriptions,
there is nothing I can do with it.

Comment 19 errata-xmlrpc 2022-11-16 13:32:29 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.12 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-2022:8506