Nova responses unexpected error messages when fail to create flavor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Wang Bo |
Bug Description
The response message is unexpected(not easy to understand) if the requested resource exceeded limitation when to create new flavor. Following are examples:
1. requested ram exceeded limitation:
Run "nova --debug flavor-create ram_test 10 9999999999 20 1", the response info is:
RESP BODY: {"badRequest": {"message": "Invalid input received: memory_mb must be <= 2147483647", "code": 400}}
2. requested disk exceeded limitation:
nova --debug flavor-create ram_test 10 1024 2000000000000000000 1
RESP BODY: {"badRequest": {"message": "Invalid input received: root_gb must be <= 2147483647", "code": 400}}
I think "memory_mb" and "root_gb" in above response messages are unexpected, "ram" and "disk" could be better to user.
Hope for your comments. Thanks!
tags: | added: api |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-3 → 2014.2 |
Why codes use "memory_mb, root_gb" because they are columns in db table instances_types. We should keep that code, only need update code here: https:/ /github. com/openstack/ nova/blob/ master/ nova/compute/ flavors. py#L135 to change the response message from "memory_mb" and "root_gb" to "ram" and "disk" or other expected info.