Ask Your Question
0

openstack ceph cannot create a volume from image

asked 2016-12-16 11:42:36 -0500

gustavo gravatar image

Hi,

I have a openstack mitaka cluster with a ceph storage backend, I configured cinder, glance and nova services. I'm able to launch an instance from an image, not from volume (cirros-0.3.4), I also be able to attach a volume (stored into the ceph backend) to the instance, but I cannot create a volume from an image.

I'm able to create a image with this command:

glance image-create --name='cirros-0.3.4_raw2' --disk-format='raw' --container-format='ovf' --file cirros-0.3.4-x86_64-disk.raw

And I'm able to create a volume with this command:

openstack volume create --type CEPH --size 1 testVolumeNotFromImage

But if I try to create a volume from an image the procedure is not finish successfully, there isn't any error, the volume in openstack stay in downloading state

cinder create --image-id cea461e1-a815-4d61-b72a-58feb001922f --display-name boot-from-rbd 2

Output

+--------------------------------------+------------------------+-------------+------+-------------+
| ID                                   | Display Name           | Status      | Size | Attached to |
+--------------------------------------+------------------------+-------------+------+-------------+
| 89494715-356e-4406-b555-90e14968fa1f | boot-from-rbd          | downloading |    2 |             |
| 820ec0d5-9438-4f5f-ab69-ffdb9ca8bf8f | vol_from_image_rbd2    | downloading |    1 |             |
| 0f0b9860-48c9-4c6f-8274-5fdf29045b2c | testVolumeNotFromImage | available   |    1 |             |
+--------------------------------------+------------------------+-------------+------+-------------+

In ceph backend no volume has been created

The cinder volume log (/var/log/cinder/volume.log) only write the following lines after launch de command to create the image:

    2016-12-16 17:35:17.255 2016 INFO cinder.volume.flows.manager.create_volume [req-22ece44c-c841-4fe2-8db3-f1d0d40d1428 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Volume 89494715-356e-4406-b555-90e14968fa1f: being created as image with specification: {'status': u'creating', 'image_location': (None, None), 'volume_size': 2, 'volume_name': 'volume-89494715-356e-4406-b555-90e14968fa1f', 'image_id': u'cea461e1-a815-4d61-b72a-58feb001922f', 'image_service': <cinder.image.glance.GlanceImageService object at 0x6d163d0>, 'image_meta': {'status': u'active', 'name': u'cirros-0.3.4_raw2', 'deleted': False, 'container_format': u'ovf', 'created_at': datetime.datetime(2016, 12, 16, 16, 33, 36, tzinfo=<iso8601.Utc>), 'disk_format': u'raw', 'updated_at': datetime.datetime(2016, 12, 16, 16, 33, 42, tzinfo=<iso8601.Utc>), 'id': u'cea461e1-a815-4d61-b72a-58feb001922f', 'owner': u'1dd6f387564940a19303cb6ec9b37f75', 'min_ram': 0, 'checksum': u'56730d3091a764d5f8b38feeef0bfcef', 'min_disk': 0, 'is_public': False, 'deleted_at': None, 'properties': {}, 'size': 41126400}}
2016-12-16 17:35:20.233 2016 INFO cinder.image.image_utils [req-22ece44c-c841-4fe2-8db3-f1d0d40d1428 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Image download 39.00 MB at 13.17 MB/s
2016-12-16 17:35:25.432 2016 INFO cinder.image.image_utils [req-22ece44c-c841-4fe2-8db3-f1d0d40d1428 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Converted 39.00 MB image at 39.00 MB/s

Looking the last two rows of the log seems that the image has been downloaded from glance and it has been converted but then any command to create the volume was logged.

When i created a volumen not from an image the volume log have the folowing lines:

    2016-12-16 18:30:20.456 2016 INFO cinder.volume.flows.manager.create_volume [req-ccb7cf8e-0bb5-4fa7-8bc0-7c27ef5d0af4 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Volume 6f0c3900-8c61-41ca-be6f-f789971113c7: being created as raw with specification: {'status': u'creating', 'volume_size': 1, 'volume_name': 'volume-6f0c3900-8c61-41ca-be6f-f789971113c7'}
2016-12-16 18:30:22.635 2016 INFO cinder.volume.flows.manager.create_volume [req-ccb7cf8e-0bb5-4fa7-8bc0-7c27ef5d0af4 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Volume volume-6f0c3900-8c61-41ca-be6f-f789971113c7 (6f0c3900-8c61-41ca-be6f-f789971113c7): created successfully
2016-12-16 18:30:22.638 2016 INFO cinder.volume.manager [req-ccb7cf8e-0bb5-4fa7-8bc0-7c27ef5d0af4 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Created volume successfully.

Please someone can help me? Thanks. Gustavo.

edit retag flag offensive close merge delete

Comments

I wonder if Cinder or Ceph get confused by the wrong container format? It should be bare, not ovf.

Bernd Bausch gravatar imageBernd Bausch ( 2016-12-18 08:46:30 -0500 )edit

Thanks Bernd, Initially I use bare as container but with the same result just after that I tried to use ovf, is very strange seems not to be a problem with the ceph backed credentials and no error is loged, seems after downloaded and converted the image the openstack forgot to create the volume.

gustavo gravatar imagegustavo ( 2016-12-18 09:41:07 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-12-19 05:33:44 -0500

gustavo gravatar image

updated 2016-12-19 05:34:25 -0500

Hi, Well I don't know why but this morning, I've retried to create the volume with the same command but this time the volume was created successfully

cinder create --image-id cea461e1-a815-4d61-b72a-58feb001922f --display-name boot-from-rbd 2

This time in the /etc/log/cinder/volumes.log Cinder didn't log any entry like these:

2016-12-16 17:35:20.233 2016 INFO cinder.image.image_utils [req-22ece44c-c841-4fe2-8db3-f1d0d40d1428 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Image download 39.00 MB at 13.17 MB/s
2016-12-16 17:35:25.432 2016 INFO cinder.image.image_utils [req-22ece44c-c841-4fe2-8db3-f1d0d40d1428 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Converted 39.00 MB image at 39.00 MB/s

But directly cinder logged this entry in the volumes log:

2016-12-19 12:10:14.851 3468 INFO cinder.volume.flows.manager.create_volume [req-d36abe64-ef77-4e70-830e-c992212ddcdb 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Volume volume-3cd39258-833e-424c-aa02-88872f05f3b7 (3cd39258-833e-424c-aa02-88872f05f3b7): created successfully
2016-12-19 12:10:14.855 3468 INFO cinder.volume.manager [req-d36abe64-ef77-4e70-830e-c992212ddcdb 7005bed3a92d4467bba3166092f097c7 1dd6f387564940a19303cb6ec9b37f75 - - -] Created volume successfully

The images are the same, no configuration has been changed, the only think is that the openstack cluster is a test cluster then it is formed by three kvm virtual machines, the kvm host was shutdown for the weekend and booting up again this morning, then I've come to the conclusion the problem was something with kvm and the configuration files.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2016-12-16 11:42:36 -0500

Seen: 438 times

Last updated: Dec 19 '16