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.
Reviewed: https:/ /review. openstack. org/445142 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b8be61eb39d c9f605ad853e569 7a8f4bf73b025b
Committed: https:/
Submitter: Jenkins
Branch: master
commit b8be61eb39dc9f6 05ad853e5697a8f 4bf73b025b
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 external_ instance_ event which will cause the current code
ComputeAPI.
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: If59453f1899e99 040c554bcb9ad54 c8a506adc56