l3 agent: stop expecting old server when fetching service plugins
All Newton+ servers using L3RouterPlugin expose the endpoint. Even back in Newton time when the patch that introduced the new RPC entry point, there was no need to have this special handling, because neutron-server is always upgraded before agents. TrivialFix Change-Id: I2afa84d6b5771600068f8e98c407bbdce2f266b0
This commit is contained in:
parent
7319c84455
commit
32d1f401a0
|
@ -220,15 +220,6 @@ class L3NATAgent(ha.AgentMixin,
|
|||
try:
|
||||
self.neutron_service_plugins = (
|
||||
self.plugin_rpc.get_service_plugin_list(self.context))
|
||||
except oslo_messaging.RemoteError as e:
|
||||
LOG.warning('l3-agent cannot check service plugins '
|
||||
'enabled at the neutron server when '
|
||||
'startup due to RPC error. It happens '
|
||||
'when the server does not support this '
|
||||
'RPC API. If the error is '
|
||||
'UnsupportedVersion you can ignore this '
|
||||
'warning. Detail message: %s', e)
|
||||
self.neutron_service_plugins = None
|
||||
except oslo_messaging.MessagingTimeout as e:
|
||||
LOG.warning('l3-agent cannot contact neutron server '
|
||||
'to retrieve service plugins enabled. '
|
||||
|
|
|
@ -2643,13 +2643,6 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework):
|
|||
self.assertEqual(service_plugins, agent.neutron_service_plugins)
|
||||
self.assertTrue(self.plugin_api.get_service_plugin_list.called)
|
||||
|
||||
def test_get_service_plugin_list_failed(self):
|
||||
raise_rpc = oslo_messaging.RemoteError()
|
||||
self.plugin_api.get_service_plugin_list.side_effect = raise_rpc
|
||||
agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
|
||||
self.assertIsNone(agent.neutron_service_plugins)
|
||||
self.assertTrue(self.plugin_api.get_service_plugin_list.called)
|
||||
|
||||
def test_get_service_plugin_list_retried(self):
|
||||
raise_timeout = oslo_messaging.MessagingTimeout()
|
||||
# Raise a timeout the first 2 times it calls
|
||||
|
|
Loading…
Reference in New Issue