ML2 cannot seem to load TypeDrivers

Bug #1221781 reported by Kyle Mestery
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
devstack
Won't Fix
High
Sukhdev Kapur

Bug Description

Seeing issues with ML2 and it's attempts to load TypeDrivers. The following traces seem to occur when running ML2 in Havana at the moment:

2013-09-06 08:45:09.983 41471 DEBUG stevedore.extension [-] found extension EntryPoint.parse('gre = neutron.plugins.ml2.drivers.type_gre:GreTypeDriver') _load_plugins /usr/lib/python2.7/site-packages/stevedore/extension.py:84
2013-09-06 08:45:10.019 41471 ERROR stevedore.extension [-] Could not load 'gre': jsonrpclib
2013-09-06 08:45:10.019 41471 ERROR stevedore.extension [-] jsonrpclib
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension Traceback (most recent call last):
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 89, in _load_plugins
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension invoke_kwds,
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 57, in _load_one_plugin
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension ep, invoke_on_load, invoke_args, invoke_kwds,
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 101, in _load_one_plugin
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension plugin = ep.load()
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2259, in load
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension if require: self.require(env, installer)
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2272, in require
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension working_set.resolve(self.dist.requires(self.extras),env,installer)))
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 626, in resolve
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension raise DistributionNotFound(req)
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension DistributionNotFound: jsonrpclib
2013-09-06 08:45:10.019 41471 TRACE stevedore.extension
2013-09-06 08:45:10.019 41471 DEBUG stevedore.extension [-] found extension EntryPoint.parse('vxlan = neutron.plugins.ml2.drivers.type_vxlan:VxlanTypeDriver') _load_plugins /usr/lib/python2.7/site-packages/stevedore/extension.py:84
2013-09-06 08:45:10.054 41471 ERROR stevedore.extension [-] Could not load 'vxlan': jsonrpclib
2013-09-06 08:45:10.054 41471 ERROR stevedore.extension [-] jsonrpclib
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension Traceback (most recent call last):
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 89, in _load_plugins
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension invoke_kwds,
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 57, in _load_one_plugin
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension ep, invoke_on_load, invoke_args, invoke_kwds,
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 101, in _load_one_plugin
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension plugin = ep.load()
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2259, in load
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension if require: self.require(env, installer)
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2272, in require
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension working_set.resolve(self.dist.requires(self.extras),env,installer)))
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 626, in resolve
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension raise DistributionNotFound(req)
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension DistributionNotFound: jsonrpclib
2013-09-06 08:45:10.054 41471 TRACE stevedore.extension
2013-09-06 08:45:10.055 41471 INFO neutron.plugins.ml2.managers [-] Loaded type driver names: []
2013-09-06 08:45:10.055 41471 INFO neutron.plugins.ml2.managers [-] Registered types: []
2013-09-06 08:45:10.056 41471 ERROR neutron.plugins.ml2.managers [-] No type driver for tenant network_type: gre. Service terminated!
q-svc failed to start

Kyle Mestery (mestery)
Changed in neutron:
importance: Undecided → Critical
assignee: nobody → Kyle Mestery (mestery)
Revision history for this message
dkehn (dekehn) wrote :

seems that jsonrpclib is having an effect:

