Comment 2 for bug 1702959

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

Submitter: Jenkins
Branch: master

commit b8be61eb39dc9f605ad853e5697a8f4bf73b025b
Author: Matthew Booth <email address hidden>
Date: Mon Mar 13 18:28:17 2017 +0000

    Fix and optimize external_events for multiple cells

    server_external_events was previously making an api db query and a
    cell db query for every instance reference. We improve this by
    making exactly 1 api db query to fetch all instance mappings, and then
    1 cell db query per cell to fetch all relevant instances from that
    cell. Further, it wasn't properly handling the case where events
    were delivered in one request for multiple instances across cells,
    which this also fixes.

    We also document an obtuse edge condition in
    ComputeAPI.external_instance_event which will cause the current code
    to break when we support migration between cells.

    Note this includes a tweak to the SingleCellSimple fixture to mock out
    the new InstanceMappingList method we use, as well as a fix to the other
    InstanceMapping mock, which was returning mappings with bogus instance
    uuids. This patch relies on the results of those being realistic and
    thus requires those changes.

    Closes-Bug: #1702959

    Co-Authored-By: Dan Smith <email address hidden>

    Change-Id: If59453f1899e99040c554bcb9ad54c8a506adc56