Nova compute error spawning instances with Kilo

Bug #1457339 reported by Tom Verdaat
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Glance Client
New
Undecided
Unassigned
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Just upgraded from Juno to Kilo and am now getting the error below on compute nodes when launching a new instance. Using Ubuntu 14.04 (cloud archive repo), KVM and Ceph. Not clear what's causing this, only know that it did work on Juno!

    Instance failed to spawn
     Traceback (most recent call last):
       File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2442, in _build_resources
         yield resources
       File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2314, in _build_and_run_instance
         block_device_info=block_device_info)
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2347, in spawn
         admin_pass=admin_password)
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2745, in _create_image
         instance, size, fallback_from_host)
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 5875, in _try_fetch_image_cache
         size=size)
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 231, in cache
         *args, **kwargs)
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 727, in create_image
         prepare_template(target=base, max_size=size, *args, **kwargs)
       File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 445, in inner
         return f(*args, **kwargs)
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 221, in fetch_func_sync
         fetch_func(target=target, *args, **kwargs)
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2737, in clone_fallback_to_fetch
         backend.clone(context, disk_images['image_id'])
       File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 752, in clone
         include_locations=True)
       File "/usr/lib/python2.7/dist-packages/nova/image/api.py", line 93, in get
         show_deleted=show_deleted)
       File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 301, in show
         _reraise_translated_image_exception(image_id)
       File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 299, in show
         image = self._client.call(context, version, 'get', image_id)
       File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 219, in call
         return getattr(client.images, method)(*args, **kwargs)
       File "/usr/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 106, in get
         return self.model(**body)
       File "/usr/lib/python2.7/dist-packages/warlock/core.py", line 32, in __init__
         base_class.__init__(self, *args, **kwargs)
       File "/usr/lib/python2.7/dist-packages/warlock/model.py", line 35, in __init__
         raise ValueError(str(exc))
     ValueError: None is not of type u'string'

     Failed validating u'type' in schema[u'additionalProperties']:
         {u'type': u'string'}

     On instance[u'description']:
         None

Tags: libvirt
Revision history for this message
KV (kkvv) wrote :

I had the same issue. Turned out to be glance. Are you able to execute
 glance image-list

I had to delete my affected image, and recreate from start with option " --visibility public"

Revision history for this message
Tom Verdaat (tom-verdaat) wrote :

Figured out part of the problem: glanceclient indeed fails when using API version 2 and the image description field is empty. Hence, it works when using glance API version 1 and/or when the image has a description. More on this bug in https://bugs.launchpad.net/python-glanceclient/+bug/1419823

Adding a description to all images is a nice workaround, but not a reliable solution. Given that the description field is optional in API version 1, we cannot be sure that no new images are added by users without a description in the future. So preferably the bug in glanceclient gets fixed such that it can handle images with empty description fields.

But the only way to be assured of proper operation RIGHT NOW would be to force nova-compute to use glance API version 1. Can't find a configuration value for that so does one achieve this???

Michael Still (mikal)
tags: added: libvirt
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.