diff --git a/blazar/status.py b/blazar/status.py index 24783240..e8d549ee 100644 --- a/blazar/status.py +++ b/blazar/status.py @@ -307,8 +307,12 @@ COMBINATIONS = { }, LeaseStatus.DELETING: { 'reservation': ReservationStatus.ALL, - 'start_lease': EventStatus.ALL, - 'end_lease': EventStatus.ALL + 'start_lease': (EventStatus.UNDONE, + EventStatus.DONE, + EventStatus.ERROR), + 'end_lease': (EventStatus.UNDONE, + EventStatus.DONE, + EventStatus.ERROR) }, LeaseStatus.UPDATING: { 'reservation': ReservationStatus.ALL, diff --git a/releasenotes/notes/prevent-delete-during-events-c206a8f0a116798c.yaml b/releasenotes/notes/prevent-delete-during-events-c206a8f0a116798c.yaml new file mode 100644 index 00000000..50317a26 --- /dev/null +++ b/releasenotes/notes/prevent-delete-during-events-c206a8f0a116798c.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Blazar now prevents leases from being deleted while their start_lease or + end_lease events are in progress, to avoid concurrently accessing shared + objects. For more details, see `bug 1791741 + `_.