[Openstack] Create volume from image fails with RBD backend

Francois Deppierraz francois at ctrlaltdel.ch
Sun Aug 11 22:58:59 UTC 2013


Hi,

On a grizzly setup with both glance and cinder configured with RBD
backend, I cannot find a way to create a new volume from a (raw) image.
The resulting volume is correctly created but remains full of NULL bytes.

$ glance show 92af7175-9478-42c4-8ed0-b336362ff3f7
URI: https://example.com:9292/v1/images/92af7175-9478-42c4-8ed0-b336362ff3f7
Id: 92af7175-9478-42c4-8ed0-b336362ff3f7
Public: Yes
Protected: No
Name: precise-server-cloudimg-amd64.raw
Status: active
Size: 2147483648
Disk format: raw
Container format: bare
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: 8226a848c4eb43e69b1a0f00c582e31f
Created at: 2013-08-11T07:22:13
Updated at: 2013-08-11T07:29:10
$ cinder create 10 --image-id 92af7175-9478-42c4-8ed0-b336362ff3f7
--display-name boot-from-volume

In the following logs, cinder-scheduler gets the correct image_id
parameter but cinder-volume gets None instead which looks weird.

Any pointer would be much appreciated, thanks for your help!

François

==> cinder-scheduler.log <==
2013-08-12 00:34:23    DEBUG [cinder.openstack.common.rpc.amqp] received
{u'_context_roles': [u'Member', u'_member_', u'admin'],
u'_context_request_id': u'req-a0539c82-8777-4dd3-a6ce-87d5d37120ac',
u'_context_quota_class': None, u'_unique_id':
u'5e5eca077ae149a6a64b1760bc55cc55', u'_context_read_deleted': u'no',
u'args': {u'request_spec': {u'volume_id':
u'79e98020-555c-4179-97ff-867a79a37160', u'volume_properties':
{u'status': u'creating', u'volume_type_id': None, u'display_name':
u'boot-from-volume', u'availability_zone': u'nova', u'attach_status':
u'detached', u'source_volid': None, u'metadata': {}, u'volume_metadata':
[], u'display_description': None, u'snapshot_id': None, u'user_id':
u'01d6651d807649718e01be2999b11af0', u'project_id':
u'8226a848c4eb43e69b1a0f00c582e31f', u'id':
u'79e98020-555c-4179-97ff-867a79a37160', u'size': 10}, u'
volume_type': {}, u'image_id': u'92af7175-9478-42c4-8ed0-b336362ff3f7',
u'source_volid': None, u'snapshot_id': None}, u'volume_id':
u'79e98020-555c-4179-97ff-867a79a37160', u'filter_properties': {},
u'topic': u'cinder-volume', u'image_id':
u'92af7175-9478-42c4-8ed0-b336362ff3f7', u'snapshot_id': None},
u'_context_tenant': u'8226a848c4eb43e69b1a0f00c582e31f',
u'_context_auth_token': '<SANITIZED>', u'_context_is_admin': False,
u'version': u'1.2', u'_context_project_id':
u'8226a848c4eb43e69b1a0f00c582e31f',
u'_context_timestamp': u'2013-08-11T22:34:22.569488', u'_context_user':
u'01d6651d807649718e01be2999b11af0', u'_context_user_id':
u'01d6651d807649718e01be2999b11af0', u'm
ethod': u'create_volume', u'_context_remote_address': u'1.2.3.4'}
2013-08-12 00:34:23    DEBUG [cinder.openstack.common.rpc.amqp] unpacked
context: {'user_id': u'01d6651d807649718e01be2999b11af0', 'roles':
[u'Member', u'_member_', u'adm
in'], 'timestamp': u'2013-08-11T22:34:22.569488', 'auth_token':
'<SANITIZED>', 'remote_address': u'1.2.3.4', 'quota_class': None,
'is_admin': False, 'user': u'01d66
51d807649718e01be2999b11af0', 'request_id':
u'req-a0539c82-8777-4dd3-a6ce-87d5d37120ac', 'project_id':
u'8226a848c4eb43e69b1a0f00c582e31f', 'read_deleted': u'no', 'tenant
': u'8226a848c4eb43e69b1a0f00c582e31f'}
2013-08-12 00:34:23    DEBUG [cinder.openstack.common.rpc.amqp] Making
asynchronous cast on cinder-volume.sun2-test...
2013-08-12 00:34:23    DEBUG [cinder.openstack.common.rpc.amqp]
UNIQUE_ID is b3bc44f910054661a7a532bd6bfbe5bb.

==> cinder-volume.log <==
2013-08-12 00:34:23    DEBUG [cinder.openstack.common.rpc.amqp] received
{u'_context_roles': [u'Member', u'_member_', u'admin'],
u'_context_request_id': u'req-a0539c82-8777-4dd3-a6ce-87d5d37120ac',
u'_context_quota_class': None, u'_unique_id':
u'b3bc44f910054661a7a532bd6bfbe5bb', u'args': {u'request_spec': None,
u'volume_id': u'79e98020-555c-4179-97ff-867a79a37160',
u'allow_reschedule': True, u'filter_properties':
u'92af7175-9478-42c4-8ed0-b336362ff3f7', u'source_volid': None,
u'image_id': None, u'snapshot_id': None}, u'_context_tenant':
u'8226a848c4eb43e69b1a0f00c582e31f', u'_context_auth_token':
'<SANITIZED>', u'_context_timestamp': u'2013-08-11T22:34:22.569488',
u'_context_is_admin': False, u'version': u'1.4', u'_context_project_id':
u'8226a848c4eb43e69b1a0f00c582e31f', u'_context_user':
u'01d6651d807649718e01be2999b11af0', u'_context_
read_deleted': u'no', u'_context_user_id':
u'01d6651d807649718e01be2999b11af0', u'method': u'create_volume',
u'_context_remote_address': u'1.2.3.4'}
2013-08-12 00:34:23    DEBUG [cinder.openstack.common.rpc.amqp] unpacked
context: {'user_id': u'01d6651d807649718e01be2999b11af0', 'roles':
[u'Member', u'_member_', u'admin'], 'timestamp':
u'2013-08-11T22:34:22.569488', 'auth_token': '<SANITIZED>',
'remote_address': u'1.2.3.4', 'quota_class': None, 'is_admin': False,
'user': u'01d6651d807649718e01be2999b11af0', 'request_id':
u'req-a0539c82-8777-4dd3-a6ce-87d5d37120ac', 'project_id':
u'8226a848c4eb43e69b1a0f00c582e31f', 'read_deleted': u'no', 'tenant
': u'8226a848c4eb43e69b1a0f00c582e31f'}
2013-08-12 00:34:23    DEBUG [cinder.volume.manager] volume
volume-79e98020-555c-4179-97ff-867a79a37160: creating lv of size 10G
2013-08-12 00:34:23     INFO [cinder.volume.manager] volume
volume-79e98020-555c-4179-97ff-867a79a37160: creating
2013-08-12 00:34:23    DEBUG [cinder.utils] Running cmd (subprocess):
rbd --help
2013-08-12 00:34:23    DEBUG [cinder.utils] Running cmd (subprocess):
rbd create --pool volumes --size 10240
volume-79e98020-555c-4179-97ff-867a79a37160 --new-format
2013-08-12 00:34:23    DEBUG [cinder.volume.manager] volume
volume-79e98020-555c-4179-97ff-867a79a37160: creating export
2013-08-12 00:34:24     INFO [cinder.volume.manager] volume
volume-79e98020-555c-4179-97ff-867a79a37160: created successfully
2013-08-12 00:34:24     INFO [cinder.volume.manager] Clear capabilities

cinder.conf:

[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rabbit_host=127.0.0.1
sql_connection=mysql://cinder:cinder@127.0.0.1/cinder?charset=utf8
api_paste_config=/etc/cinder/api-paste.ini
debug=True
rabbit_userid=nova
osapi_volume_listen=0.0.0.0
rabbit_virtual_host=/
scheduler_driver=cinder.scheduler.simple.SimpleScheduler
rabbit_hosts=127.0.0.1:5672
rabbit_ha_queues=False
rabbit_password=secret
rabbit_port=5672
rpc_backend=cinder.openstack.common.rpc.impl_kombu
sql_idle_timeout=3600
volume_driver=cinder.volume.drivers.rbd.RBDDriver
rbd_user=volumes
max_gigabytes=25000
rbd_pool=volumes
rbd_secret_uuid=XXXX
glance_api_version=2

glance-api.conf:

[DEFAULT]
verbose = True
debug = True
default_store = rbd
bind_host = 0.0.0.0
bind_port = 9292
log_file = /var/log/glance/api.log
backlog = 4096
sql_connection = mysql://glance:glance@127.0.0.1/glance
sql_idle_timeout = 3600
workers = 2
show_image_direct_url = True
registry_host = 0.0.0.0
registry_port = 9191
registry_client_protocol = http
notifier_strategy = noop
rabbit_host = localhost
rabbit_port = 5672
rabbit_use_ssl = false
rabbit_userid = guest
rabbit_password = guest
rabbit_virtual_host = /
rabbit_notification_exchange = glance
rabbit_notification_topic = notifications
rabbit_durable_queues = False
filesystem_store_datadir = /var/lib/glance/images/
rbd_store_ceph_conf = /etc/ceph/ceph.conf
rbd_store_user = images
rbd_store_pool = images
rbd_store_chunk_size = 8
delayed_delete = False
scrub_time = 43200
scrubber_datadir = /var/lib/glance/scrubber
image_cache_dir = /var/lib/glance/image-cache/
[keystone_authtoken]
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
admin_tenant_name = services
admin_user = glance
admin_password = secret
[paste_deploy]
flavor=keystone+cachemanagement




More information about the Openstack mailing list