]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make L3 agent honor periodic_interval setting
authorKevin Benton <blak111@gmail.com>
Thu, 15 Jan 2015 16:11:49 +0000 (08:11 -0800)
committerKevin Benton <blak111@gmail.com>
Sat, 28 Mar 2015 20:10:21 +0000 (13:10 -0700)
commit8c989e67b99745f55d462e21be0eaa00f6a0e9b8
tree64cd20256fa3649bad170fecfd7b7bbb6cc2fcb5
parentb025e249983333dfd8796f5253e251b80f012008
Make L3 agent honor periodic_interval setting

The periodic_task decorator for the sync routers task was resulting
in a default spacing of 60 seconds. This meant that any values less
than that for the periodic_interval setting would not work correctly.
The fixed interval looping call would run at the periodic_interval
but this task would not execute every time as expected.

For example, if the periodic_interval was 40 seconds, the task would
only end up running every other interval (80 seconds in this case)
because every other attempt would be blocked by the default 60 second
barrier of periodic_task.

This sets the periodic_taks spacing variable to 1 second so the
interval is controlled only by the loopingcall as expected.

Ultimately periodic_task should probably be completely removed since
it's not compatible with the fixed interval loopingcall in this manner.

Closes-Bug: #1411085
Change-Id: I23818c3fab2640b241692f00f9b5a2f923e3cf31
neutron/agent/l3/agent.py