]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Pin RPC and object version to lowest running
authorMichał Dulko <michal.dulko@intel.com>
Thu, 14 Jan 2016 19:57:12 +0000 (20:57 +0100)
committerMichał Dulko <michal.dulko@intel.com>
Fri, 29 Jan 2016 13:36:04 +0000 (08:36 -0500)
commite6d525e56d3d266abbb5894eb4afad33670ef869
treebcbf7f93cc55c33e11f312c4d6ea5aa0a9cb4b93
parent4226d372723808e58d7b9311165d9717fe2b2936
Pin RPC and object version to lowest running

This commit adds detection and pinning to lowest RPC API version to all
rpcapi modules. The version pin is determined by a DB call done once per
service lifetime thanks to caching. Handling the compatibility is
guaranteed by oslo.messaging and our shims in rpcapi modules.

To achieve o.vo compatibility, a similar approach is implemented. Custom
oslo.messaging serializer is implemented that backports objects to the
lowest running version on sending.

During the process of upgrade it may happen that manager receives an
object in the version lower than current one. Handling of such
situations is up to the manager and it should do that explicitely by
checking obj.VERSION.

The patch also adds required methods to db.api and Service object.

Co-Authored-By: Thang Pham <thang.g.pham@gmail.com>
Change-Id: I649892da64f9734928a6cf0f004a369aa7aa375f
Partial-Implements: blueprint rpc-object-compatibility
15 files changed:
cinder/backup/rpcapi.py
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/objects/base.py
cinder/objects/service.py
cinder/rpc.py
cinder/scheduler/rpcapi.py
cinder/tests/unit/backup/test_rpcapi.py
cinder/tests/unit/objects/test_base.py
cinder/tests/unit/objects/test_objects.py
cinder/tests/unit/objects/test_service.py
cinder/tests/unit/test_db_api.py
cinder/tests/unit/test_rpc.py [new file with mode: 0644]
cinder/tests/unit/test_volume_rpcapi.py
cinder/volume/rpcapi.py