Server resize error message indicates field which does not match request

Bug #1310791 reported by Brad Pokorny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

With a post of this resize body to the nova API, "ram" is specified:

Body :

{"resize":{"flavor":{"vcpus":1,"ram":9999999999,"disk":20,"extra_specs":{"key:smt":"-1"}}}}

The response refers to the same field as "memory_mb":

Response :

{
badRequest: {
message: "Invalid input received: memory_mb must be <= 2147483647"
code: 400
}-

It would seem to make more sense if the response referred to the same field as the request.

Tags: api
Tracy Jones (tjones-i)
tags: added: compute
tags: added: api
removed: compute
Revision history for this message
Matt Riedemann (mriedem) wrote :

The error is coming from checking the instance_type db fields I think, so that's what you're getting back in the error message. The flavors util doing the validation would have to map the api fields to the db fields if you wanted to cleanup the error message.

Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

What release of Nova are you running against? I don't think that is a valid body request in the first place (even without the ram issue) as it takes a flavorRef as the resize parameter.

http://docs.openstack.org/api/openstack-compute/2/content/POST_resizeServer__v2__tenant_id__servers__server_id__action_Server_Actions-d1e3229.html#POST_resizeServer__v2__tenant_id__servers__server_id__action_Server_Actions-d1e3229-Request

Changed in nova:
status: New → Incomplete
Revision history for this message
Sean Dague (sdague) wrote :

I think this is using an out of tree extension

Changed in nova:
status: Incomplete → Invalid
Revision history for this message
Matt Riedemann (mriedem) wrote :

The root issue reported here was addressed in bug 1350751 and this change:

https://review.openstack.org/#/c/110891/

Basically make the error message that the user sees have the same fields that are in the API request rather than the DB model fields.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.