Bug 1291687

Summary: Backport: L3 agent: explicit call to resync on init may lead to double syncing
Product: Red Hat OpenStack Reporter: Nir Magnezi <nmagnezi>
Component: openstack-neutronAssignee: Nir Magnezi <nmagnezi>
Status: CLOSED ERRATA QA Contact: Toni Freger <tfreger>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0 (Juno)CC: amuller, chrisw, dcadzow, jlibosva, lpeer, nyechiel, tfreger, yeylon
Target Milestone: asyncKeywords: FeatureBackport, Triaged, ZStream
Target Release: 6.0 (Juno)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-2014.2.3-30.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-08 14:18:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nir Magnezi 2015-12-15 12:38:28 UTC
Description of problem:
=======================
Currently L3 agent has an explicit call to self.periodic_sync_routers_task() after initialization.
Given that periodic job spacing is set to 1 second, this may lead to double syncing with server on initialization (especially if there are a lot of routers scheduled to the agent):
 - agent starts, fullsync flag is True
 - periodic_sync_routers_task is called from after_start(), agent requests router info from server, fullsync flag is True
 - periodic_sync_routers_task is called by periodic task framework, fullsync flag is still True, agent requests router info from server once again.
So it's double work on both server and agent sides which might be quite expensive at scale.

The proposal is to just use run_immediately parameter.


To fix this, we should backport https://bugs.launchpad.net/neutron/+bug/1505282

Comment 4 Toni Freger 2016-01-19 15:14:50 UTC
The code exists within the release.
Tested on openstack-neutron-2014.2.3-32.el7ost.noarch

Comment 6 errata-xmlrpc 2016-02-08 14:18:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0130.html