Bug 2014251

Summary: Global Registration: Selecting Satellite URL as the proxy fails to register hosts with default config
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: ahumbe, ajambhul, lstejska, mkushwah, pcreech, saydas
Target Milestone: 6.11.0Keywords: Triaged, UserExperience
Target Release: Unused   
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: 2022-07-05 14:30:00 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 Stephen Wadeley 2021-10-14 17:56:39 UTC
Description of problem:

Testing Global Registration on a default install of Satellite with SCA manifest:

When using Global Registration form and selecting the Satellite URL as the proxy, port 9090 is added to the curl command.
This causes hosts to remain in the build state and for subscription status to be invalid.

Setting "--foreman-proxy-template true"  fixes this problem.

By default:
--foreman-proxy-templates     Enable templates feature (current: false)

If --foreman-proxy-registration also enabled --foreman-proxy-templates the user would less likely encounter this problem.

~]# satellite-installer --help | grep foreman-proxy-registration
    --foreman-proxy-registration  Enable Registration feature (current: true)


If you do not select Satellite URL as the proxy, port 9090 is not added and the problem does not occur.

Version-Release number of selected component (if applicable):
Sat6.10 snap 21

How reproducible:
Every time. Tests in:
Bug 1999792 - Unknown subscription status on Satellite webui after successful host registration.

Steps to Reproduce:
1. Default install of Satellite
2. Use Global Registration form and select the Satellite URL as Capsule
3. Run the generated command on the Content Host

Actual results:
Registered Content Host stays in build state.
Subscription Status   Unknown subscription status

Expected results:
Host not in build state
Subscription Status 

Additional info:

Managing Hosts guide

Chapter 3. Registering Hosts

3.1. Registering a Host to Red Hat Satellite

"Hosts can be registered to Satellite by generating a curl command on Satellite and running this command on hosts. This method uses two templates: global registration template and host initial configuration template."

No mention of "foreman-proxy-templates" there.

Later it says:

 Optional: If the Registration feature is not enabled on your Capsule, enter the following command on the Capsule to enable it:

# satellite-installer --foreman-proxy-registration \
--foreman-proxy-templates \
--foreman-proxy-template-url 'http://capsule.example.com'

But that leaves the problem of the internal proxy on 9090 not being covered by the docs.

Later it says:

Optional: From the Capsule list, select the Capsule to register hosts through. You must select the internal Capsule if you do not want to use an external Capsule.


No mention of "foreman-proxy-templates" there.

Docs was updated because of https://bugzilla.redhat.com/show_bug.cgi?id=1921453#c4

Comment 1 Stephen Wadeley 2021-10-14 18:21:24 UTC
Hello


this is not a regression

Testing on 6.9.7

With selecting Capsule URL:

curl  -X GET "https://<redacted>.redhat.com:9090/register?activation_key=test_ak_rhel8&location_id=2&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MzQyMzU0MTksImp0aSI6IjdhZTg5OTc5MWZiZGNjMjZmM2M0MjIwNTU2Nzk2YmEyZjA4NjJjMjZkYmM0YzM1NTdkMDc5M2IxNzUzYmJkZTciLCJleHAiOjE2MzQyNDk4MTl9.TWoaMdMQONE43waXgAepXy5ymZDtB0N-asIufyh0Qu4' | bash

Notice 9090 after URL https://<redacted>.redhat.com:9090  <----

Without selecting a Capsule URL:

curl  -X GET "https://<redacted>.redhat.com/register?activation_key=test_ak_rhel8&location_id=2&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MzQyMzU0NTQsImp0aSI6ImYxZjdiZDViMWI2N2Y5YTljNDc3NWUwMWYyYjgwYzc5MWJmYmFkYTY1MzI0Zjk5MDlhOGNhZWRiY2FjOWI3N2MiLCJleHAiOjE2MzQyNDk4NTR9.OdxNNYpwv08Ne07Rz4vHv3K8mO269h9crNXSnTF70I8' | bash

Thank you

Comment 2 Leos Stejskal 2021-10-15 06:39:54 UTC
Created redmine issue https://projects.theforeman.org/issues/33697 from this bug

Comment 3 Bryan Kearney 2021-11-04 13:51:44 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33697 has been resolved.

Comment 8 errata-xmlrpc 2022-07-05 14:30:00 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 (Moderate: Satellite 6.11 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:5498