Pin RPC client version min == max

At the moment, ironic's rpcapi module is specifying a target (minimum)
RPC version of 1.0 -- however, none of the methods added after 1.0
indicate in which minor version they were added. Thus, this module
believes all methods are available in any version of the server greater
than 1.0, which is clearly untrue.

This change pins the target version to the current version,
effectively preventing rolling upgrades, which are not supported at the
moment anyway.

Change-Id: I031ccd13d1d140821daf8a0adf5913627064451c
Partial-Bug: #1317300
This commit is contained in:
Devananda van der Veen 2014-05-07 15:52:53 -07:00 committed by Ruby Loo
parent 5df503222c
commit e7c5a4eb67
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ class ConductorAPI(object):
if self.topic is None:
self.topic = manager.MANAGER_TOPIC
target = messaging.Target(topic=self.topic, version='1.0')
target = messaging.Target(topic=self.topic,
version=self.RPC_API_VERSION)
serializer = objects_base.IronicObjectSerializer()
self.client = rpc.get_client(target,
version_cap=self.RPC_API_VERSION,