From cd7be292a8d1fb4ce913c4e7fbfc55fda033ffbe Mon Sep 17 00:00:00 2001 From: Brandon Logan Date: Mon, 29 Feb 2016 23:11:18 -0600 Subject: [PATCH] Check if plugin supports starting rpc listeners When neutron starts an rpc worker, it checks if the plugin has the method "start_rpc_listeners". Since most plugins inherit from a base class, and that base class implements the start_rpc_listeners method and raises NotImplementedError, the rpc worker will attempt to call that method. It should just catch the NotImplementedError and continue on. Change-Id: Ie1830b6140acffffd0f283a0d8eefa52067f7650 Closes-Bug: 1551542 --- neutron/service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neutron/service.py b/neutron/service.py index b0849a93632..6510f579667 100644 --- a/neutron/service.py +++ b/neutron/service.py @@ -139,7 +139,10 @@ class RpcWorker(worker.NeutronWorker): super(RpcWorker, self).start() for plugin in self._plugins: if hasattr(plugin, self.start_listeners_method): - servers = getattr(plugin, self.start_listeners_method)() + try: + servers = getattr(plugin, self.start_listeners_method)() + except NotImplementedError: + continue self._servers.extend(servers) def wait(self):