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 1924229

Summary: Global Registration: Unable to register host
Product: Red Hat Satellite Reporter: Dhaval Joshi <dhjoshi>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Stephen Wadeley <swadeley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: lstejska
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-05 13:03:06 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 Dhaval Joshi 2021-02-02 20:39:46 UTC
Description of problem:
The host is not getting registered using global registration method but it's getting registered using subscription-manager

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


How reproducible:
100%

Steps to Reproduce:
1.Generate curl command using Global registration and execute it on the client system to register it. It fails with error 

ERROR: Validation failed: Name can't be blank, Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123


2. Use subscription-manager to register the host. Its successful.


Actual results:
# curl -X GET "https://dhjoshi-rhsat.syslab.pnq2.redhat.com:9090/register?activation_key=test_ak_7&location_id=2&organization_id=1&setup_insights=false" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTIyOTYzODUsImp0aSI6IjNmZWExYmQ2YWMyZjYwNGMyNTUzNzE1OWQxNzBlM2E2ZDcxZDU0NzdhYTNiZWU4OTBlZTg1ODQ4NTIwN2JhZjAiLCJleHAiOjE2MTIzMTA3ODV9.wHc37GgmUDu75msyhkzNq75VAZlzJi2iS9MVG0eu_ms' | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10361  100 10361    0     0  25599      0 --:--:-- --:--:-- --:--:-- 25582
#
# Running registration
#
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8616  100  8616    0     0  1231k      0 --:--:-- --:--:-- --:--:-- 1402k
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Examining /tmp/tmp.dGdCEUcNyB.rpm: katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com-1.0-1.noarch
Marking /tmp/tmp.dGdCEUcNyB.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com.noarch 0:1.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================
 Package                                                              Arch               Version             Repository                   Size
===============================================================================================================================================
Installing:
 katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com             noarch             1.0-1               /tmp.dGdCEUcNyB              20 k

Transaction Summary
===============================================================================================================================================
Install  1 Package

Total size: 20 k
Installed size: 20 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com-1.0-1.noarch                                                       1/1 
  Verifying  : katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com-1.0-1.noarch                                                       1/1 

Installed:
  katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com.noarch 0:1.0-1                                                                      

Complete!
The system has been registered with ID: db790995-59ef-4dc3-b1d7-bb5c58843f3b
The registered system name is: vm254-162.gsslab.pnq2.redhat.com
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   241  100   177  100    64    470    169 --:--:-- --:--:-- --:--:--   470
ERROR: Validation failed: Name can't be blank, Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123

# hostname
vm254-162.gsslab.pnq2.redhat.com


Expected results:
the host should be registered successfully.

Additional info:

# curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://dhjoshi-rhsat.syslab.pnq2.redhat.com/pub/katello-ca-consumer-latest.noarch.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8616  100  8616    0     0  46771      0 --:--:-- --:--:-- --:--:-- 47081
[root@vm254-162 ~]# yum localinstall katello-ca-consumer-latest.noarch.rpm -y
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Examining katello-ca-consumer-latest.noarch.rpm: katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com-1.0-1.noarch
Marking katello-ca-consumer-latest.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com.noarch 0:1.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================
 Package                                                         Arch          Version         Repository                                 Size
===============================================================================================================================================
Installing:
 katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com        noarch        1.0-1           /katello-ca-consumer-latest.noarch         20 k

Transaction Summary
===============================================================================================================================================
Install  1 Package

Total size: 20 k
Installed size: 20 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com-1.0-1.noarch                                                       1/1 
  Verifying  : katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com-1.0-1.noarch                                                       1/1 

Installed:
  katello-ca-consumer-dhjoshi-rhsat.syslab.pnq2.redhat.com.noarch 0:1.0-1                                                                      

Complete!

# subscription-manager register --org="RedHat" --activationkey="test_ak_7"
The system has been registered with ID: 66c6c393-c4e6-481d-acad-30cd40c67da0
The registered system name is: vm254-162.gsslab.pnq2.redhat.com

# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

Comment 1 Leos Stejskal 2021-02-05 13:03:06 UTC

*** This bug has been marked as a duplicate of bug 1920231 ***