]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Enable polling minimization
authorSalvatore Orlando <salv.orlando@gmail.com>
Tue, 19 Nov 2013 17:32:35 +0000 (09:32 -0800)
committerTerry Wilson <twilson@redhat.com>
Wed, 20 Nov 2013 21:31:49 +0000 (15:31 -0600)
In some cases the OVS agent might end up wiring a port for a VM
several seconds after the VM has booted. As a result, there is a
risk that the VM won't receive an IP address from DHCP in time.

This patch changes the default value for agent.minimize_polling to
True. This change should reduce the time needed for configuring
an interface on br-int consistently.

Change-Id: I009f606fd34a132376f1d50f8ccda9d35d064bfa
Related-bug: 1224001

etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
neutron/plugins/openvswitch/common/config.py
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py

index 2632a25aaf447df4ae0b03e6abe9287cb55a02bc..ba5791dc15a642240407a72b38cd052441543baa 100644 (file)
@@ -88,7 +88,7 @@
 # polling_interval = 2
 
 # Minimize polling by monitoring ovsdb for interface changes
-# minimize_polling = False
+# minimize_polling = True
 
 # When minimize_polling = True, the number of seconds to wait before
 # respawning the ovsdb monitor after losing communication with it
index 4b473943bb82956534f63d95a3d955a483bbe172..038b3473117ddc555dfc1a7953db10bbe7876955 100644 (file)
@@ -63,7 +63,7 @@ agent_opts = [
                help=_("The number of seconds the agent will wait between "
                       "polling for local device changes.")),
     cfg.BoolOpt('minimize_polling',
-                default=False,
+                default=True,
                 help=_("Minimize polling by monitoring ovsdb for interface "
                        "changes.")),
     cfg.IntOpt('ovsdb_monitor_respawn_interval',
index 1ffa79e012f6f32689f73998c654baa634075cc9..d2ac269fedee5c26324fc3ebbd6304f871b5813a 100644 (file)
@@ -588,7 +588,7 @@ class TestOvsNeutronAgent(base.BaseTestCase):
             'neutron.agent.linux.polling.get_polling_manager') as mock_get_pm:
             with mock.patch.object(self.agent, 'rpc_loop') as mock_loop:
                 self.agent.daemon_loop()
-        mock_get_pm.assert_called_with(False, 'sudo',
+        mock_get_pm.assert_called_with(True, 'sudo',
                                        constants.DEFAULT_OVSDBMON_RESPAWN)
         mock_loop.called_once()