← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1322157] Re: Invalid snapshot is created from volume backed instance

 

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

** Changed in: nova
    Milestone: None => juno-1

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

Title:
  Invalid snapshot is created from volume backed instance

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  An incorrect snapshot is created from volume backed instance booted
  from volume. The snapshot doesn't have disk_format and
  container_format attributes. As a result booting from the snapshot
  fails.

  Environment: DevStack

  Steps to reproduce:
  1 Create bootable volume
  $ cinder create --image-id xxx 1
  Note. I used cirros-0.3.2-x86_64-uec ami image.

  2 Boot instance from volume
  $ nova boot --flavor m1.nano --block-device id=yyy,source=volume,dest=volume,device=/dev/vda,bootindex=0,shutdown=remove 
  inst

  3 Create instance snapshot
  $ nova image-create inst snap

  4 Boot instance from snapshot
  $ nova boot --flavor m1.nano --image snap inst1

  The last command's output:
  ERROR (InternalServerError): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-45cb14af-3d80-4980-945e-1db6f958950b)

  Nova api log:
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack   File "/opt/stack/nova/nova/image/glance.py", line 277, in show
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack     base_image_meta = _translate_from_glance(image)
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack   File "/opt/stack/nova/nova/image/glance.py", line 462, in _translate_from_glance
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack     image_meta = _extract_attributes(image)
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack   File "/opt/stack/nova/nova/image/glance.py", line 530, in _extract_attributes
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack     output[attr] = getattr(image, attr)
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack   File "/opt/stack/python-glanceclient/glanceclient/openstack/common/apiclient/base.py", line 462, in __getattr__
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack     return self.__getattr__(k)
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack   File "/opt/stack/python-glanceclient/glanceclient/openstack/common/apiclient/base.py", line 464, in __getattr__
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack     raise AttributeError(k)
  2014-05-22 15:10:48.084 12610 TRACE nova.api.openstack AttributeError: disk_format

  6 Check instance snapshot attributes
  $ glance image-show snap
  Rows for disk and container format are absent.

  
  The problem is in _action_create_image in nova/api/openstack/compute/servers.py. 'not img' branch incorrectly initializes image_meta variable.

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


References