Github user rafaelweingartner commented on the pull request:
https://github.com/apache/cloudstack/pull/1056#issuecomment-155415964
@DaanHoogland I agree with @miguelaferreira.
I have looked that code.
The select it runs is the following:
select h.id from host h where h.status = 'Up' and h.hypervisor_type is not
null and h.data_center_id = ? ORDER by rand() limit 1
That makes me wondering, why ordering by random the projection?! That can
make problems harder to debug. Whatever, that is not the focus here.
The only ways I see that select returning nothing are the following:
⢠If we have no hosts in the zone;
⢠If all of the hosts have hypervisor_type equal to null, is it even
possible to have a host with hypervisor_type = null?
I would be concerned about the first case, a zone with no hosts. Thus, we
should have to check when the method
âcom.cloud.hypervisor.ovm3.resources.Ovm3HypervisorGuru.performSideEffectsForDelegationOnCommand(long,
Command)â is called.
What API method ends up in that code, or what action of ACS is going
execute it?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---