ironic_host_manager: fix population of instances info on schedule
IronicHostManager currently overrides the _get_instance_info() method
of the base class and unconditionally returns an empty dict of
instances for a given compute node.
The problem with that is that in a heterogeneous cloud with both
libvirt and ironic compute nodes this will always return {} for the
former too, which is incorrect and will effectively break instance
affinity filters like DifferentHostFilter or SameHostFilter, that
check set intersections of instances running on a particular host and
the ones passed as a hint for nova-scheduler in a boot request.
IronicHostManager should use the method implementation of the base
class for non-ironic compute nodes.
This is a partial fix which only modifies _get_instance_info() called
down the select_destinations() stack. A following change will modify
_init_instance_info() that pre-populates node instances info on start
of a nova-scheduler process.
Reviewed: https:/ /review. openstack. org/346966 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=af218caba4f 532c7d182071ab4 304d49d02de08f
Committed: https:/
Submitter: Jenkins
Branch: master
commit af218caba4f532c 7d182071ab4304d 49d02de08f
Author: Roman Podoliaka <email address hidden>
Date: Mon Jul 25 20:35:29 2016 +0300
ironic_ host_manager: fix population of instances info on schedule
IronicHostM anager currently overrides the _get_instance_ info() method
of the base class and unconditionally returns an empty dict of
instances for a given compute node.
The problem with that is that in a heterogeneous cloud with both
libvirt and ironic compute nodes this will always return {} for the
former too, which is incorrect and will effectively break instance
affinity filters like DifferentHostFilter or SameHostFilter, that
check set intersections of instances running on a particular host and
the ones passed as a hint for nova-scheduler in a boot request.
IronicHostM anager should use the method implementation of the base
class for non-ironic compute nodes.
This is a partial fix which only modifies _get_instance_ info() called destinations( ) stack. A following change will modify instance_ info() that pre-populates node instances info on start
down the select_
_init_
of a nova-scheduler process.
Partial-Bug: #1606496
Change-Id: Ib1ddb44d71f7b0 85512c1f3fc0544 f7b00c754fe