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
This commit is contained in:
parent
3b6ca5b6de
commit
8422e975b3
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user