From aa89d8b27a86abc1ba84133c655a49fa3ccda798 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 15 May 2013 16:39:04 -0400 Subject: Support capping message versions in the client. When doing a rolling upgrade, we need to be able to tell all rpc clients to hold off on sending newer versions of messages until all nodes understand the new message version. This patch adds the oslo component of this. It's quite simple. The rpc proxy just stores the version cap and will raise an exception if code ever tries to send a message that exceeds this cap. Allowing the cap to be configured and generating different types of messages based on the configured value is the hard part here, but that is left up to the project using the rpc library. Implements blueprint rpc-version-control. Change-Id: Ia69db03a80dc3b1c63d52c7e163ea3cfec80c882 --- openstack/common/rpc/common.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'openstack/common/rpc/common.py') diff --git a/openstack/common/rpc/common.py b/openstack/common/rpc/common.py index d74425d..5a7e525 100644 --- a/openstack/common/rpc/common.py +++ b/openstack/common/rpc/common.py @@ -158,6 +158,10 @@ class UnsupportedRpcEnvelopeVersion(RPCException): "not supported by this endpoint.") +class RpcVersionCapError(RPCException): + message = _("Specified RPC version cap, %(version_cap)s, is too low") + + class Connection(object): """A connection, returned by rpc.create_connection(). -- cgit