Jump to: navigation, search

Difference between revisions of "Trove-rpc-versioning"

m (Intro)
m (Work)
Line 11: Line 11:
 
* Update trove calls to the openstack.commom.rpc client to include a version cap param. (This is already supported in the client)
 
* Update trove calls to the openstack.commom.rpc client to include a version cap param. (This is already supported in the client)
 
* Document the use cases and examples of how to add/modify API calls
 
* Document the use cases and examples of how to add/modify API calls
 +
 +
==== Config ====
 +
* We may need to put the version caps in the config
 +
https://github.com/openstack/nova/blob/master/nova/baserpc.py
 +
<pre>
 +
  def __init__(self, topic):
 +
        super(BaseAPI, self).__init__()
 +
        target = messaging.Target(topic=topic,
 +
                                  namespace=_NAMESPACE,
 +
                                  version='1.0')
 +
        version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.baseapi,
 +
                                              CONF.upgrade_levels.baseapi)
 +
        self.client = rpc.get_client(target, version_cap=version_cap)
 +
</pre>

Revision as of 22:23, 10 April 2014

Intro

This page describes the intent to implement oslo messaging's API Version Negotiation in Trove

Oslo

Oslo/Messaging#API_Version_Negotiation

Goals

  • Prevent backward incompatibility between Trove components.
  • Reduce the need for downtime during deployments

Work

  • Keep track of a "version history" in comments in the code
  • Update trove calls to the openstack.commom.rpc client to include a version cap param. (This is already supported in the client)
  • Document the use cases and examples of how to add/modify API calls

Config

  • We may need to put the version caps in the config

https://github.com/openstack/nova/blob/master/nova/baserpc.py

   def __init__(self, topic):
        super(BaseAPI, self).__init__()
        target = messaging.Target(topic=topic,
                                  namespace=_NAMESPACE,
                                  version='1.0')
        version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.baseapi,
                                               CONF.upgrade_levels.baseapi)
        self.client = rpc.get_client(target, version_cap=version_cap)