diff --git a/neutron/agent/dhcp/agent.py b/neutron/agent/dhcp/agent.py index 83642e00ad2..fadfb964508 100644 --- a/neutron/agent/dhcp/agent.py +++ b/neutron/agent/dhcp/agent.py @@ -234,9 +234,6 @@ class DhcpAgent(manager.Manager): LOG.info("DHCP configuration for ports %s is completed", ports_to_send) continue - except oslo_messaging.MessagingTimeout: - LOG.error("Timeout notifying server of ports ready. " - "Retrying...") except Exception: LOG.exception("Failure notifying DHCP server of " "ready DHCP ports. Will retry on next " @@ -732,8 +729,8 @@ class DhcpPluginApi(object): def dhcp_ready_on_ports(self, port_ids): """Notify the server that DHCP is configured for the port.""" cctxt = self.client.prepare(version='1.5') - return cctxt.call(self.context, 'dhcp_ready_on_ports', - port_ids=port_ids) + cctxt.cast(self.context, 'dhcp_ready_on_ports', + port_ids=port_ids) class NetworkCache(object): diff --git a/neutron/tests/unit/agent/dhcp/test_agent.py b/neutron/tests/unit/agent/dhcp/test_agent.py index bf1d2b9f20c..1dd5aa398cc 100644 --- a/neutron/tests/unit/agent/dhcp/test_agent.py +++ b/neutron/tests/unit/agent/dhcp/test_agent.py @@ -431,20 +431,6 @@ class TestDhcpAgent(base.BaseTestCase): dhcp.start_ready_ports_loop() spawn.assert_called_once_with(dhcp._dhcp_ready_ports_loop) - def test__dhcp_ready_ports_doesnt_log_exception_on_timeout(self): - dhcp = dhcp_agent.DhcpAgent(HOSTNAME) - dhcp.dhcp_ready_ports = set(range(4)) - - with mock.patch.object(dhcp.plugin_rpc, 'dhcp_ready_on_ports', - side_effect=oslo_messaging.MessagingTimeout): - # exit after 2 iterations - with mock.patch.object(dhcp_agent.eventlet, 'sleep', - side_effect=[0, 0, RuntimeError]): - with mock.patch.object(dhcp_agent.LOG, 'exception') as lex: - with testtools.ExpectedException(RuntimeError): - dhcp._dhcp_ready_ports_loop() - self.assertFalse(lex.called) - def test__dhcp_ready_ports_loop(self): dhcp = dhcp_agent.DhcpAgent(HOSTNAME) dhcp.dhcp_ready_ports = set(range(4))