From 6ca69c00faa43775b0072f48e0e2c5640226f467 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 15 Oct 2018 18:54:59 +0100 Subject: [PATCH] Allow terminating leases in ERROR state when start_lease failed Commit 8d2f4a0f0ebeccf0366ea61e2325f5323590cb41 added a valid state transition from ERROR to TERMINATING, to allow a lease in the ERROR state to attempt to clean itself up upon lease end. However, it did not work for leases which failed to start as there was no corresponding combination of statuses for it. Change-Id: I3ff29958f04a55b4c39272c528b1630564c62e34 --- blazar/status.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blazar/status.py b/blazar/status.py index 032fec05..bdf6c918 100644 --- a/blazar/status.py +++ b/blazar/status.py @@ -296,7 +296,8 @@ COMBINATIONS = { 'reservation': (ReservationStatus.ACTIVE, ReservationStatus.DELETED, ReservationStatus.ERROR), - 'start_lease': (EventStatus.DONE,), + 'start_lease': (EventStatus.DONE, + EventStatus.ERROR), 'end_lease': (EventStatus.IN_PROGRESS,) }, LeaseStatus.TERMINATED: {