The db.reservation_expire() function assumes a 'usage' attribute on
Reservation objects, but we don't actually define that relationship.
The end result is that reservation_expire() currently traceback if
it actually needs to expire any reservations. This happens pretty
rarely since reservations should only need expiring if they are
leaked because of another bug.
Also define a test case to actually excercise the expiration code
path.
Add a missing chain-up to tearDown in test_limits which was causing
the get_project_quotas() stub not to be unset and, in turn, the
reservation expiration test to fail.
Reviewed: https:/ /review. openstack. org/12263 github. com/openstack/ nova/commit/ 22f0e324f3d3172 b563aa67e513fe4 d9318de2e5
Committed: http://
Submitter: Jenkins
Branch: master
commit 22f0e324f3d3172 b563aa67e513fe4 d9318de2e5
Author: Mark McLoughlin <email address hidden>
Date: Sat Sep 1 09:37:15 2012 +0100
Fix quota reservation expiration
Fixes bug #1040942
The db.reservation_ expire( ) function assumes a 'usage' attribute on
Reservation objects, but we don't actually define that relationship.
The end result is that reservation_ expire( ) currently traceback if
it actually needs to expire any reservations. This happens pretty
rarely since reservations should only need expiring if they are
leaked because of another bug.
Also define a test case to actually excercise the expiration code
path.
Add a missing chain-up to tearDown in test_limits which was causing quotas( ) stub not to be unset and, in turn, the
the get_project_
reservation expiration test to fail.
Change-Id: Ib61dbf9fd5dfb5 badaf05f20c423a 69925d83754