Bug 1751727

Summary: Async hypervisor update doesn't override nil hypervisorId
Product: [Community] Candlepin Reporter: Barnaby Court <bcourt>
Component: candlepinAssignee: Abhishek Kumar <abhiskum>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 2.6CC: abhiskum, bcourt, csnyder, jturel, redakkan, skallesh
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-2.9.0-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1746912 Environment:
Last Closed: 2019-09-24 17:27:47 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: 1746912    
Bug Blocks:    

Description Barnaby Court 2019-09-12 13:09:35 UTC
+++ This bug was initially created as a clone of Bug #1746912 +++

Description of problem:

If a hypervisor is registered with subscription-manager it won't have a hypervisorId at that time. Subsequent virt-who checkins won't set the hypervisorId to the value in the virt-who report (The host will be reported as Unchanged)

Version-Release number of selected component (if applicable): candlepin-2.6.8-1.el7sat.noarch


How reproducible: Always


Steps to Reproduce:
1. Register a hypervisor with subman
2. Install virt-who on the hypervisor and initiate a checkin (ensure the DMI UUID is present so it finds the existing hypervisor)

Actual results: hypervisorId doesn't get updated to what's in the virt-who report


Expected results: it should be updated


Additional info:

Related code: https://github.com/candlepin/candlepin/blob/bf4b1f18d045dcec3136a1b0f4e94452c80728c9/server/src/main/java/org/candlepin/service/impl/HypervisorUpdateAction.java#L153-L154