Getting HTTP 500 when creating new instance [closed]

asked 2016-06-01 10:57:06 -0500

laurentiusoica gravatar image

updated 2016-06-02 02:11:56 -0500

Hello,

I've installed openstack liberty with TripleO. Overcloud is successfully deployed with 1 controller and 2 compute nodes.

When I try to create an instance it fails and the errors are:

From nova show:

No valid host was found. There are not enough hosts available.

From the compute node: HTTPInternalServerError: 500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

And the full trace is :

 Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2156, in _build_resources
     yield resources
   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2009, in _build_and_run_instance
     block_device_info=block_device_info)
   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2527, in spawn
     admin_pass=admin_password)
   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2953, in _create_image
     instance, size, fallback_from_host)
   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 6392, in _try_fetch_image_cache
     size=size)
   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 240, in cache
     *args, **kwargs)
   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 544, in create_image
     prepare_template(target=base, max_size=size, *args, **kwargs)
   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 254, in inner
     return f(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 230, in fetch_func_sync
     fetch_func(target=target, *args, **kwargs)
   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/utils.py", line 408, in fetch_image
     max_size=max_size)
   File "/usr/lib/python2.7/site-packages/nova/virt/images.py", line 123, in fetch_to_raw
     max_size=max_size)
   File "/usr/lib/python2.7/site-packages/nova/virt/images.py", line 113, in fetch
     IMAGE_API.download(context, image_href, dest_path=path)
   File "/usr/lib/python2.7/site-packages/nova/image/api.py", line 182, in download
     dst_path=dest_path)
   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 367, in download
     _reraise_translated_image_exception(image_id)
   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 613, in _reraise_translated_image_exception
     six.reraise(new_exc, None, exc_trace)
   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 365, in download
     image_chunks = self._client.call(context, 1, 'data', image_id)
   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 231, in call
     result = getattr(client.images, method)(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 148, in data
     % urlparse.quote(str(image_id)))
   File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 276, in get
     return self._request('GET', url, **kwargs)
   File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 268, in _request
     resp, body_iter = self._handle_response(resp)
   File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 89, in _handle_response
     raise exc.from_response(resp, resp.content)
 HTTPInternalServerError: 500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

Any hint in troubleshooting is highly appreciated. Thanks.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by laurentiusoica
close date 2016-06-02 09:22:12.909401

Comments

Can you check neutron and glance logs for any other message at controller and compute nodes?

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-06-02 02:12:42 -0500 )edit

Glance on controller: Container HEAD failed: http://192.0.2.22:8080/v1/AUTH_90a5abc5dcee4292af5c566a4adc45bd/glance (http://192.0.2.22:8080/v1/AUTH_90a5ab...) 404 Not Found Registry client request GET /images/debian-8.4.0-openstack-amd64 raised NotFound

laurentiusoica gravatar imagelaurentiusoica ( 2016-06-02 02:26:55 -0500 )edit

glance image-list | 7d0bf8a2-8d39-4f9b-a107-4acbcb51daca | debian-8.4.0-openstack-amd64 | qcow2 | bare | 481034240 | active |

laurentiusoica gravatar imagelaurentiusoica ( 2016-06-02 03:02:28 -0500 )edit

Check if in all glance nodes the images are present with the same id at /var/lib/glance/images and with the same permissions, i guess there is a problem with the replication between the storage. I don't know which backend are you using. Probably, if you have 3 glance registry, only 1 of 3 tries work

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-06-02 04:09:55 -0500 )edit

That's a common issue, you have a VIP/hostname for registry, you create an image and store it properly. If there is not replication under registry hosts is available, the image is only stored in one node, so you can't access to the image until the load balancer use the proper registry host.

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-06-02 04:13:41 -0500 )edit