← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1596602] Re: Instance Snapshot failure: "Unable to set 'kernel_id' to 'None'. Reason: None is not of type u'string'"

 

Reviewed:  https://review.openstack.org/347971
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2f2b0e954d7738c2bf49a48a708cc0ce2b19e726
Submitter: Jenkins
Branch:    master

commit 2f2b0e954d7738c2bf49a48a708cc0ce2b19e726
Author: Mike Fedosin <mfedosin@xxxxxxxxxxxx>
Date:   Wed Jul 27 20:34:41 2016 +0300

    Don't set empty kernel_id and ramdisk_id to glance image
    
    In some cases, if 'allow_additional_properties' option is
    disabled in Glance, 'kernel_id' and 'ramdisk_id' are considered
    the usual properties and cannot have None values. So it's better
    always omit these props and never send them to Glance if they are
    empty.
    
    Change-Id: I3dd2a3f39d31a79c86bdbe7b656d42c20c560af3
    Closes-bug: #1596602


** Changed in: nova
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1596602

Title:
  Instance Snapshot failure: "Unable to set 'kernel_id' to 'None'.
  Reason: None is not of type u'string'"

Status in OpenStack Compute (nova):
  Fix Released
Status in python-glanceclient:
  Fix Released

Bug description:
  Description
  ===========
  Attempted to take a snapshot of a suspended server through the CLI, but the command failed. (Nova log stack trace appended below)

  Steps to reproduce
  ==================
  1. Created a server instance:
     $ nova boot --image <image> --flavor m1.tiny snapshotvm
  2. Suspended the server:
     $ openstack server suspend <instance>
  3. Attempt to create server snapshot:
     $ nova image-create snapshotvm snapshotimage --poll

  Expected result
  ===============
  Expected to have a snapshot of my instance created in the image list.

  Actual result
  =============
  Received following error output from the image create command:

  # nova image-create snapshotvm snapshotimage --poll

  Server snapshotting... 25% complete
  ERROR (NotFound): Image not found. (HTTP 404) (Request-ID: req-4670eba3-a0d5-4814-b0a8-4aba37a1dd3a)

  Environment
  ===========
  1. Running from master level of Openstack

  2. Using KVM virtualization on Ubuntu 14.04:
  # kvm --version
  QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.24), Copyright (c) 2003-2008 Fabrice Bellard

  2. Which storage type did you use?
     LVM

  3. Which networking type did you use?
     Neutron


  2016-06-27 15:04:21.361 10781 INFO nova.compute.manager [req-f393be05-96c2-4d52-bfc1-0c5b644c553e d672d690e856437196a748ebc85abb41 b9b13412e4fd4fd6a6016368b720309e - - -] [instance: ab71489a-0716-404b-808a-165f2a85af74] Successfully reverted task state from image_uploading on failure for instance.
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server [req-f393be05-96c2-4d52-bfc1-0c5b644c553e d672d690e856437196a748ebc85abb41 b9b13412e4fd4fd6a6016368b720309e - - -] Exception during message handling
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     res = self.dispatcher.dispatch(message)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 150, in dispatch
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 121, in _do_dispatch
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     result = func(ctxt, **new_args)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/exception.py", line 104, in wrapped
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     payload)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 221, in __exit__
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     self.force_reraise()
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 197, in force_reraise
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/exception.py", line 83, in wrapped
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     return f(self, context, *args, **kw)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 183, in decorated_function
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     LOG.warning(msg, e, instance=instance)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 221, in __exit__
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     self.force_reraise()
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 197, in force_reraise
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 152, in decorated_function
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     return function(self, context, *args, **kwargs)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 211, in decorated_function
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     kwargs['instance'], e, sys.exc_info())
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 221, in __exit__
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     self.force_reraise()
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 197, in force_reraise
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 199, in decorated_function
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     return function(self, context, *args, **kwargs)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 259, in decorated_function
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     instance=instance)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 221, in __exit__
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     self.force_reraise()
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 197, in force_reraise
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     six.reraise(self.type_, self.value, self.tb)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 249, in decorated_function
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     *args, **kwargs)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 2983, in snapshot_instance
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     task_states.IMAGE_SNAPSHOT)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/compute/manager.py", line 3013, in _snapshot_instance
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     update_task_state)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1549, in snapshot
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     image_file)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/image/api.py", line 130, in update
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     purge_props=purge_props)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/image/glance.py", line 694, in update
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     _reraise_translated_image_exception(image_id)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/image/glance.py", line 1019, in _reraise_translated_image_exception
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     six.reraise(new_exc, None, exc_trace)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/image/glance.py", line 692, in update
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     image = self._update_v2(context, sent_service_image_meta, data)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/image/glance.py", line 702, in _update_v2
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     context, 2, 'update', **sent_service_image_meta)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/nova/image/glance.py", line 174, in call
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     result = getattr(client.images, method)(*args, **kwargs)
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server   File "/opt/bbc/openstack-11.0-master/nova/local/lib/python2.7/site-packages/glanceclient/v2/images.py", line 264, in update
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     raise TypeError(encodeutils.exception_to_unicode(e))
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server TypeError: Unable to set 'kernel_id' to 'None'. Reason: None is not of type u'string'
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server 
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server Failed validating u'type' in schema[u'additionalProperties']:
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     {u'type': u'string'}
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server 
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server On instance['kernel_id']:
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server     None
  2016-06-27 15:04:21.364 10781 ERROR oslo_messaging.rpc.server

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1596602/+subscriptions


References