From 7eaf6db06d8a8da7685e5a5d6e32313741e2cfbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Dulko?= Date: Tue, 16 Feb 2016 15:16:02 +0100 Subject: [PATCH] Remove unused columns from Service ORM model rpc_available_version and object_available_version columns were part of previous design of our RPC API compatibility layer. We've decided to go in a little different direction so these two are currently unused. With our live-schema-upgrades guidelines (related to rolling upgrades support) it's a lot easier to readd something to the DB than to drop it. Let's take the chance to actually drop these unused DB columns in early Newton. To do that we need to remove them from the SQLAlchemy model in Mitaka and this commit does so. Change-Id: I3b7588214863ed008a0783167580953c22f58e99 Related-Blueprint: rpc-object-compatibility --- cinder/db/sqlalchemy/models.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cinder/db/sqlalchemy/models.py b/cinder/db/sqlalchemy/models.py index fa96e6bc8..cc52ac4f8 100644 --- a/cinder/db/sqlalchemy/models.py +++ b/cinder/db/sqlalchemy/models.py @@ -70,13 +70,14 @@ class Service(BASE, CinderBase): # periodic updates modified_at = Column(DateTime) - # Version columns to support rolling upgrade. - # Current version is what the service is running now (i.e. minimum). - # Available version is what the service can support (i.e. max). + # Version columns to support rolling upgrade. These report the max RPC API + # and objects versions that the manager of the service is able to support. rpc_current_version = Column(String(36)) - rpc_available_version = Column(String(36)) object_current_version = Column(String(36)) - object_available_version = Column(String(36)) + + # FIXME(dulek): In M we've removed rpc_available_version and + # object_available_version from the model. We need to merge a DB migration + # that actually drops these columns from the DB in early Newton. # replication_status can be: enabled, disabled, not-capable, error, # failed-over or not-configured -- 2.45.2