bulk requests may fail to clean up created resources on failure

Bug #1597752 reported by Ihar Hrachyshka
6
This bug affects 1 person
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: api
tags: added: api
Revision history for this message
Akihiro Motoki (amotoki) wrote :
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :
Changed in neutron:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Lujin Luo (luo-lujin) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.