commit 3d85f7e58197300473676980366369b29d14e187
Author: Matthew Booth <email address hidden>
Date: Fri Mar 22 11:47:32 2019 +0000
Fix incomplete instance data returned after build failure
This change fixes a race in _cleanup_build_artifacts. We were updating
the instance mapping to point at the cell in which the instance was
created before the instance record was complete, i.e. before the related
BDMs and tags were created in the cell DB. Updating the instance mapping
exposes the cell's version of the instance to the API. If the API happened
to fetch it before it was finished being created it would return
incomplete data.
Co-Authored-By: Matt Riedemann <email address hidden>
NOTE(mriedem): The unit test had to be modified slightly due to
not having change Ibc44e3b2261b314bb92062a88ca9ee6b81298dc3 in Pike.
Closes-Bug: #1820337
Change-Id: If966eb1161c842ff49aa530e4482dbca87b61a3e
(cherry picked from commit 64f6cbc9120e3c288f312eddc59452dee4998f93)
(cherry picked from commit eec39762cf5343b354e2ac06a6682a7c3b4230c2)
(cherry picked from commit c8cb120964cb33950a80c9775ffbfe4eb5818153)
(cherry picked from commit ddc2c9118a2907b005c06ce30949c8c3fd7a7aef)
Reviewed: https:/ /review. opendev. org/647916 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=3d85f7e5819 730047367698036 6369b29d14e187
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 3d85f7e58197300 473676980366369 b29d14e187
Author: Matthew Booth <email address hidden>
Date: Fri Mar 22 11:47:32 2019 +0000
Fix incomplete instance data returned after build failure
This change fixes a race in _cleanup_ build_artifacts . We were updating
the instance mapping to point at the cell in which the instance was
created before the instance record was complete, i.e. before the related
BDMs and tags were created in the cell DB. Updating the instance mapping
exposes the cell's version of the instance to the API. If the API happened
to fetch it before it was finished being created it would return
incomplete data.
Co-Authored-By: Matt Riedemann <email address hidden>
NOTE(mriedem): The unit test had to be modified slightly due to 4bb92062a88ca9e e6b81298dc3 in Pike.
not having change Ibc44e3b2261b31
Closes-Bug: #1820337 ff49aa530e4482d bca87b61a3e 88f312eddc59452 dee4998f93) 354e2ac06a6682a 7c3b4230c2) 50a80c9775ffbfe 4eb5818153) 005c06ce30949c8 c3fd7a7aef)
Change-Id: If966eb1161c842
(cherry picked from commit 64f6cbc9120e3c2
(cherry picked from commit eec39762cf5343b
(cherry picked from commit c8cb120964cb339
(cherry picked from commit ddc2c9118a2907b