Module nova.api.ec2 has no Versions attribute

Asked by Lorin Hochstein

I'm trying to configure Nova to use Keystone. I'm using the API paste config file from keystone/examples/patse/nova-api-paste.ini (attached). When I try to start the service, I get the following error:

2011-12-06 15:51:19,122 CRITICAL nova [-] <module 'nova.api.ec2' from '/usr/local/nova/nova/api/ec2/__init__.pyc'> has no 'Versions' attribute
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/local/nova//bin/nova-api", line 51, in <module>
(nova): TRACE: servers.append(service.WSGIService(api))
(nova): TRACE: File "/usr/local/nova/nova/service.py", line 306, in __init__
(nova): TRACE: self.app = self.loader.load_app(name)
(nova): TRACE: File "/usr/local/nova/nova/wsgi.py", line 411, in load_app
(nova): TRACE: return deploy.loadapp("config:%s" % self.config_path, name=name)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
(nova): TRACE: return loadobj(APP, uri, name=name, **kw)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
(nova): TRACE: return context.create()
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 710, in create
(nova): TRACE: return self.object_type.invoke(self)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
(nova): TRACE: **context.local_conf)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/util.py", line 56, in fix_call
(nova): TRACE: val = callable(*args, **kw)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 25, in urlmap_factory
(nova): TRACE: app = loader.get_app(app_name, global_conf=global_conf)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app
(nova): TRACE: name=name, global_conf=global_conf).create()
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 362, in app_context
(nova): TRACE: APP, name=name, global_conf=global_conf)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 450, in get_context
(nova): TRACE: global_additions=global_additions)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 559, in _pipeline_app_context
(nova): TRACE: APP, pipeline[-1], global_conf)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 458, in get_context
(nova): TRACE: section)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
(nova): TRACE: value = import_string(found_expr)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 22, in import_string
(nova): TRACE: return pkg_resources.EntryPoint.parse("x=" + s).load(False)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1953, in load
(nova): TRACE: raise ImportError("%r has no %r attribute" % (entry,attr))
(nova): TRACE: ImportError: <module 'nova.api.ec2' from '/usr/local/nova/nova/api/ec2/__init__.pyc'> has no 'Versions' attribute

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Lorin Hochstein (lorinh) said :
#1

Here's the ini file I'm using:

#######
# EC2 #
#######

[composite:ec2]
use = egg:Paste#urlmap
/: ec2versions
/services/Cloud: ec2cloud
/services/Admin: ec2admin
/latest: ec2metadata
/2007-01-19: ec2metadata
/2007-03-01: ec2metadata
/2007-08-29: ec2metadata
/2007-10-10: ec2metadata
/2007-12-15: ec2metadata
/2008-02-01: ec2metadata
/2008-09-01: ec2metadata
/2009-04-04: ec2metadata
/1.0: ec2metadata

[pipeline:ec2cloud]
pipeline = logrequest totoken authtoken keystonecontext cloudrequest authorizer ec2executor

[pipeline:ec2admin]
pipeline = logrequest totoken authtoken keystonecontext adminrequest authorizer ec2executor

[pipeline:ec2metadata]
pipeline = logrequest ec2md

[pipeline:ec2versions]
pipeline = logrequest ec2ver

[filter:logrequest]
paste.filter_factory = nova.api.ec2:RequestLogging.factory

[filter:ec2lockout]
paste.filter_factory = nova.api.ec2:Lockout.factory

[filter:totoken]
paste.filter_factory = keystone.middleware.ec2_token:EC2Token.factory

[filter:ec2noauth]
paste.filter_factory = nova.api.ec2:NoAuth.factory

[filter:authenticate]
paste.filter_factory = nova.api.ec2:Authenticate.factory

[filter:cloudrequest]
controller = nova.api.ec2.cloud.CloudController
paste.filter_factory = nova.api.ec2:Requestify.factory

[filter:adminrequest]
controller = nova.api.ec2.admin.AdminController
paste.filter_factory = nova.api.ec2:Requestify.factory

[filter:authorizer]
paste.filter_factory = nova.api.ec2:Authorizer.factory

[app:ec2executor]
paste.app_factory = nova.api.ec2:Executor.factory

