Register multiple Content Hosts with Duplicate UUID's to Red Hat Satellite 6

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.6 and later Versions.
  • Red Hat Enterprise Linux.
  • Register multiple machines which have duplicate UUID's

Issue

  • The system is registered and subscribed to Red Hat Satellite, but is not visible on the WebUI
  • Experiencing following error while trying to register Content Hosts with the same UUID

    HTTP error (500 - Internal Server Error): Multiple profiles found. Consider removing XXX which match this 
    host.
    
  • Getting below error when trying to register a system:

    bash-4.2# subscription-manager register --org="RedHat" --activationkey="Test" --force
    HTTP error (422 - Unknown): The DMI UUID of this host (EXXXXX-7XX7-XXXX-XXXX-AXXXXXXXX) matches other 
    registered 
    hosts: client.example.com
    
  • On Red Hat Satellite, 8 repositories are enabled for the target server. However, on the target server, the dnf repolist command displays only 4 repositories. As a result, not all repositories enabled in Red Hat Satellite are available on the client system.

Resolution

  1. Add system dmi.system.uuid:

    [root@client ~]# subscription-manager facts|grep dmi.system.uuid
    dmi.system.uuid: 45AA7104-5CB0-4A75-945D-7173C8DC5783
    
    Administer > Settings > Content(tab) > Host Duplicate DMI UUIDs - Add the UUID in the form of an array
    
  2. Alternatively, Update UUID on individual machine

    [root@client ~]# vi /etc/rhsm/facts/uuid.facts
    {"dmi.system.uuid": "customuuid"}
    
    *customuuid = UUID which is unique for every machine.
    
  3. Re-register client machine. (Re-registering of both systems may be needed if the profile was unregistered by using the --force option)

  4. Verify that UUID in systems is different from the client machine:
    Legacy UI:
    Hosts -> All Hosts -> Client machine -> facts -> dmi -> systems

    New UI:
    Monitor -> Facts -> Search bar you can write "host = hostname_requested" -> dmi -> system

Note

  • If registering to the Red Hat Customer Portal, navigate to the Systems page and search for your new and old host after reregistering.
  • If the machine has been cloned from the Virtual Machine, then remove the old facts.json file and re-register the system.

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

  • The subscription-manager when trying to register a Content Host to Red Hat Satellite or Red Hat Customer Portal looks for dmi.system.uuid parameter that should be unique.
  • Creating a custom fact at /etc/rhsm/facts/ on the Content Host takes precedence over subscription-manager facts located in /var/lib/rhsm/facts/.
  • During cloning, the old subscription-manager ( RHSM ) data gets copied to the newly cloned Virtual Machine.
  • A system's UUID is a motherboard product UUID, which is set by the hardware vendor and is encoded into the BIOS and should always be unique.
  • The newly cloned Virtual Machine contains the copy of facts.json file which results in a duplicate UUID error.

Diagnostic Steps

  • Change the Context to any Organization and any location.
  • Check for duplicate resource errors like the one below in /var/log/foreman/production.log

    2020-05-10T20:00:49 [E|kat|388f6507] POST: https://satellite.example.com/pulp/api/v2/consumers/: {"id":"ede5aaea-f460-48fb-aa2a-f8d49c7eb373","display_name":"client.example.com"}: {"content_type"=>"application/json", "accept"=>"application/json"}
    409 Conflict: {"error": {"code": "PLP0018", "data": {"resource_id": "ede5aaea-f460-48fb-aa2a-f8d49c7eb373"}, "description": "Duplicate resource: ede5aaea-f460-48fb-aa2a-f8d49c7eb373", "sub_errors": []}, "http_request_method": "POST", "exception": null, "error_message": "Duplicate resource: ede5aaea-f460-48fb-aa2a-f8d49c7eb373", "_href": "/pulp/api/v2/consumers/", "http_status": 409, "resource_id": "ede5aaea-f460-48fb-aa2a-f8d49c7eb373", "traceback": null}
    
  • Provide output of:

    # cat /var/lib/rhsm/facts/facts.json
    
  • Check for duplicate RHSM facts between 2 hosts in /var/lib/rhsm/facts/facts.json:

    {"dmi.system.uuid": "Not Present", "proc_cpuinfo.common.cpuid_level": "13", "virt.host_type": "kvm", "dmi.bios.address": "0xe8000", "lscpu.l1d_cache": "32K", "dmi.chassis.manufacturer": "QEMU", "distribution.name": "Red Hat Enterprise Linux Server", "lscpu.l1i_cache": "32K", "dmi.chassis.security_status": "Unknown", "dmi.memory.error_correction_type": "Multi-bit ECC", "dmi.processor.type": "Central Processor", 
    --snip--
    "dmi.memory.array_handle": "0x1000", "dmi.system.sku_number": "Not Specified", "dmi.processor.asset_tag": "Not Specified", "dmi.meta.cpu_socket_count": "8", "dmi.system.wake-up_type": "Power Switch"}
    
  • The yum repolist all output shows that some repositories appear as disabled on the target server, even though they are enabled in the Red Hat Satellite web UI.

     # yum repolist all
    Updating Subscription Management repositories.
    repo id                                                              repo name                                                                            status
    STARS_DUORHELV8_DUO_RHEL_V8_Repo                                     DUO RHEL V8 Repo                                                                     disabled
    STARS_DockerRHEL_Docker                                              Docker Repository                                                                    disabled
    STARS_EPELRHELV08_EPELV08                                            EPELV08                                                                              disabled
    STARS_MSSQLRHELV8_MSSQL                                              MSSQL                                                                                disabled
    STARS_ZabbixRHELV8_Zabbix_repo_RHEL_V8                               Zabbix repo RHEL V8                                                                  enabled
    STARS_ZabbixV7RHELV8_Zabbix_V7_RHEL_V8                               Zabbix V7 RHEL V8                                                                    disabled
    rhel-8-for-x86_64-appstream-rpms                                     Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                             enabled
    rhel-8-for-x86_64-baseos-rpms                                        Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                enabled
    satellite-client-6-for-rhel-8-x86_64-rpms                            Red Hat Satellite Client 6 for RHEL 8 x86_64 (RPMs)                                  enabled
    

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.

Comments