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.
Partial-Bug: #1606496
(cherry-picked from af218caba4f532c7d182071ab4304d49d02de08f)
Change-Id: Ib1ddb44d71f7b085512c1f3fc0544f7b00c754fe
Reviewed: https:/ /review. openstack. org/367402 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=6f1151378b2 4f134bd7bf41fcf a0e4c65aca86e7
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 6f1151378b24f13 4bd7bf41fcfa0e4 c65aca86e7
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
(cherry-picked from af218caba4f532c 7d182071ab4304d 49d02de08f) 85512c1f3fc0544 f7b00c754fe
Change-Id: Ib1ddb44d71f7b0