HTTP 200 returned instead of HTTP 404 on passing invalid volume ID to boot server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Pass an invalid volume ID to nova boot from bootable volume API.
$ nova boot --flavor 1 --image a2bfa0c3-
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | H4EiQhswhe8v |
| config_drive | |
| created | 2012-10-
| flavor | m1.tiny |
| hostId | |
| id | 1ed3e2b8-
| image | cirros-
| key_name | None |
| metadata | {} |
| name | boot_from_vol |
| progress | 0 |
| security_groups | [{u'name': u'default'}] |
| status | BUILD |
| tenant_id | b1519b1ea6b8439
| updated | 2012-10-
| user_id | bd1b5e2ca71f4ae
+------
The instance goes into ERROR state after some time.
$ nova list
+------
| ID | Name | Status | Networks |
+------
| 1ed3e2b8-
+------
In order to throw a 404 we'd need to update the Nova API code to check for the existence of a supplied volume. This would potentially make the API slower and require either a DB or Cinder check which is probably something we'd want to avoid in the Nova API itself.
While we do check for valid images UUIDs (because the spec requires it I think) I'd actually like to suggest that this is poor behavior since it involves making an extra call to Glance. Perhaps long term we should actually look at changing the Nova v3 spec to validate the image ID later as well when the image is actually downloaded.