> /home/dkehn/devl/neutron/.tox/py27/local/lib/python2.7/site-packages/pkg_resources.py(626)resolve()
-> raise DistributionNotFound(req)
(Pdb) p req
Requirement.parse('jsonrpclib')
(Pdb) p requirements
[Requirement.parse('iso8601>=0.1.4'), Requirement.parse('requests>=1.1'), Requirement.parse('httplib2'), Requirement.parse('greenlet>=0.3.2'), Requirement.parse('eventlet>=0.13.0'), Requirement.parse('Babel>=0.9.6'), Requirement.parse('anyjson>=0.3.3'), Requirement.parse('amqplib>=0.6.1'), Requirement.parse('Routes>=1.12.3'), Requirement.parse('PasteDeploy>=1.5.0'), Requirement.parse('Paste'), Requirement.parse('pbr>=0.5.21,<1.0'), Requirement.parse('pyudev'), Requirement.parse('six'), Requirement.parse('simplejson>=2.0.9'), Requirement.parse('requests>=1.1'), Requirement.parse('PrettyTable>=0.6,<0.8'), Requirement.parse('iso8601>=0.1.4'), Requirement.parse('pbr>=0.5.16,<0.6'), Requirement.parse('six'), Requirement.parse('Mako'), Requirement.parse('SQLAlchemy>=0.7.3'), Requirement.parse('netaddr'), Requirement.parse('oslo.config>=1.1.0'), Requirement.parse('six'), Requirement.parse('simplejson>=2.0.9'), Requirement.parse('requests>=1.1'), Requirement.parse('PrettyTable>=0.6,<0.8'), Requirement.parse('iso8601>=0.1.4'), Requirement.parse('pbr>=0.5.21,<1.0'), Requirement.parse('Babel>=0.9.6'), Requirement.parse('six'), Requirement.parse('simplejson>=2.0.9'), Requirement.parse('iso8601>=0.1.4'), Requirement.parse('httplib2'), Requirement.parse('cliff>=1.4'), Requirement.parse('pbr>=0.5.21,<1.0'), Requirement.parse('amqp>=1.0.13,<1.1.0'), Requirement.parse('anyjson>=0.3.3'), Requirement.parse('markupsafe')]
(Pdb) p req
Requirement.parse('jsonrpclib')
(Pdb) quit

------------------
dkehn@vmcldev1 neutron] > pip search jsonrpclib
jsonrpclib - This project is an implementation of the JSON-RPC v2.0 specification (backwards-compatible) as a client library.
  INSTALLED: 0.1.3
  LATEST: 0.13
jsonrpclib-ned14 - This project is an implementation of the JSON-RPC v2.0 specification (backwards-compatible) as a client library.
jsonrpclib-pelix - Fork of jsonrpclib by Josh Marshall, usable with Pelix remote services.This project is an implementation of the JSON-RPC v2.0 specification (backwards-compatible) as a client library.

---------------
[dkehn@vmcldev1 neutron] > python
Python 2.7.3 (default, Apr 10 2013, 05:13:16)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jsonrpclib
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>>
 so its there

Revision history for this message
Kyle Mestery (mestery) wrote :

The below fixes it for me, and is a similar fix as was made for MechanismDrivers in bug 1221490.

[kmestery@fedora-mac neutron]$ git diff neutron/plugins/ml2/managers.py
diff --git a/neutron/plugins/ml2/managers.py b/neutron/plugins/ml2/managers.py
index 9fc2e5b..6c405a6 100644
--- a/neutron/plugins/ml2/managers.py
+++ b/neutron/plugins/ml2/managers.py
@@ -39,7 +39,8 @@ class TypeManager(stevedore.named.NamedExtensionManager):
                  cfg.CONF.ml2.type_drivers)
         super(TypeManager, self).__init__('neutron.ml2.type_drivers',
                                           cfg.CONF.ml2.type_drivers,
- invoke_on_load=True)
+ invoke_on_load=True,
+ name_order=True)
         LOG.info(_("Loaded type driver names: %s"), self.names())
         self._register_types()
         self._check_tenant_network_types(cfg.CONF.ml2.tenant_network_types)
[kmestery@fedora-mac neutron]$

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/45479

Changed in neutron:
status: New → In Progress
Revision history for this message
dkehn (dekehn) wrote :

This does fix it for me.

Revision history for this message
Kyle Mestery (mestery) wrote :

Moving this to Sukhdev. The Arista ML2 driver patch [1] added jsonrpc as a requirement, but this isn't being picked up by devstack, forcing a manual install of jsonrpc for ML2 to work.

[1] https://review.openstack.org/#/c/41213/

Changed in neutron:
importance: Critical → High
assignee: Kyle Mestery (mestery) → Sukhdev Kapur (sukhdev-8)
Revision history for this message
Sukhdev Kapur (sukhdev-8) wrote :

Attached fix to the ml2 plugin in devstack should take care of this issue.

Revision history for this message
Sukhdev Kapur (sukhdev-8) wrote :

submitted patch to address this fix at

https://review.openstack.org/45565

Kyle Mestery (mestery)
affects: neutron → devstack
Dean Troyer (dtroyer)
Changed in devstack:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers