← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2057698] Re: Concurrent routerroute update fails on deletion with AttributeError

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/912629
Committed: https://opendev.org/openstack/neutron/commit/27b2f22df10e6e41c6fc4e1ce7f839aeb3dc3e13
Submitter: "Zuul (22348)"
Branch:    master

commit 27b2f22df10e6e41c6fc4e1ce7f839aeb3dc3e13
Author: Sebastian Lohff <sebastian.lohff@xxxxxxx>
Date:   Tue Mar 12 19:34:17 2024 +0100

    Don't delete already deleted extra router routes
    
    When handling the deletion of extra routes we need to handle the case
    that the route is already deleted by another call in the time we have
    fetched the extra routes and try to delete it. This is a classic race
    condition when two calls try to update the routes of a router at the
    same time. The default MariaDB/MySQL transaction isolation level does
    not suffice to prevent this scenario. Directly deleting the route
    without fetching it solves this problem.
    
    Change-Id: Ie8238310569eb7c1c53296195800bef5c9cb92a3
    Closes-Bug: #2057698


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  Concurrent routerroute update fails on deletion with AttributeError

Status in neutron:
  Fix Released

Bug description:
  When updating a router and providing a set of extra routes /
  routerroutes that result in some routes being deleted, it might happen
  that two workers fetch the routes at the same time and then both try
  to delete the route. As the route is fetched before deletion, in one
  of the two workers the get_object() will return None, on which
  delete() is called, resulting in an AttributeError:

  AttributeError: 'NoneType' object has no attribute 'delete'

  The result is not fulfilled properly and a 500 is returned to the
  user.

  This was observed on neutron yoga, though the same code (+ a breaking
  test) seem to confirm this on current master.

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



References