← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1329313] [NEW] server migration fails if it image in glance was deleted

 

Public bug reported:

If instance is migrated from hypervisor by 'nova host-servers-migrate'
and it image was deleted, instance fails to start with message

{u'message': u'Image d2ab45e6-3db0-450b-b5aa-8b0646e063a2 could not be
found.', u'code': 404, u'created': u'2014-06-12T12:39:27Z'}

Steps to reproduce:
1. Create instance
2. Delete image that instance starts from.
3. Run nova host-servers-migrate on host where instance running

Expected behavior:
Instance migrate successfully.

Actual behavior:
Instance transferring to new hypervisor but fail to start with message:

status: ERROR
fault: {u'message': u'Image d2ab45e6-3db0-450b-b5aa-8b0646e063a2 could not be found.', u'code': 404, u'created': u'2014-06-12T12:39:27Z'}

nova-compute at destination hypervisor:


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 3162, in finish_resize
    disk_info, image)
  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 3130, in _finish_resize
    block_device_info, power_on)
  File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 4605, in finish_migration
    block_device_info=None, inject_files=False)
  File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2389, in _create_image
    project_id=instance['project_id'])
  File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 179, in cache
    *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 336, in create_image
    prepare_template(target=base, max_size=size, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 246, in inner
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 167, in call_if_not_exists
    fetch_func(target=target, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/utils.py", line 645, in fetch_image
    max_size=max_size)
  File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 196, in fetch_to_raw
    max_size=max_size)
  File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 190, in fetch
    image_service.download(context, image_id, dst_path=path)
  File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 349, in download 
    _reraise_translated_image_exception(image_id)
  File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 347, in download 
    image_chunks = self._client.call(context, 1, 'data', image_id)
  File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 212, in call
    return getattr(client.images, method)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 127, in data
    % urllib.quote(str(image_id)))
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 272, in raw_request
    return self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 233, in _http_request
    raise exc.from_response(resp, body_str)
ImageNotFound: Image d2ab45e6-3db0-450b-b5aa-8b0646e063a2 could not be found.


Version: havana,  1:2013.2.3-0ubuntu1~cloud0 (ubuntu)

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1329313

Title:
  server migration fails if it image in glance was deleted

Status in OpenStack Compute (Nova):
  New

Bug description:
  If instance is migrated from hypervisor by 'nova host-servers-migrate'
  and it image was deleted, instance fails to start with message

  {u'message': u'Image d2ab45e6-3db0-450b-b5aa-8b0646e063a2 could not be
  found.', u'code': 404, u'created': u'2014-06-12T12:39:27Z'}

  Steps to reproduce:
  1. Create instance
  2. Delete image that instance starts from.
  3. Run nova host-servers-migrate on host where instance running

  Expected behavior:
  Instance migrate successfully.

  Actual behavior:
  Instance transferring to new hypervisor but fail to start with message:

  status: ERROR
  fault: {u'message': u'Image d2ab45e6-3db0-450b-b5aa-8b0646e063a2 could not be found.', u'code': 404, u'created': u'2014-06-12T12:39:27Z'}

  nova-compute at destination hypervisor:

  
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 3162, in finish_resize
      disk_info, image)
    File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 3130, in _finish_resize
      block_device_info, power_on)
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 4605, in finish_migration
      block_device_info=None, inject_files=False)
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2389, in _create_image
      project_id=instance['project_id'])
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 179, in cache
      *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 336, in create_image
      prepare_template(target=base, max_size=size, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 246, in inner
      return f(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 167, in call_if_not_exists
      fetch_func(target=target, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/utils.py", line 645, in fetch_image
      max_size=max_size)
    File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 196, in fetch_to_raw
      max_size=max_size)
    File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 190, in fetch
      image_service.download(context, image_id, dst_path=path)
    File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 349, in download 
      _reraise_translated_image_exception(image_id)
    File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 347, in download 
      image_chunks = self._client.call(context, 1, 'data', image_id)
    File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 212, in call
      return getattr(client.images, method)(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 127, in data
      % urllib.quote(str(image_id)))
    File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 272, in raw_request
      return self._http_request(url, method, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 233, in _http_request
      raise exc.from_response(resp, body_str)
  ImageNotFound: Image d2ab45e6-3db0-450b-b5aa-8b0646e063a2 could not be found.

  
  Version: havana,  1:2013.2.3-0ubuntu1~cloud0 (ubuntu)

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


Follow ups

References