diff --git a/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini b/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini index 2632a25aaf..ba5791dc15 100644 --- a/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini +++ b/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini @@ -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 diff --git a/neutron/plugins/openvswitch/common/config.py b/neutron/plugins/openvswitch/common/config.py index 4b473943bb..038b347311 100644 --- a/neutron/plugins/openvswitch/common/config.py +++ b/neutron/plugins/openvswitch/common/config.py @@ -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', diff --git a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py index 1ffa79e012..d2ac269fed 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py +++ b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py @@ -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()