Create request single server

Bug #1075357 reported by Joshua Harlow
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
High
Unassigned

Bug Description

When a multitude of servers are passed in to the create servers endpoint it seems like the outgoing 'view' only shows the first one. This seems not exactly correct in that X instances were asked for (not 1) and only 1 output view is returned instead of a group of views...

server = self._view_builder.create(req, instances[0])
robj = wsgi.ResponseObject(server)
return self._add_location(robj)

Tags: v2-api-audit
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

API docs seem to allow just one server to be created
http://docs.openstack.org/api/openstack-compute/2/content/CreateServers.html#d6e1244

we should probably return badRequest (400) when the HTTP POST has a request with multiple servers

Revision history for this message
Joshua Harlow (harlowja) wrote :

I don't think the docs are correct :-)

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

LOL :)

Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → High
tags: added: v2-api-audit
Changed in nova:
assignee: nobody → rerngvit yanggratoke (rerngvit)
Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/18768

Revision history for this message
Vish Ishaya (vishvananda) wrote :

I don't think this is a bug. Returning multiple servers from a create request is a change in the api contract. We could consider it an extension only response but currently we have the option to return_reservation_id which will return a reservation_id instead of a single server. The reservation_id can be used to get a list of the servers from the client side. I think this is better implemented in novaclient for now.

Changed in nova:
status: In Progress → Invalid
Revision history for this message
rerngvit yanggratoke (rerngvit) wrote :

Ok, I withdraw my current patch then.

Changed in nova:
assignee: rerngvit yanggratoke (rerngvit) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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