New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1314902: ENT-555 use dmi.system.uuid to reconcile hypervisors #2035
Conversation
| @@ -699,6 +700,71 @@ public VirtConsumerMap getHostConsumersMap(Owner owner, Iterable<String> hypervi | |||
| return hypervisorMap; | |||
| } | |||
|
|
|||
| /** | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two getHostConsumersMap methods (see method above). One is called by the job and the other in the resource. Each one is building the map in different ways. Is this intended? Why would sync vs async be different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mstead async version has the fact we are using here, sync version does not.
only a recent version of virt-who would provide the fact in the report, and all recent versions should talk to the async end point anyway.
| } | ||
| } | ||
|
|
||
| for (Consumer consumer: this.getConsumers(consumerIds)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that this loop can be moved inside and at the end of the !systemUuidHypervisorMap.isEmpty() block since it is only applicable in this case (consumerIds is only used there).
|
@mstead done |
| } | ||
| remainingHypervisorIds.add(consumer.getHypervisorId().getHypervisorId()); | ||
| } | ||
| List<String> consumerIds = new LinkedList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved into the block it is used in.
|
Code looks good, but. If a consumer with the system.uuid comes in first, the hostname in CP is set to the system.uuid. |
|
I made a mistake, the method I added slipped into a previous PR, but the method was not used there yet. @wottop will chat with you online today. |
|
@wottop added the logic, and a new unit test to test it too |
|
Ooops.. Clicked the close button by mistake. |
|
ack |
No description provided.