Comment 6 for bug 1781710

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/582976
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ef2949900227e16e0a9494df3adec25d7dae6a14
Submitter: Zuul
Branch: master

commit ef2949900227e16e0a9494df3adec25d7dae6a14
Author: Matt Riedemann <email address hidden>
Date: Mon Jul 16 11:29:57 2018 -0400

    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.

    Change-Id: Iacc636fa8a59a9e8670a8d683c10bdbb0dc8237b
    Closes-Bug: #1781710