Inject keypair or others failed when using rbd backend and CONF.force_config_drive is false

Registered by Haomai Wang

If you use rbd backend and CONF.force_config_drive option is False, you can't inject keypair, password or metadata to image.

We can see:
 https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2567
require the image exists 'path' member, but we haven't has 'path' member when rbd backend:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/imagebackend.py#L462

If you set CONF.force_config_drive true, we will use another way and it will work well.

2013-12-04 13:50:21.146 2782 ERROR nova.compute.manager [req-b7d67222-f459-4fff-8729-2f90db64e5b8 fdbc2a102ba840a790f8485b0660a867 1c2c1941c7fa41e0811b21de2f81a120] [instance: 640251b0-4856-471d-8772-2b84884615f4] Instance failed to spawn
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] Traceback (most recent call last):
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1407, in _spawn
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] block_device_info)
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 2074, in spawn
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] admin_pass=admin_password)
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 2468, in _create_image
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] injection_path = image('disk').path
2013-12-04 13:50:21.146 2782 TRACE nova.compute.manager [instance: 640251b0-4856-471d-8772-2b84884615f4] AttributeError: 'Rbd' object has no attribute '

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Superseded
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Haomai Wang

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.