Prevent leases from being deleted during event execution
A user can request to delete a lease while it is changing state via event execution, which can trigger an error condition as on_end will attempt to delete the corresponding aggregate. This commit prevents a lease from being deleted while its start_lease or end_lease events are in progress. Change-Id: I73bde0219b6ea30d16564fd2507fd59d52cbfa6a Closes-Bug: #1791741
This commit is contained in:
parent
1855e059fc
commit
00760ae25b
@ -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,
|
||||
|
@ -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
|
||||
<https://bugs.launchpad.net/blazar/+bug/1791741>`_.
|
Loading…
x
Reference in New Issue
Block a user