From a117e35b2d7bd8937177af7ba2f05dc6e4254056 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 31 Mar 2017 15:44:14 -0400 Subject: [PATCH] Ensure reservation_expire actually expires reservations The existing unit test for this is a bit hard to follow given the setup, so this change simply ensures that the reservations created during the seutp are actually processed during reservation_expire in the DB API. Change-Id: I21fc6a441090b86f89b52c92976a81ba3c28f7d7 --- nova/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 75ff2051b..9057ea874 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -4007,7 +4007,7 @@ def reservation_expire(context): reservation.usage.reserved -= reservation.delta context.session.add(reservation.usage) - reservation_query.soft_delete(synchronize_session=False) + return reservation_query.soft_delete(synchronize_session=False) ###################