HTTP 500 when calling os-volume_boot with invalid destination_type
Bug #1651064 reported by
Zhenyu Zheng
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Ken'ichi Ohmichi | ||
Mitaka |
Fix Released
|
Medium
|
Ken'ichi Ohmichi | ||
Newton |
Fix Committed
|
Medium
|
Ken'ichi Ohmichi |
Bug Description
When calling os-volume_boot with invalid bdm destination_type (e.g. volume1 as a typo of volume) HTTP 500 will raise.
Setp 1: call os-volumes_boot API or use "nova boot" CLI with --block-device provided(it will call os-volumes_boot)
nova-api log for my test can be found in:
http://
Changed in nova: | |
assignee: | nobody → Zhenyu Zheng (zhengzhenyu) |
Changed in nova: | |
assignee: | Zhenyu Zheng (zhengzhenyu) → Ken'ichi Ohmichi (oomichi) |
status: | Invalid → In Progress |
tags: | added: mitaka-backport-potential |
tags: | added: newton-backport-potential |
Changed in nova: | |
assignee: | Ken'ichi Ohmichi (oomichi) → Zhenyu Zheng (zhengzhenyu) |
Changed in nova: | |
assignee: | Zhenyu Zheng (zhengzhenyu) → Ken'ichi Ohmichi (oomichi) |
Changed in nova: | |
importance: | Undecided → Medium |
To post a comment you must log in.
I can't reproduce this case by your explanation.
Validation works correctly.
This bug was maybe already fixed.
Reproduce:
I used latest nova on Dec 12,16(7e1f1f68e bc05deabcb308d5 918c88563b48383 3).
$ curl -g -i -X POST http:// 127.0.0. 1:8774/ v2.1/os- volumes_ boot -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "OpenStack- API-Version: compute 2.37" -H "X-OpenStack- Nova-API- Version: 2.37" -H "X-Auth-Token: gAAAAABYWg2CF13 hBj9axkqmhfWk3X _7O_Zf6vORx52A3 P8Ed3ZYbIQIFaDy AY45C95R- jIX68YQW- GYTtk9yyjBwMI8n g9pfeUScqIShPiw -g7rp5RsChMSoTs E0NYW5FOFy0XJWo L814o3_ n3NkPPrzqp329Jy xr4xIdHqaq_ 5lEA_irxxmE0" -H "Content-Type: application/json" -d '{"server": {"name": "testvm", "block_ device_ mapping_ v2": [{"source_type": "volume", "uuid": "cfff5649- d9c8-4b16- 9cef-788eb080cc c5", "destination_type": "volume1" },{"source_ type": "image", "delete_ on_termination" : true, "boot_index": 0, "uuid": "5ccdf68c- 03f6-4dc5- a936-96903a12ed 6e", "destination_type": "local"}], "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "a9a98594- c2b9-4523- 825c-873a318227 2e"}]}} ' Api-Version: compute 2.37 Nova-Api- Version: 2.37 API-Version Nova-API- Version Request- Id: req-9d580023- 438a-412d- 8b27-d682af59a1 84
HTTP/1.1 400 Bad Request
Openstack-
X-Openstack-
Vary: OpenStack-
Vary: X-OpenStack-
Content-Type: application/json; charset=UTF-8
Content-Length: 156
X-Compute-
Date: Wed, 21 Dec 2016 05:39:04 GMT
{"badRequest": {"message": "Invalid input for field/attribute destination_type. Value: volume1. u'volume1' is not one of ('local', 'volume')", "code": 400}}
Nova validates correctly.