From 5e8ec9d3889b09912adb30ce66cc6e406372a454 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 1 Oct 2015 16:41:02 -0400 Subject: [PATCH] Update rpc version aliases for liberty Update all of the rpc client API classes to include a version alias for the latest version implemented in Liberty. This alias is needed when doing rolling upgrades from Liberty to Mitaka. With this in place, you can ensure all services only send messages that both Liberty and Mitaka will understand. Change-Id: I3eabae03483806602d7dea0e4ab737db4917d0fd --- nova/cells/rpcapi.py | 5 +++++ nova/cert/rpcapi.py | 9 ++++++--- nova/compute/rpcapi.py | 5 +++++ nova/conductor/rpcapi.py | 4 ++++ nova/console/rpcapi.py | 9 ++++++--- nova/consoleauth/rpcapi.py | 9 ++++++--- nova/network/rpcapi.py | 5 +++++ nova/scheduler/rpcapi.py | 8 +++++--- 8 files changed, 42 insertions(+), 12 deletions(-) diff --git a/nova/cells/rpcapi.py b/nova/cells/rpcapi.py index 05dc373bc0..ae27aacc93 100644 --- a/nova/cells/rpcapi.py +++ b/nova/cells/rpcapi.py @@ -118,6 +118,10 @@ class CellsAPI(object): and instance_info_cache_update_at_top use instance objects * 1.36 - Added 'delete_type' parameter to terminate_instance() * 1.37 - Add get_keypair_at_top to fetch keypair from api cell + + ... Liberty supports message version 1.37. So, any changes to + existing methods in 1.x after that point should be done such that they + can handle the version_cap being set to 1.37. ''' VERSION_ALIASES = { @@ -126,6 +130,7 @@ class CellsAPI(object): 'icehouse': '1.27', 'juno': '1.29', 'kilo': '1.34', + 'liberty': '1.37', } def __init__(self): diff --git a/nova/cert/rpcapi.py b/nova/cert/rpcapi.py index aeda163559..2111bd5c1c 100644 --- a/nova/cert/rpcapi.py +++ b/nova/cert/rpcapi.py @@ -49,9 +49,11 @@ class CertAPI(object): 2.0 - Major API rev for Icehouse - ... Icehouse, Juno and Kilo support message version 2.0. So, any - changes to existing methods in 2.x after that point should be done such - that they can handle the version_cap being set to 2.0. + ... Icehouse, Juno, Kilo, and Liberty support message version + 2.0. So, any changes to existing methods in 2.x after that + point should be done such that they can handle the version_cap + being set to 2.0. + ''' VERSION_ALIASES = { @@ -60,6 +62,7 @@ class CertAPI(object): 'icehouse': '2.0', 'juno': '2.0', 'kilo': '2.0', + 'liberty': '2.0', } def __init__(self): diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py index 0168c7a11c..1445b417b1 100644 --- a/nova/compute/rpcapi.py +++ b/nova/compute/rpcapi.py @@ -302,12 +302,17 @@ class ComputeAPI(object): * 4.4 - Make refresh_instance_security_rules send an instance object * 4.5 - Add migration, scheduler_node and limits arguments to rebuild_instance() + + ... Liberty supports messaging version 4.5. So, any changes to + existing methods in 4.x after that point should be done so that they + can handle the version_cap being set to 4.5 ''' VERSION_ALIASES = { 'icehouse': '3.23', 'juno': '3.35', 'kilo': '4.0', + 'liberty': '4.5', } def __init__(self): diff --git a/nova/conductor/rpcapi.py b/nova/conductor/rpcapi.py index 99d44a46d6..6dd32f3ac6 100644 --- a/nova/conductor/rpcapi.py +++ b/nova/conductor/rpcapi.py @@ -192,6 +192,9 @@ class ConductorAPI(object): * 3.0 - Drop backwards compatibility + ... Liberty supports message version 3.0. So, any changes to + existing methods in 3.x after that point should be done such + that they can handle the version_cap being set to 3.0. """ VERSION_ALIASES = { @@ -200,6 +203,7 @@ class ConductorAPI(object): 'icehouse': '2.0', 'juno': '2.0', 'kilo': '2.1', + 'liberty': '3.0', } def __init__(self): diff --git a/nova/console/rpcapi.py b/nova/console/rpcapi.py index c3b08c236d..82038f228b 100644 --- a/nova/console/rpcapi.py +++ b/nova/console/rpcapi.py @@ -49,9 +49,11 @@ class ConsoleAPI(object): 2.0 - Major API rev for Icehouse - ... Icehouse, Juno and Kilo support message version 2.0. So, any - changes to existing methods in 2.x after that point should be done such - that they can handle the version_cap being set to 2.0. + ... Icehouse, Juno, Kilo, Liberty support message version 2.0. + So, any changes to existing methods in 2.x after that point + should be done such that they can handle the version_cap being + set to 2.0. + ''' VERSION_ALIASES = { @@ -60,6 +62,7 @@ class ConsoleAPI(object): 'icehouse': '2.0', 'juno': '2.0', 'kilo': '2.0', + 'liberty': '2.0', } def __init__(self, topic=None, server=None): diff --git a/nova/consoleauth/rpcapi.py b/nova/consoleauth/rpcapi.py index 4be808e749..5d36535078 100644 --- a/nova/consoleauth/rpcapi.py +++ b/nova/consoleauth/rpcapi.py @@ -50,9 +50,11 @@ class ConsoleAuthAPI(object): * 2.1 - Added access_url to authorize_console - ... Kilo support message version 2.1. So, any changes to existing - methods in 2.x after that point should be done such that they can - handle the version_cap being set to 2.1. + ... Kilo and Liberty support message version 2.1. So, any + changes to existing methods in 2.x after that point should be + done such that they can handle the version_cap being set to + 2.1. + ''' VERSION_ALIASES = { @@ -61,6 +63,7 @@ class ConsoleAuthAPI(object): 'icehouse': '2.0', 'juno': '2.0', 'kilo': '2.1', + 'liberty': '2.1', } def __init__(self): diff --git a/nova/network/rpcapi.py b/nova/network/rpcapi.py index 7f14b415ca..3c161b9817 100644 --- a/nova/network/rpcapi.py +++ b/nova/network/rpcapi.py @@ -106,6 +106,10 @@ class NetworkAPI(object): * 1.14 - Add mac parameter to release_fixed_ip(). * 1.15 - Convert set_network_host() to use Network objects. + + ... Liberty supports message version 1.15. So, any changes to + existing methods in 1.x after that point should be done such that they + can handle the version_cap being set to 1.15. ''' VERSION_ALIASES = { @@ -114,6 +118,7 @@ class NetworkAPI(object): 'icehouse': '1.12', 'juno': '1.13', 'kilo': '1.13', + 'liberty': '1.15', } def __init__(self, topic=None): diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py index c8eb901464..fb8ab19459 100644 --- a/nova/scheduler/rpcapi.py +++ b/nova/scheduler/rpcapi.py @@ -91,9 +91,10 @@ class SchedulerAPI(object): * 4.2 - Added update_instance_info(), delete_instance_info(), and sync_instance_info() methods - ... Kilo support message version 4.2. So, any changes to existing - methods in 4.x after that point should be done such that they can - handle the version_cap being set to 4.2. + ... Kilo and Liberty support message version 4.2. So, any + changes to existing methods in 4.x after that point should be + done such that they can handle the version_cap being set to + 4.2. ''' @@ -103,6 +104,7 @@ class SchedulerAPI(object): 'icehouse': '3.0', 'juno': '3.0', 'kilo': '4.2', + 'liberty': '4.2', } def __init__(self):