ResizeServer sample uses wrong Flavor ID

Bug #911330 reported by Michael Fork
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Medium
Razique Mahroua

Bug Description

The sample at http://docs.openstack.org/api/openstack-compute/1.1/content/Resize_Server-d1e3707.html uses a flavorRef as follows:

{
    "resize" : {
        "flavorRef" : "http://servers.api.openstack.org/1234/flavors/52415800-8b69-11e0-9b19-734f1195ff37"
    }
}

however, this syntax fails:

# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"http://localhost:8774/v1.1/nuvemcpca/flavors/1"}}' http://localhost:8774/v1.1/nuvemcpca/servers/13b18dd2-e653-4efc-b214-1775455e7d8a/action

{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}

and the integer syntax succeeds:

# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"4"}}' http://localhost:8774/v1.1/nuvemcpca/servers/8b203de3-b390-40ed-bcad-46e5c669728b/action

HTTP/1.1 202 Accepted

Tags: compute-api
Brian Waldon (bcwaldon)
affects: nova → openstack-manuals
Revision history for this message
Razique Mahroua (razique) wrote :

Could we have extra informations about the required doc update on this ? Sorry but I'm not sure I get it :D
Thanks - Razique

Revision history for this message
Michael Fork (mjfork) wrote :

I had a copy and paste error originally. Here is the syntax against a *Diablo* node (I do not have a newer one to test). Note that the one using the documented syntax (flavorRef: URL) fails with a bad request where as the other syntax (flavorRef: integer) succeeds with a 202:

# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"http://localhost:8774/v1.1/nuvemcpca/flavors/1"}}' http://localhost:8774/v1.1/nuvemcpca/servers/22/action
{"badRequest": {"message": "Unable to locate requested flavor.", "code": 400}}[root@c46074 ~]# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"4"}}' http://localhost:8774/v1.1/nuvemcpca/servers/22/action

# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"4"}}' http://localhost:8774/v1.1/nuvemcpca/servers/22/action

HTTP/1.1 202 Accepted

Anne Gentle (annegentle)
tags: added: compute-api
Changed in openstack-manuals:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Razique Mahroua (razique) wrote :
Changed in openstack-manuals:
assignee: nobody → Razique Mahroua (razique)
Revision history for this message
Tom Fifield (fifieldt) wrote :

Not sure why this didn't come through automatically, but the change was merged and is live on the site.

Changed in openstack-manuals:
status: Triaged → Fix Released
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.