← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1325800] Re: Potential Race Condition between L3NATAgent.routers_updated and L3NATAgent._rpc_loop.

 

*** This bug is a duplicate of bug 1315467 ***
    https://bugs.launchpad.net/bugs/1315467

After looking at the code, I'm confident that the eventlet threading
model does not allow this race condition in the most current code.  Here
are the lines of code in question in the current master branch:

            updated_routers = set(self.updated_routers)
            self.updated_routers.clear()

and ...

            self.updated_routers.update(routers)

Each of these is atomic from an eventlet threading model standpoint.

There was a brief problem with this atomicity that was fixed in
https://bugs.launchpad.net/neutron/+bug/1315467

** This bug has been marked a duplicate of bug 1315467
   Neutron deletes the router interface instead of adding a floatingip

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

Title:
  Potential Race Condition between L3NATAgent.routers_updated and
  L3NATAgent._rpc_loop.

Status in OpenStack Neutron (virtual network service):
  Confirmed

Bug description:
  The _rpc_loop routine takes a snapshot of the L3NATAgent’s
  routers_updated set and then it clears the set.  At the same time,
  L3NATAgent.routers_updated can run, it adds new routers to the
  routers_updated set.  It is possible for both routines to run at the
  same time.  So it is possible that _rpc_loop will clear the
  routers_updated set right after routers_updated routine added a router
  without having the new router included in the snapshot.  The problem
  will manifests itself by having a newly associated floating ip address
  not being configured in the iptables and the qg- device.

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


References