LOG.error(_LE("Removing incompatible router '%s'"),
router['id'])
self._router_removed(router['id'])
+ except Exception:
+ msg = _LE("Failed to process compatible router '%s'")
+ LOG.exception(msg, update.id)
+ self.fullsync = True
+ continue
+
LOG.debug("Finished a router update for %s", update.id)
rp.fetched_and_processed(update.timestamp)
self.assertEqual('1234', agent.conf.router_id)
self.assertFalse(agent._clean_stale_namespaces)
+ def test_process_routers_update_rpc_timeout_on_get_routers(self):
+ agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
+ agent.fullsync = False
+ agent._process_router_if_compatible = mock.Mock()
+ self.plugin_api.get_routers.side_effect = (
+ oslo_messaging.MessagingTimeout)
+ agent._queue = mock.Mock()
+ update = mock.Mock()
+ update.router = None
+ agent._queue.each_update_to_next_router.side_effect = [
+ [(None, update)]]
+
+ agent._process_router_update()
+ self.assertTrue(agent.fullsync)
+ self.assertFalse(agent._process_router_if_compatible.called)
+
+ def test_process_routers_update_rpc_timeout_on_get_ext_net(self):
+ agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
+ agent.fullsync = False
+ agent._process_router_if_compatible = mock.Mock()
+ agent._process_router_if_compatible.side_effect = (
+ oslo_messaging.MessagingTimeout)
+ agent._queue = mock.Mock()
+ agent._queue.each_update_to_next_router.side_effect = [
+ [(None, mock.Mock())]]
+
+ agent._process_router_update()
+ self.assertTrue(agent.fullsync)
+
def test_process_router_if_compatible_with_no_ext_net_in_conf(self):
agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
self.plugin_api.get_external_network_id.return_value = 'aaa'