Commit 5ad1dea4 added changed the network deallocation code to
work with deleted instances. This was done by setting the context
to read deleted records. Unfortunately this was done a little too
broadly, leading to a new bug where a deleted floating_ip will
cause an instance to not be able to be deleted.
This fixes the issue by limiting the use of read_deleted context
to only the places it is trying to access the instance record. It
adds a test to verify that the code works with a duplicate
deleted floating_ip and updates the existing test for a deleted
instance to exercise the entire code path.
Reviewed: https:/ /review. openstack. org/11596 github. com/openstack/ nova/commit/ 1f98e28a8007776 0394201f79de04a 0924b9ad3f
Committed: http://
Submitter: Jenkins
Branch: master
commit 1f98e28a8007776 0394201f79de04a 0924b9ad3f
Author: Vishvananda Ishaya <email address hidden>
Date: Fri Aug 17 15:03:46 2012 -0700
Makes sure instance deletion ok with deleted data
Commit 5ad1dea4 added changed the network deallocation code to
work with deleted instances. This was done by setting the context
to read deleted records. Unfortunately this was done a little too
broadly, leading to a new bug where a deleted floating_ip will
cause an instance to not be able to be deleted.
This fixes the issue by limiting the use of read_deleted context
to only the places it is trying to access the instance record. It
adds a test to verify that the code works with a duplicate
deleted floating_ip and updates the existing test for a deleted
instance to exercise the entire code path.
Fixes bug 1038266
Change-Id: I1aef94369e5bcf 951e78e89b1eded 5305cf36b53