[app:ec2ver]
paste.app_factory = nova.api.ec2:Versions.factory

[app:ec2md]
paste.app_factory = nova.api.ec2.metadatarequesthandler:MetadataRequestHandler.factory

#############
# Openstack #
#############

[composite:osapi]
use = egg:Paste#urlmap
/: osversions
/v1.1: openstackapi

[pipeline:openstackapi]
pipeline = faultwrap authtoken keystonecontext ratelimit extensions osapiapp

[filter:faultwrap]
paste.filter_factory = nova.api.openstack:FaultWrapper.factory

[filter:auth]
paste.filter_factory = nova.api.openstack.auth:AuthMiddleware.factory

[filter:noauth]
paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory

[filter:ratelimit]
paste.filter_factory = nova.api.openstack.limits:RateLimitingMiddleware.factory

[filter:extensions]
paste.filter_factory = nova.api.openstack.extensions:ExtensionMiddleware.factory

[app:osapiapp]
paste.app_factory = nova.api.openstack:APIRouter.factory

[pipeline:osversions]
pipeline = faultwrap osversionapp

[app:osversionapp]
paste.app_factory = nova.api.openstack.versions:Versions.factory

##########
# Shared #
##########

[filter:keystonecontext]
paste.filter_factory = keystone.middleware.nova_keystone_context:NovaKeystoneContext.factory

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_token = 999888777666
auth_timeout = 30
;Uncomment the following out for memcached caching
;memcache_hosts = 127.0.0.1:11211

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

You might try grabbing a paste config from devstack. We attempt to keep it current. The stable/diablo branch has one for diablo and trunk has one that works for trunk.

On Dec 6, 2011, at 1:15 PM, Lorin Hochstein wrote:

> New question #181098 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/181098
>
> I'm trying to configure Nova to use Keystone. I'm using the API paste config file from keystone/examples/patse/nova-api-paste.ini (attached). When I try to start the service, I get the following error:
>
>
> 2011-12-06 15:51:19,122 CRITICAL nova [-] <module 'nova.api.ec2' from '/usr/local/nova/nova/api/ec2/__init__.pyc'> has no 'Versions' attribute
> (nova): TRACE: Traceback (most recent call last):
> (nova): TRACE: File "/usr/local/nova//bin/nova-api", line 51, in <module>
> (nova): TRACE: servers.append(service.WSGIService(api))
> (nova): TRACE: File "/usr/local/nova/nova/service.py", line 306, in __init__
> (nova): TRACE: self.app = self.loader.load_app(name)
> (nova): TRACE: File "/usr/local/nova/nova/wsgi.py", line 411, in load_app
> (nova): TRACE: return deploy.loadapp("config:%s" % self.config_path, name=name)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
> (nova): TRACE: return loadobj(APP, uri, name=name, **kw)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
> (nova): TRACE: return context.create()
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 710, in create
> (nova): TRACE: return self.object_type.invoke(self)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
> (nova): TRACE: **context.local_conf)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/util.py", line 56, in fix_call
> (nova): TRACE: val = callable(*args, **kw)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 25, in urlmap_factory
> (nova): TRACE: app = loader.get_app(app_name, global_conf=global_conf)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app
> (nova): TRACE: name=name, global_conf=global_conf).create()
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 362, in app_context
> (nova): TRACE: APP, name=name, global_conf=global_conf)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 450, in get_context
> (nova): TRACE: global_additions=global_additions)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 559, in _pipeline_app_context
> (nova): TRACE: APP, pipeline[-1], global_conf)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 458, in get_context
> (nova): TRACE: section)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
> (nova): TRACE: value = import_string(found_expr)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 22, in import_string
> (nova): TRACE: return pkg_resources.EntryPoint.parse("x=" + s).load(False)
> (nova): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1953, in load
> (nova): TRACE: raise ImportError("%r has no %r attribute" % (entry,attr))
> (nova): TRACE: ImportError: <module 'nova.api.ec2' from '/usr/local/nova/nova/api/ec2/__init__.pyc'> has no 'Versions' attribute
>
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Can you help with this problem?

Provide an answer of your own, or ask Lorin Hochstein for more information if necessary.

To post a message you must log in.