Can't create volume from image

Solution Verified - Updated -

Issue

  • After creating image in Glance, Cinder is unable to create a volume from it.
  • Booting an instance from volume that's created using image fails on director install using ceph backend.
  • Boot from image (creates a new volume) fails with "Instance failed block device setup"
$ openstack image create --file overcloud-full.qcow2 --disk-format qcow2 --owner <uuid> test-image
+------------------+--------------------------------------+
| Field            | Value                                |
+------------------+--------------------------------------+
| checksum         | <uuid>     |
| container_format | bare                                 |
| created_at       | 2016-01-27T20:27:28.000000           |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | <uuid> |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | test-image                       |
| owner            | <uuid>     |
| properties       | {}                                   |
| protected        | False                                |
| size             | 1198850048                           |
| status           | active                               |
| updated_at       | 2016-01-27T20:27:43.000000           |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

$ openstack volume create --image <uuid> --project <uuid> --size 10 test-volume
ERROR: openstack The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-932fbced-2088-4309-aacb-4239576fed8e)
  • Traceback seen in volume.log:
2016-01-27 15:44:35.744 21871 WARNING cinder.volume.api [req-d3285998-4960-46e9-ae65-620698d523ff - - - - -] Task 'cinder.volume.flows.api.create_volume.ExtractVolumeRequestTask;volume:create' (<uuid>) transitioned into state 'FAILURE' from state 'RUNNING'
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api Traceback (most recent call last):
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api   File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 67, in _execute_task
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api     result = task.execute(**arguments)
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api   File "/usr/lib/python2.7/site-packages/cinder/volume/flows/api/create_volume.py", line 417, in execute
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api     self._check_image_metadata(context, image_id, size)
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api   File "/usr/lib/python2.7/site-packages/cinder/volume/flows/api/create_volume.py", line 251, in _check_image_metadata
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api     image_meta = self.image_service.show(context, image_id)
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api   File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 243, in show
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api     base_image_meta = self._translate_from_glance(context, image)
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api   File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 366, in _translate_from_glance
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api     for key in image.keys()
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api   File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 367, in <dictcomp>
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api     if self._image_schema.is_base_property(key) is True
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api AttributeError: 'Schema' object has no attribute 'is_base_property'
2016-01-27 15:44:35.744 21871 TRACE cinder.volume.api 
2016-01-27 15:44:35.748 21871 WARNING cinder.volume.api [req-d3285998-4960-46e9-ae65-620698d523ff - - - - -] Task 'cinder.volume.flows.api.create_volume.ExtractVolumeRequestTask;volume:create' (<uuid>) transitioned into state 'REVERTED' from state 'REVERTING'
2016-01-27 15:44:35.749 21871 WARNING cinder.volume.api [req-d3285998-4960-46e9-ae65-620698d523ff - - - - -] Flow 'volume_create_api' (<uuid>) transitioned into state 'REVERTED' from state 'RUNNING'
2016-01-27 15:44:35.750 21871 ERROR cinder.api.middleware.fault [req-d3285998-4960-46e9-ae65-620698d523ff - - - - -] Caught error: 'Schema' object has no attribute 'is_base_property'
  • If booting the instance from volume created by image in horizon errors may look like:
compute-node/nova/compute.log

-2267-43f5-aa94-6222d5e8f115] Instance failed block device setup
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115] Traceback (most recent call last):
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1987, in _prep_block_device
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]     do_check_attach=do_check_attach) +
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 471, in attach_block_devices
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]     map(_log_and_attach, block_device_mapping)
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 469, in _log_and_attach
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]     bdm.attach(*attach_args, **attach_kwargs)
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 380, in attach
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]     availability_zone=av_zone)
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]   File "/usr/lib/python2.7/site-packages/nova/volume/cinder.py", line 408, in create
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]     raise exception.InvalidInput(reason=e)
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115] InvalidInput: Invalid input received: Invalid image identifier or unable to access requested image. (HTTP 400) (Request-ID: req-9aec8056-7cd1-46bc-be92-a2022a399c27)
2016-02-17 15:45:19.725 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]
2016-02-17 15:45:19.726 3632 ERROR nova.compute.manager [req-916897af-63ec-430d-a4e1-0ea3f73c3bca c14f271b6da84d04ac2c1ff71d3e3eb9 601ef230893a4e48968929a5f8756099 - - -] [instance: 97348e01-2267-43f5-aa94-6222d5e8f115] Failure prepping block device
2016-02-17 15:45:19.726 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115] Traceback (most recent call last):
2016-02-17 15:45:19.726 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2461, in _build_resources
2016-02-17 15:45:19.726 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]     block_device_mapping)
2016-02-17 15:45:19.726 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2015, in _prep_block_device
2016-02-17 15:45:19.726 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]     raise exception.InvalidBDM()
2016-02-17 15:45:19.726 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115] InvalidBDM: Block Device Mapping is Invalid.
2016-02-17 15:45:19.726 3632 TRACE nova.compute.manager [instance: 97348e01-2267-43f5-aa94-6222d5e8f115]
2016-02-17 15:45:19.726 3632 DEBUG nova.compute.claims [req-916897af-63ec-430d-a4e1-0ea3f73c3bca c14f271b6da84d04ac2c1ff71d3e3eb9 601ef230893a4e48968929a5f8756099 - - -] [instance: 97348e01-2267-43f5-aa94-6222d5e8f115] Aborting claim: [Claim: 4096 MB memory, 40 GB disk] abort /usr/lib/python2.7/site-packages/nova/compute/claims.py:130
compute-0 /cinder/api.log
 2016-02-17 15:45:19.722 22249 INFO cinder.api.openstack.wsgi [req-9aec8056-7cd1-46bc-be92-a2022a399c27 c14f271b6da84d04ac2c1ff71d3e3eb9 601ef230893a4e48968929a5f8756099 - - -] HTTP exception thrown: Invalid image identifier or unable to access requested image.

Environment

  • Red Hat OpenStack Platform 7.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In