https://blueprints.launchpad.net/blazar/+spec/state-machine
Define state machines for leases, reservations, and events, and use the status field of the leases table which is unused for now.
Statuses of leases, reservations, and events cannot properly describe some actual statuses because state machines for leases, reservations, and events are not well defined for now. It causes inconsistency of statuses, unrecoverable failures and so on.
Actually, currently leases have no status. Even though the leases table has a status field, it is not used. It should be used to describe the status of a lease properly.
Define state machines of leases, reservations, and events as follows.
Lease statuses are categorized into 2 types: stable or transitional. In the state machine shown below, stable statuses are drawn as black nodes while transitional statuses are drawn as gray nodes. Stable statuses change to transitional statuses when a specific method of the blazar manager is called. After the method has completed or failed, the transitional statuses change to stable statuses.
A lease has the following four stable statuses:
Transitional statuses are as follows:
A reservation has the following four statuses. Small letters are used for backward compatibility:
The following table shows conditions of statuses of reservations and events that have to be satisfied for each lease status.
Lease | Reservations | Events |
---|---|---|
CREATING | pending | start_lease: UNDONE , end_lease: UNDONE |
PENDING | pending | start_lease: UNDONE , end_lease: UNDONE |
STARTING | pending or active or error | start_lease: IN_PROGRESS , end_lease: UNDONE |
ACTIVE | active | start_lease: DONE , end_lease: UNDONE |
TERMINATING | active or deleted or error | start_lease: DONE , end_lease: IN_PROGRESS |
TERMINATED | deleted | start_lease: DONE , end_lease: DONE |
DELETING | Any status | Any status |
UPDATING | Any status | Any status other than IN_PROGRESS |
Express resource capacity sufficiency as a lease status like _DEGRADED statuses and a reservation status like *_MISSING_RESOURCES and *_RESOURCES_CHANGED. The problem of this solution is that it complicates state machines. Instead, we will introduce boolean flags like *degraded to leases and reservations for expressing such resource capacity sufficiency. See the resource-monitoring spec[1] in detail.
None
None
None
None
None
None
None
None
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.