Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

[Nova] RPC API Versioning Prototype

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


rbryant at redhat

Apr 30, 2012, 3:31 PM

Post #1 of 4 (122 views)
Permalink
[Nova] RPC API Versioning Prototype

Greetings,

I held a session on adding version numbers to the RPC APIs at the last
design summit. The idea was fairly non-controversial. The next step
was to do some prototyping to nail down what it should look like. This
will end up touching quite a bit of code, so it's important to get some
consensus around what it will look like up front.

I've made it far enough that there is enough to look at and provide
feedback on.

The code is in this branch:

https://github.com/russellb/nova/tree/bp/versioned-rpc-apis

The best place to start is in this doc:


https://github.com/russellb/nova/blob/bp/versioned-rpc-apis/README-versioned-rpc-apis.rst

There may be room for some additional code around helping managers
support more than one version of an API. I figure that can shake out on
an as-needed basis as existing code gets converted and APIs get changed.

Feedback welcome!

Thanks,

--
Russell Bryant

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


vishvananda at gmail

Apr 30, 2012, 5:11 PM

Post #2 of 4 (119 views)
Permalink
Re: [Nova] RPC API Versioning Prototype [In reply to]

Looking good.

A few points:

a) can we just do hasattr dispatch instead of isinstance. it seems more pythonic than forcing the use of the dispatcher base class

b) it seems like we should make the dispatcher pick version 1.0 instead of failing if version is not passed in, that way a new dispatcher could handle unversioned messages. Or did i miss some other magic way this is happening.

Vish

On Apr 30, 2012, at 3:31 PM, Russell Bryant wrote:

> Greetings,
>
> I held a session on adding version numbers to the RPC APIs at the last
> design summit. The idea was fairly non-controversial. The next step
> was to do some prototyping to nail down what it should look like. This
> will end up touching quite a bit of code, so it's important to get some
> consensus around what it will look like up front.
>
> I've made it far enough that there is enough to look at and provide
> feedback on.
>
> The code is in this branch:
>
> https://github.com/russellb/nova/tree/bp/versioned-rpc-apis
>
> The best place to start is in this doc:
>
>
> https://github.com/russellb/nova/blob/bp/versioned-rpc-apis/README-versioned-rpc-apis.rst
>
> There may be room for some additional code around helping managers
> support more than one version of an API. I figure that can shake out on
> an as-needed basis as existing code gets converted and APIs get changed.
>
> Feedback welcome!
>
> Thanks,
>
> --
> Russell Bryant
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


rbryant at redhat

May 1, 2012, 5:44 AM

Post #3 of 4 (119 views)
Permalink
Re: [Nova] RPC API Versioning Prototype [In reply to]

On 04/30/2012 08:11 PM, Vishvananda Ishaya wrote:
> Looking good.
>
> A few points:
>
> a) can we just do hasattr dispatch instead of isinstance. it seems more pythonic than forcing the use of the dispatcher base class

Sounds good.

> b) it seems like we should make the dispatcher pick version 1.0 instead of failing if version is not passed in, that way a new dispatcher could handle unversioned messages. Or did i miss some other magic way this is happening.

Good point. Otherwise, *all* messages from an Essex install would be
rejected from a newer version using rpc versioning even if it could
handle it properly.

Thanks for the feedback!

--
Russell Bryant

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


rbryant at redhat

May 3, 2012, 8:16 AM

Post #4 of 4 (118 views)
Permalink
Re: [Nova] RPC API Versioning Prototype [In reply to]

On 04/30/2012 06:31 PM, Russell Bryant wrote:
> The code is in this branch:
>
> https://github.com/russellb/nova/tree/bp/versioned-rpc-apis
>
> The best place to start is in this doc:
>
> https://github.com/russellb/nova/blob/bp/versioned-rpc-apis/README-versioned-rpc-apis.rst

I've started working on this again. I picked one of the easier APIs
(nova-cert) to convert to show what converting a real API would look
like. You can find documentation related to that here:

https://github.com/russellb/nova/blob/bp/versioned-rpc-apis/README-versioned-rpc-apis.rst#converting-an-api-to-be-versioned

My next steps:

1) Add unit tests.

2) Add docs to the code.

3) Convert some of the smaller APIs.

Once those are done, I would like to propose it for master and then
tackle the more complex APIs, such as nova-compute, one-by-one without
holding up getting the core infrastructure bits in.

As always, feedback welcome.

--
Russell Bryant

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.