Nova API error

Bug #826037 reported by James Turnbull
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

I've installed Nova trunk and Nova milestone and configure it (Trunk is nova_2011.3~d4~20110812.1423-0ubuntu0ppa1~natty1).

Also installed is Glance and it is working:

$ glance add name=lucid_ami disk_format=ami container_format=ami is_public=True ramdisk_id=1 kernel_id=2 < /vagrant/images/lucid_ami/ubuntu-lucid.img

Added new image with ID: 3

$ glance index
ID Name Disk Format Container Format Size
---------------- ------------------------------ -------------------- -------------------- --------------
3 lucid_ami ami ami 524288000
2 kernel aki aki 4099360
1 ramdisk ari ari 7988037

Everything looks operational until I run:

$ euca-describe-images

And get:

UnknownError: An unknown error has occurred. Please try your request again.

The /var/log/nova/nova-api.log returns:

2011-08-13 16:38:53,463 ERROR nova.api [0b897778-7b50-4d63-ad4e-228f0dfff72d novaadmin nova] Environment: {"HTTP_AUTHORIZATION": "AWS 90128a28-aca3-45ff-99ea-a58d17a020b1:nova:G/LG35btCg71SBGCOGiTD9U+q88=", "CONTENT_TYPE": "text/plain", "SCRIPT_NAME": "/services/Cloud", "HTTP_DATE": "Sat, 13 Aug 2011 23:38:53 GMT", "REQUEST_METHOD": "GET", "HTTP_HOST": "10.0.2.15:8773", "PATH_INFO": "/", "SERVER_PROTOCOL": "HTTP/1.0", "QUERY_STRING": "AWSAccessKeyId=90128a28-aca3-45ff-99ea-a58d17a020b1%3Anova&Action=DescribeImages&Owner.1=self&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-08-13T23%3A38%3A53&Version=2009-11-30&Signature=jk9ffGsdB0mnBjK6oMeBvxYUZTyKts39c7Z7XseCq9I%3D", "CONTENT_LENGTH": "0", "HTTP_USER_AGENT": "Boto/1.9b (linux2)", "SERVER_NAME": "10.0.2.15", "REMOTE_ADDR": "10.0.2.15", "wsgi.url_scheme": "http", "SERVER_PORT": "8773", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "identity"}
2011-08-13 16:38:53,463 ERROR nova.api [0b897778-7b50-4d63-ad4e-228f0dfff72d novaadmin nova] UnknownError: An unknown error has occurred. Please try your request again.
2011-08-13 16:38:53,463 INFO nova.api [0b897778-7b50-4d63-ad4e-228f0dfff72d novaadmin nova] 0.39960s 10.0.2.15 GET /services/Cloud/ CloudController:DescribeImages 400 [Boto/1.9b (linux2)] text/plain text/xml
2011-08-13 16:47:31,041 AUDIT nova.api [a134b37a-c614-467c-9a9c-0b8fd4ea1bd8 novaadmin nova] Authenticated Request For novaadmin:nova)
2011-08-13 16:47:31,050 ERROR nova.api [a134b37a-c614-467c-9a9c-0b8fd4ea1bd8 novaadmin nova] Unexpected error raised: Internal Server error: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.7/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.7/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/glance/common/wsgi.py", line 113, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/pymodules/python2.7/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/pymodules/python2.7/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.7/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/pymodules/python2.7/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.7/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.7/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/glance/common/wsgi.py", line 311, in __call__
    request, **action_args)
  File "/usr/lib/pymodules/python2.7/glance/common/wsgi.py", line 328, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/glance/api/v1/images.py", line 139, in detail
    images = registry.get_images_detail(self.options, req.context,
  File "/usr/lib/pymodules/python2.7/webob/request.py", line 1181, in __getattr__
    raise AttributeError(attr)
AttributeError: context
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py", line 325, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/api/ec2/apirequest.py", line 78, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/api/ec2/cloud.py", line 1504, in describe_images
(nova.api): TRACE: images = self.image_service.detail(context)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/image/s3.py", line 78, in detail
(nova.api): TRACE: return self.service.detail(context)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/image/glance.py", line 113, in detail
(nova.api): TRACE: for image_meta in image_metas:
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/image/glance.py", line 142, in _fetch_images
(nova.api): TRACE: images = fetch_func(**kwargs)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/glance/client.py", line 86, in get_images_detailed
(nova.api): TRACE: res = self.do_request("GET", "/images/detail", params=params)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/glance/client.py", line 56, in do_request
(nova.api): TRACE: headers, params)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/glance/common/client.py", line 152, in do_request
(nova.api): TRACE: raise Exception("Internal Server error: %s" % res.read())
(nova.api): TRACE: Exception: Internal Server error: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response
(nova.api): TRACE: result = self.application(self.environ, start_response)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/dec.py", line 147, in __call__
(nova.api): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/dec.py", line 208, in call_func
(nova.api): TRACE: return self.func(req, *args, **kwargs)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/glance/common/wsgi.py", line 113, in __call__
(nova.api): TRACE: response = req.get_response(self.application)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/request.py", line 1053, in get_response
(nova.api): TRACE: application, catch_exc_info=False)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/request.py", line 1022, in call_application
(nova.api): TRACE: app_iter = application(self.environ, start_response)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/dec.py", line 159, in __call__
(nova.api): TRACE: return resp(environ, start_response)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__
(nova.api): TRACE: response = self.app(environ, start_response)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/dec.py", line 159, in __call__
(nova.api): TRACE: return resp(environ, start_response)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/dec.py", line 147, in __call__
(nova.api): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/dec.py", line 208, in call_func
(nova.api): TRACE: return self.func(req, *args, **kwargs)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/glance/common/wsgi.py", line 311, in __call__
(nova.api): TRACE: request, **action_args)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/glance/common/wsgi.py", line 328, in dispatch
(nova.api): TRACE: return method(*args, **kwargs)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/glance/api/v1/images.py", line 139, in detail
(nova.api): TRACE: images = registry.get_images_detail(self.options, req.context,
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/webob/request.py", line 1181, in __getattr__
(nova.api): TRACE: raise AttributeError(attr)
(nova.api): TRACE: AttributeError: context
(nova.api): TRACE:
(nova.api): TRACE:
2011-08-13 16:47:31,052 ERROR nova.api [a134b37a-c614-467c-9a9c-0b8fd4ea1bd8 novaadmin nova] Environment: {"HTTP_AUTHORIZATION": "AWS 90128a28-aca3-45ff-99ea-a58d17a020b1:nova:Cvh/h+wOjJYn1JyzR2ik/8K9mHc=", "CONTENT_TYPE": "text/plain", "SCRIPT_NAME": "/services/Cloud", "HTTP_DATE": "Sat, 13 Aug 2011 23:47:30 GMT", "REQUEST_METHOD": "GET", "HTTP_HOST": "10.0.2.15:8773", "PATH_INFO": "/", "SERVER_PROTOCOL": "HTTP/1.0", "QUERY_STRING": "AWSAccessKeyId=90128a28-aca3-45ff-99ea-a58d17a020b1%3Anova&Action=DescribeImages&Owner.1=self&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-08-13T23%3A47%3A30&Version=2009-11-30&Signature=165HsmUfqfx1PwV78TQzawMMEtmkkMkX8DQePylEfls%3D", "CONTENT_LENGTH": "0", "HTTP_USER_AGENT": "Boto/1.9b (linux2)", "SERVER_NAME": "10.0.2.15", "REMOTE_ADDR": "10.0.2.15", "wsgi.url_scheme": "http", "SERVER_PORT": "8773", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "identity"}
2011-08-13 16:47:31,052 ERROR nova.api [a134b37a-c614-467c-9a9c-0b8fd4ea1bd8 novaadmin nova] UnknownError: An unknown error has occurred. Please try your request again.
2011-08-13 16:47:31,052 INFO nova.api [a134b37a-c614-467c-9a9c-0b8fd4ea1bd8 novaadmin nova] 0.41894s 10.0.2.15 GET /services/Cloud/ CloudController:DescribeImages 400 [Boto/1.9b (linux2)] text/plain text/xml

Revision history for this message
Matteo Ferraroni (m-ferraroni) wrote :

Same happens to me.
 Workaround is described here:
https://answers.launchpad.net/nova/+question/163298

Revision history for this message
James Turnbull (jamtur01) wrote :

Not the same problem - I have glance installed, configured and working.

Revision history for this message
Matteo Ferraroni (m-ferraroni) wrote :

You didn't say that you have glance installed, please update the bug description.

Check if glance is working and if it is listening on the right port and ip address, also double-check your nova.conf keeping in mind that you have to change glance' host flags with --glance_api_servers

Revision history for this message
James Turnbull (jamtur01) wrote :

Updated description and checked all that. Still not working. Thanks for the suggestion.

description: updated
Revision history for this message
Jay Pipes (jaypipes) wrote :

Please see the fix for this issue here: https://bugs.launchpad.net/bugs/814981

Revision history for this message
James Turnbull (jamtur01) wrote :

This is a dup of https://bugs.launchpad.net/glance/+bug/814981 - the glance packages aren't updating the glance-api.conf and glance-registry.conf files.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.