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.
Fix proposed to branch: master /review. openstack. org/233698
Review: https:/