Update HostState.instances during _consume_selected_host
Change I4b67ec9dd4ce846a704d0f75ad64c41e693de0fb changed the
behavior of the ServerGroupAntiAffinityFilter to rely on
HostState.instances being accurate within the same request
so that it can compare the number of group members on the same
host for filtering. Previously the filter was just checking
InstanceGroup.hosts which was updated in the
FilterScheduler._consume_selected_host method for each instance
processed in a multi-create request.
This change updates _consume_selected_host such that if we have
an instance group and an instance_uuid (which should always be
the case unless conductor is running code older than Pike), then
we update HostState.instances with the instance_uuid so the
ServerGroupAntiAffinityFilter can properly compare the number of
group members against the instances on a given host in a multi-create
request.
Reviewed: https:/ /review. openstack. org/582976 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ef294990022 7e16e0a9494df3a dec25d7dae6a14
Committed: https:/
Submitter: Zuul
Branch: master
commit ef2949900227e16 e0a9494df3adec2 5d7dae6a14
Author: Matt Riedemann <email address hidden>
Date: Mon Jul 16 11:29:57 2018 -0400
Update HostState.instances during _consume_ selected_ host
Change I4b67ec9dd4ce84 6a704d0f75ad64c 41e693de0fb changed the AffinityFilter to rely on instances being accurate within the same request up.hosts which was updated in the uler._consume_ selected_ host method for each instance
behavior of the ServerGroupAnti
HostState.
so that it can compare the number of group members on the same
host for filtering. Previously the filter was just checking
InstanceGro
FilterSched
processed in a multi-create request.
This change updates _consume_ selected_ host such that if we have AntiAffinityFil ter can properly compare the number of
an instance group and an instance_uuid (which should always be
the case unless conductor is running code older than Pike), then
we update HostState.instances with the instance_uuid so the
ServerGroup
group members against the instances on a given host in a multi-create
request.
Change-Id: Iacc636fa8a59a9 e8670a8d683c10b dbb0dc8237b
Closes-Bug: #1781710