Ensure instance mapping is updated in case of quota recheck fails
If an instance fails to successfully pass the quota recheck, it will
raise a TooManyInstances exception, however, it will not hit the
code which saves the instance mapping, leaving an instance with no
assigned cell in the mapping table and no BuildRequest as it is
removed by _cleanup_build_artifacts.
This patch adds a test to make sure that an instance has the correct
cell mapping if it fails in the quota recheck phase. In addition, it
uses the cell_mapping_cache dictionary to set the correct cell
mapping before marking the instance as ERROR.
Co-Authored-By: Dan Smith <email address hidden>
Co-Authored-By: Matt Riedemann <email address hidden>
Co-Authored-By: melanie witt <email address hidden>
Closes-Bug: #1715462
Reviewed: https:/ /review. openstack. org/501408 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=bf0f5d47545 8a67a12000ff49a 8c5285c3ac9e45
Committed: https:/
Submitter: Jenkins
Branch: master
commit bf0f5d475458a67 a12000ff49a8c52 85c3ac9e45
Author: Mohammed Naser <email address hidden>
Date: Wed Sep 6 15:19:01 2017 -0400
Ensure instance mapping is updated in case of quota recheck fails
If an instance fails to successfully pass the quota recheck, it will build_artifacts .
raise a TooManyInstances exception, however, it will not hit the
code which saves the instance mapping, leaving an instance with no
assigned cell in the mapping table and no BuildRequest as it is
removed by _cleanup_
This patch adds a test to make sure that an instance has the correct
cell mapping if it fails in the quota recheck phase. In addition, it
uses the cell_mapping_cache dictionary to set the correct cell
mapping before marking the instance as ERROR.
Co-Authored-By: Dan Smith <email address hidden>
Co-Authored-By: Matt Riedemann <email address hidden>
Co-Authored-By: melanie witt <email address hidden>
Closes-Bug: #1715462
Change-Id: I7ecb5feb47a5f3 58cd51bde87b75a 3a6141b5b12