]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Tune up report and downtime intervals for l2 agent
authorarmando-migliaccio <amigliaccio@nicira.com>
Fri, 1 Nov 2013 22:47:22 +0000 (15:47 -0700)
committerarmando-migliaccio <amigliaccio@nicira.com>
Thu, 14 Nov 2013 16:16:44 +0000 (08:16 -0800)
If the neutron server erroneously thinks than the l2 agent is down
it will fail to bind a port, which can lead to VM's spawn errors.
However, the issue is only transient because the agent effectively
is only 'late' in reporting back.

Best solution would be an alpha-count algorithm (so that we can detect
persistent failures more reliably), but for now let's be more tolerant
assuming that the agent is down by waiting at least twice the report
interval plus a tiny teeny bit.

Change-Id: I544135ce1f6b7eaefb34ac44af8f5844d92ddd95
Close-bug: #1244255

etc/neutron.conf
neutron/agent/common/config.py
neutron/db/agents_db.py

index 5c31cb2f318af9f4fcb190f5854cc582b4250483..83a6dbe23deb86743536060482fcec878225ab4a 100644 (file)
@@ -211,8 +211,9 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
 # max_fixed_ips_per_port = 5
 
 # =========== items for agent management extension =============
-# Seconds to regard the agent as down.
-# agent_down_time = 5
+# Seconds to regard the agent as down; should be at least twice
+# report_interval, to be sure the agent is down for good
+# agent_down_time = 9
 # ===========  end of items for agent management extension =====
 
 # =========== items for agent scheduler extension =============
@@ -301,8 +302,8 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
 # root_helper = sudo
 
 # =========== items for agent management extension =============
-# seconds between nodes reporting state to server, should be less than
-# agent_down_time
+# seconds between nodes reporting state to server; should be less than
+# agent_down_time, best if it is half or less than agent_down_time
 # report_interval = 4
 
 # ===========  end of items for agent management extension =====
index e00d43cc97205387693ad0e3437a7a560ed00c9a..9d5f5b1c48ef08cd2b03e864c1871adf60992644 100644 (file)
@@ -33,7 +33,9 @@ ROOT_HELPER_OPTS = [
 
 AGENT_STATE_OPTS = [
     cfg.FloatOpt('report_interval', default=4,
-                 help=_('Seconds between nodes reporting state to server')),
+                 help=_('Seconds between nodes reporting state to server; '
+                        'should be less than agent_down_time, best if it '
+                        'is half or less than agent_down_time.')),
 ]
 
 
index d04f7faf56bb329a48301d3950c536c5ddd55f5e..e095a4c2a7467670e21265efd37385fc90420b6c 100644 (file)
@@ -31,8 +31,10 @@ from neutron.openstack.common import timeutils
 
 LOG = logging.getLogger(__name__)
 cfg.CONF.register_opt(
-    cfg.IntOpt('agent_down_time', default=5,
-               help=_("Seconds to regard the agent is down.")))
+    cfg.IntOpt('agent_down_time', default=9,
+               help=_("Seconds to regard the agent is down; should be at "
+                      "least twice report_interval, to be sure the "
+                      "agent is down for good.")))
 
 
 class Agent(model_base.BASEV2, models_v2.HasId):