Registering a host with non-English locale using Satellite's Global Registration Template fails with a Host was not found by the subscription UUID: '' error

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.9+

Issue

Executing the registration command generated in Satellite's web UI under Hosts > Register Host fails with message: (Note that the message will be in local language)

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

Resolution

This is a known issue and has been escalated to the Red Hat Engineering team via This content is not included.Bugzilla 2190109

  1. On Satellite edit the file /usr/share/foreman/app/views/unattended/provisioning_templates/registration/global_registration.erb
  2. Search for the line that reads UUID=$(subscription-manager identity | head -1 | awk '{print $3}') around line 113 depending on your specific Satellite version.
  3. Replace it with: UUID=$(subscription-manager identity | head -1 | awk '{print $NF}')
  4. Restart Satellite services with:
# satellite-maintain service restart

Take into account that the file will be overwritten on further Satellite updates.

For more KB articles/solutions related to Red Hat Satellite 6.x Client Subscription Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Client Subscription Issues

Root Cause

Global registration template is using next awk command that doesn't take into account different languages output:

UUID=$(subscription-manager identity | head -1 | awk '{print $3}')

Depending on the configured locale language the word count in the output from the subscription-manager identity command can be different:

  • English: system identity: 6c97d8ae-8437-4ca0-80b3-dec90d459b4b
  • German: Systemidentität: 6c97d8ae-8437-4ca0-80b3-dec90d459b4b

So the third field printed by awk may be empty.

Using $NF in awk prints the last field so it should hopefully work on all languages.

Diagnostic Steps

Last registration steps shows an error message in local language with empty UUID: (German example)

ERROR: not_found
Host wurde von der Abonnement-UUID nicht gefunden: '', dies kann passieren, wenn der Host bereits registriert ist, aber nicht für diese Instanz
SBR
Product(s)
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.