summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Wright <corey.wright@rackspace.com>2015-06-24 16:40:45 -0500
committerCorey Wright <corey.wright@rackspace.com>2015-06-24 17:18:46 -0500
commit8422e975b3b11a344a3c67e77135ed1ac45564ca (patch)
tree2879209c404fd30f7b31547bb4aff1dbb5a71d01
parent3b6ca5b6de9e7964e1a3c41b5b0146e116b248ba (diff)
downloadoslo-messaging-8422e975b3b11a344a3c67e77135ed1ac45564ca.tar.gz
Correct RPCVersionCapError message
This change adjusts the exception message to be more in line with the version compatibility algorithm so as to accurately portray the problem to the log recipient. The RPCVersionCapError message can be grossly incorrect when the requested message's major version is lower than the specified version cap's major version, declaring the requested message version as too high, when the real error is that the major versions differ (as major versions are assumed to be incompatible). Example: RPCVersionCapError: Requested message version, 3.23 is too high. It needs to be lower than the specified version cap 4.0. Change-Id: Iceef999ed385f2ba77449c568127f50f83d47196 Closes-Bug: 1468525
-rw-r--r--oslo_messaging/rpc/client.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/oslo_messaging/rpc/client.py b/oslo_messaging/rpc/client.py
index 3ea7034..3b05785 100644
--- a/oslo_messaging/rpc/client.py
+++ b/oslo_messaging/rpc/client.py
@@ -63,8 +63,10 @@ class RPCVersionCapError(exceptions.MessagingException):
def __init__(self, version, version_cap):
self.version = version
self.version_cap = version_cap
- msg = ("Requested message version, %(version)s is too high. It needs "
- "to be lower than the specified version cap %(version_cap)s." %
+ msg = ("Requested message version, %(version)s is incompatible. It "
+ "needs to be equal in major version and less than or equal "
+ "in minor version as the specified version cap "
+ "%(version_cap)s." %
dict(version=self.version, version_cap=self.version_cap))
super(RPCVersionCapError, self).__init__(msg)