Bug 1806713

Summary: hypervisor checkin fails with cp_consumer_hypervisor_ukey error
Product: Red Hat Satellite Reporter: Jonathon Turel <jturel>
Component: CandlepinAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: high    
Version: 6.7.0CC: asakpal, bcourt, bkearney, dsynk, ehelms, khowell, ktordeur, mjia, mmccune, nmoumoul, ramkumar, rbernlei, redakkan, sbhamrah, shisingh, skallesh, vsonie, wpoteat
Target Milestone: 6.8.0Keywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-3.1.10-1.el7sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1766345 Environment:
Last Closed: 2020-10-27 13:00:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1766345    
Bug Blocks: 1774236, 1788671, 1788672    
Attachments:
Description Flags
before
none
after none

Comment 8 jcallaha 2020-08-05 17:56:04 UTC
Verified in Satellite 6.8 Snap 17

1. Save the virt-who request data below in a file (temp.json)
2. Submit the data to the rhsm async hypervisors api
    curl -k -X POST --cert /etc/pki/consumer/cert.pem --key /etc/pki/consumer/key.pem https://<sathost>/rhsm/hypervisors/Default_Organization -H "Content-Type: application/json" -d @"temp.json"
3. Change the hypervisorId
4. Resubmit the data tot he rhsm api

Results:
    The hypervisors are updated. See attached screenshots for verification



{
    "hypervisors": [
        {
            "hypervisorId": {
                "hypervisorId": "jake.test.hypervisor.one.io"
            },
            "name": "hypervisor-one.io",
            "guestIds": [
                {
                    "guestId": "14cc4791-6725-4b07-ad8a-6587938f3177",
                    "state": 1,
                    "attributes": {
                        "active": 1,
                        "virtWhoType": "esx"
                    }
                },
            ],
            "facts": {
                "hypervisor.type": "VMware ESXi",
                "dmi.system.uuid": "33a134d6-31cb-42ae-ac3c-9347873c19f6",
                "cpu.cpu_socket(s)": "2",
                "hypervisor.cluster": "fake cluster",
                "hypervisor.version": "6.7.0"
            }
        },
        {
            "hypervisorId": {
                "hypervisorId": "jake.test.altered.two.io"
            },
            "name": "hypervisor-two.gov",
            "guestIds": [
                {
                    "guestId": "0f05f5b9-dd03-4bf7-865c-5a3506a36598",
                    "state": 1,
                    "attributes": {
                        "active": 1,
                        "virtWhoType": "esx"
                    }
                },
            ],
            "facts": {
                "hypervisor.type": "VMware ESXi",
                "dmi.system.uuid": "5caa14cf-79c7-4469-ae17-9b30adfbd254",
                "cpu.cpu_socket(s)": "2",
                "hypervisor.cluster": "fake cluseter",
                "hypervisor.version": "6.7.0"
            }
        }
    ]
}

Comment 9 jcallaha 2020-08-05 17:56:26 UTC
Created attachment 1710555 [details]
before

Comment 10 jcallaha 2020-08-05 17:58:04 UTC
Created attachment 1710556 [details]
after

Comment 13 errata-xmlrpc 2020-10-27 13:00: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.8 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-2020:4366