commit 018068c4caac324643c7c6a4360fad855dd096eb
Author: Matt Riedemann <email address hidden>
Date: Wed Mar 8 21:51:07 2017 -0500
Decrement quota usage when deleting an instance in cell0
When we fail to schedule an instance, e.g. there are no hosts
available, conductor creates the instance in the cell0 database
and deletes the build request. At this point quota usage
has been incremented in the main 'nova' database.
When the instance is deleted, the build request is already gone
so _delete_while_booting returns False and we lookup the instance
in cell0 and delete it from there, but that flow wasn't decrementing
quota usage like _delete_while_booting was.
This change adds the same quota usage decrement handling that
_delete_while_booting performs.
Reviewed: https:/ /review. openstack. org/443395 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=018068c4caa c324643c7c6a436 0fad855dd096eb
Committed: https:/
Submitter: Jenkins
Branch: master
commit 018068c4caac324 643c7c6a4360fad 855dd096eb
Author: Matt Riedemann <email address hidden>
Date: Wed Mar 8 21:51:07 2017 -0500
Decrement quota usage when deleting an instance in cell0
When we fail to schedule an instance, e.g. there are no hosts
available, conductor creates the instance in the cell0 database
and deletes the build request. At this point quota usage
has been incremented in the main 'nova' database.
When the instance is deleted, the build request is already gone while_booting returns False and we lookup the instance while_booting was.
so _delete_
in cell0 and delete it from there, but that flow wasn't decrementing
quota usage like _delete_
This change adds the same quota usage decrement handling that while_booting performs.
_delete_
Change-Id: I4cb0169ce0de53 7804ab9129bc671 d75ce5f7953
Partial-Bug: #1670627