make batch API create/delete atomic

Bug #1020639 reported by dan wendlandt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Salvatore Orlando

Bug Description

When performing a batch API operation, either all operations should succeed or all should fail.

Ideally we can perform this on the server itself. A second option would be to just add a method to the clientlib that gives the perception of atomic operations.

Either way, we don't want to force other systems (e.g., Nova) to have to reimplement this logic on their own each time.

Revision history for this message
yong sheng gong (gongysh) wrote :

I prefer to use an extension to make an API for nova on server side, which will need modify the plugin , so that we can make use of the database's transaction.
At the same time we have to augment the client to use this extension's API. And then most of the nova network API methods are just wrappers to the client's methods.

Changed in quantum:
importance: Undecided → High
assignee: nobody → Salvatore Orlando (salvatore-orlando)
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Yong approach makes sense - we certainly want to leverage DB transaction for the base v2 plugin.
It is also important that the client provides a way for leveraging this API capability - and I will create a related bug report in python-quantumclient for this.

What needs to be discussed and decided is, in my opinion, the following:

- should bulk create/delete part of the core API or an extension?
- do we need a different URI for the requests or can we reuse the existing ones (e.g.: POST /networks with a list of networks in the request body to be created atomically)
- do we want to support bulk updates as well?

It is also my opinion that this fix should concern bulk operations on one kind of resource only. That is to say, we will allow to create a bunch of ports in a single operation, but creating a network with a set of ports and then subnets with allocated IPs in a single operation is certainly out of scope here, and I'm not sure we even want this in the Quantum API.

Revision history for this message
dan wendlandt (danwent) wrote :

If the Nova <-> Quantum integration is going to be built on batch operations, I think these operations would have to be part of the core API.

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

I agree on the need for having bulk operations as part of the core.

It is my opinion that we should not introduce complexity by defining new URIs for bulk operations. POST /<resource> and DELETE /<resource> should be able to handle both single and bulk requests.

Bulk updates are desirable, but they have a lower priority. If we get them "for free" from this bug fix, that would be great.

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

The Bug report for Quantum client is here: https://bugs.launchpad.net/python-quantumclient/+bug/1021726

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

I am leaning to consider lack of feedback as a statement from the community that we are happy with not introducing new URIs for bulk operations.

Revision history for this message
dan wendlandt (danwent) wrote :

I tend to agree. We have a lot on our plate for F-3, and I'm not convinced this is a strict requirement.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in quantum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/10732
Committed: http://github.com/openstack/quantum/commit/ff837025e955799e69eebcab665374436649d6f8
Submitter: Jenkins
Branch: master

commit ff837025e955799e69eebcab665374436649d6f8
Author: Salvatore Orlando <email address hidden>
Date: Mon Aug 13 09:31:38 2012 -0700

    Fix bulk create operations and make them atomic.

    Bug 1024844
    Bug 1020639

    The API layer is now able to issue bulk create requests to the plugin,
    assuming that the plugin supports them. Otherwise, the API layer will
    emulate atomic behavior.
    This patch also implements OVS plugin support for bulk requests.

    Change-Id: I515148d870d0dff8371862fe577c477538364929

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-3 → 2012.2
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.