Re: [openstack-dev] transactions in openstack REST API?

2014-02-03 Thread Andrew Laski

On 02/03/14 at 01:10pm, Chris Friesen wrote:


Has anyone ever considered adding the concept of transaction IDs to 
the openstack REST API?


I'm envisioning a way to handle long-running transactions more 
cleanly.  For example:


1) A user sends a request to live-migrate an instance
2) Openstack acks the request and includes a transaction ID in the 
response.
3) The user can then poll (or maybe listen to notifications) to see 
whether the transaction is complete or hit an error.


I've called them tasks, but I have a proposal up at 
https://blueprints.launchpad.net/nova/+spec/instance-tasks-api that is 
very similar to this.  It allows for polling, but doesn't get into 
notifications.  But this is a first step in this direction and it can be 
expanded upon later.


Please let me know if this covers what you've brought up, and add any 
feedback you may have to the blueprint.




I view this as most useful for things that could potentially take a 
long time to finish--instance creation/deletion/migration/evacuation 
are obvious, I'm sure there are others.


Also, anywhere that we use a cast RPC call we'd want to add that 
call to a list associated with that transaction in the 
database...that way the transaction is only complete when all the 
sub-jobs are complete.


I've seen some discussion about using transaction IDs to locate logs 
corresponding to a given transaction, but nothing about the end user 
being able to query the status of the transaction.


Chris

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] transactions in openstack REST API?

2014-02-03 Thread Chris Friesen

On 02/03/2014 01:31 PM, Andrew Laski wrote:

On 02/03/14 at 01:10pm, Chris Friesen wrote:


Has anyone ever considered adding the concept of transaction IDs to
the openstack REST API?

I'm envisioning a way to handle long-running transactions more
cleanly.  For example:

1) A user sends a request to live-migrate an instance
2) Openstack acks the request and includes a transaction ID in the
response.
3) The user can then poll (or maybe listen to notifications) to see
whether the transaction is complete or hit an error.


I've called them tasks, but I have a proposal up at
https://blueprints.launchpad.net/nova/+spec/instance-tasks-api that is
very similar to this.  It allows for polling, but doesn't get into
notifications.  But this is a first step in this direction and it can be
expanded upon later.

Please let me know if this covers what you've brought up, and add any
feedback you may have to the blueprint.



That actually looks really good.  I like the idea of subtasks for things 
like live migration.


The only real comment I have at this point is that you might want to 
talk to the transaction ID guys and maybe use your task UUID as the 
transaction ID that gets passed to other services acting on behalf of nova.


Chris

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev