image to local block device mapping doesnt work but accepted by the API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Balazs Gibizer |
Bug Description
When I try to boot an instance with the boot image specified as BDM the API accepts the request but the instance ends up in ERROR state due to an exception in the nova-compute. Furter investigation shows that image to local mapping is not supported in the --block-device parameter at all but the API does not validate and reject this kind of requests.
stack@stack:
+-----+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+-----+
| 100 | install-test | 1024 | 0 | 0 | | 1 | 1.0 | True |
+-----+
stack@stack:
| Property | Value |
+------
| checksum | a2502844750ecb6
| container_format | bare |
| created_at | 2014-10-06T13:45:48 |
| deleted | False |
| deleted_at | None |
| disk_format | iso |
| id | e3bb2e81-
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | ubuntu-mini.iso |
| owner | 8acb24eaeaee44f
| protected | False |
| size | 32505856 |
| status | active |
| updated_at | 2014-10-06T13:45:48 |
| virtual_size | None |
+------
stack@stack:
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| adminPass | PHD2yuKTVbDA |
| config_drive | |
| created | 2014-10-
| flavor | install-test (100) |
| hostId | |
| id | bbc3a863-
| image | Attempt to boot from volume - no image supplied |
| key_name | - |
| metadata | {} |
| name | vm4 |
| os-extended-
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | 8acb24eaeaee44f
| updated | 2014-10-
| user_id | 2957e97d89fd4ae
+------
stack@stack:
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| bbc3a863-
+------
stack@stack:
stack@stack:
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | error |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2014-10-
| fault | {"message": "No valid host was found. ", "code": 500, "details": " File \"/opt/
| | request_spec, filter_properties) |
| | File \"/opt/
| | context, request_spec, filter_properties) |
| | File \"/opt/
| | return getattr(
| | File \"/opt/
| | context, request_spec, filter_properties) |
| | File \"/opt/
| | request_
| | File \"/usr/
| | retry=self.retry) |
| | File \"/usr/
| | timeout=timeout, retry=retry) |
| | File \"/usr/
| | retry=retry) |
| | File \"/usr/
| | raise result |
| | ", "created": "2014-10-
| flavor | install-test (100) |
| hostId | 9c365e0da6ac63e
| id | bbc3a863-
| image | Attempt to boot from volume - no image supplied |
| key_name | - |
| metadata | {} |
| name | vm4 |
| os-extended-
| private network | 10.0.0.2 |
| security_groups | default |
| status | ERROR |
| tenant_id | 8acb24eaeaee44f
| updated | 2014-10-
| user_id | 2957e97d89fd4ae
+------
stack@stack:
The following exception is visible in the nova-cpu.log
2014-10-06 15:46:04.712 ERROR nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.712 TRACE nova.compute.
2014-10-06 15:46:04.899 AUDIT nova.compute.
2014-10-06 15:46:04.907 INFO nova.virt.
Here is the related section of the domain xml:
<devices>
<emulator>
<disk type='file' device='cdrom'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/
<target dev='hda' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/
<target dev='hdd' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='1'/>
</disk>
<controller type='usb' index='0'>
Also if thea boot images is specified with the --image parameter and an extra image to local mapping is specified with the --block-device parameter then the instance is booted from the boot image but the secondary image is not attach.
stack@stack:
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| adminPass | Mir6yrXKehJP |
| config_drive | |
| created | 2014-10-
| flavor | install-test (100) |
| hostId | |
| id | 1f7ab5b2-
| image | cirros-
| key_name | - |
| metadata | {} |
| name | vm4 |
| os-extended-
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | 8acb24eaeaee44f
| updated | 2014-10-
| user_id | 2957e97d89fd4ae
+------
stack@stack:
usage: nova show [--minimal] <server>
error: too few arguments
Try 'nova help show' for more information.
stack@stack:
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 1f7ab5b2-
+------
Here is the related part of the domain xml:
<devices>
<emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/
<target dev='vda' bus='virtio'/>
<alias name='virtio-
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/
<target dev='hdd' bus='ide'/>
<readonly/>
<alias name='ide0-1-1'/>
<address type='drive' controller='0' bus='1' target='0' unit='1'/>
</disk>
<controller type='usb' index='0'>
Changed in nova: | |
assignee: | nobody → Balazs Gibizer (balazs-gibizer) |
tags: | added: volumes |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
milestone: | none → kilo-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-2 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/126303
Review: https:/