bulk requests may fail to clean up created resources on failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Confirmed
|
High
|
Unassigned |
Bug Description
When creating resources in bulk (either with native ml2 support, or with emulated support in the base api controller), when an exception occurs when creating one of requested resources, an effort is made to clean up resources that were successfully created before the failure.
Sadly, sometimes an exception may occur during cleanup, that will leave a resource in the database. For example, StaleDataError may be raised from SQLAlchemy, for one because of our usage of version_id_col; that state is fine and should be handled by retrying the operation, but we don't, instead we just swallow the exception and leave the resource to sit in the database.
We should apply retry mechanism to the cleanup phase to avoid that scenario.
tags: | added: api |
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → High |
Note: An example in ML2 plugin: /github. com/openstack/ neutron/ blob/master/ neutron/ plugins/ ml2/plugin. py#L635- L638
https:/