← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1597752] [NEW] bulk requests may fail to clean up created resources on failure

 

Public bug reported:

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.

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: api

** Tags added: api

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1597752

Title:
  bulk requests may fail to clean up created resources on failure

Status in neutron:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1597752/+subscriptions


Follow ups