[RFE] Conflict response cleanup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Triaged
|
Wishlist
|
Unassigned | ||
python-ironicclient |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Conflict exception is currently raised by Ironic in case of:
1) Exceptions related to duplicate name/UUID/address
2) InvalidState
3) PowerStateFailure
4) NodeAssociated
5) InstanceAssociated
6) Lack of standalone port support in porgroup
7) Disabling standalone_
8) NodeLocked
While situation 1 is a role model for 409 Conflict usage, other ones seem to improperly raise Conflict exception.
What is more, such overuse has consequences in client behavior;
Currently ironic client handles retries on its side. Client retires on following exception types:
* exc.Conflict
* exc.ServiceUnav
* exc.ConnectionR
* kexc.RetriableC
While it is true, that retry should be executed when e.g. node is locked (because it's state may change), there is no use is retrying with same request body with e.g. name duplication.
Cleaning up conflict exceptions, would enable:
* Lack of retries in case of duplicates (+ fail fast, + reduced load)
* Cleaner code by replacing non-retry usages with generic 400
* Retry-After header usage: retry usages could be replaces with e.g. 412 Precondition Failed, then agent could use this exception type for retries. Retry-After header can be set for such exception type (while it wouldn't make sense to set it for Conflict).
Changed in ironic: | |
assignee: | nobody → Joanna Taryma (jtaryma) |
Changed in python-ironicclient: | |
assignee: | nobody → Joanna Taryma (jtaryma) |
Changed in python-ironicclient: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Changed in python-ironicclient: | |
status: | Triaged → In Progress |
Changed in ironic: | |
status: | In Progress → Triaged |
Changed in python-ironicclient: | |
status: | In Progress → Triaged |
Changed in ironic: | |
assignee: | Joanna Taryma (jtaryma) → nobody |
Changed in python-ironicclient: | |
assignee: | Joanna Taryma (jtaryma) → nobody |
This RFE relates to bug: https:/ /bugs.launchpad .net/ironic/ +bug/1461140