Report 2.0 as supported version of RPC APIs
When bumping major versions of RPC APIs from 1.x to 2.0 I haven't raised the version the managers are reporting into the `services` table. Though this doesn't have any immediate consequences, it effectively blocks us from dropping 1.x support in Newton, because we need that support to downgrade the messages to what Mitaka reports. This commit fixes that problem by making the Mitaka's services to report 2.0 as RPC API version. Closes-Bug: 1560062 Change-Id: I45e695025f1cb38fd8b062593b29da7463ba22fc
This commit is contained in:
parent
8008489243
commit
c56ace1b3b
@ -81,7 +81,7 @@ QUOTAS = quota.QUOTAS
|
||||
class BackupManager(manager.SchedulerDependentManager):
|
||||
"""Manages backup of block storage devices."""
|
||||
|
||||
RPC_API_VERSION = '1.3'
|
||||
RPC_API_VERSION = '2.0'
|
||||
|
||||
target = messaging.Target(version=RPC_API_VERSION)
|
||||
|
||||
@ -93,7 +93,7 @@ class BackupManager(manager.SchedulerDependentManager):
|
||||
self.volume_rpcapi = volume_rpcapi.VolumeAPI()
|
||||
super(BackupManager, self).__init__(service_name='backup',
|
||||
*args, **kwargs)
|
||||
self.additional_endpoints.append(_BackupV2Proxy(self))
|
||||
self.additional_endpoints.append(_BackupV1Proxy(self))
|
||||
|
||||
@property
|
||||
def driver_name(self):
|
||||
@ -860,9 +860,9 @@ class BackupManager(manager.SchedulerDependentManager):
|
||||
|
||||
# TODO(dulek): This goes away immediately in Newton and is just present in
|
||||
# Mitaka so that we can receive v1.x and v2.0 messages.
|
||||
class _BackupV2Proxy(object):
|
||||
class _BackupV1Proxy(object):
|
||||
|
||||
target = messaging.Target(version='2.0')
|
||||
target = messaging.Target(version='1.3')
|
||||
|
||||
def __init__(self, manager):
|
||||
self.manager = manager
|
||||
|
@ -56,7 +56,7 @@ LOG = logging.getLogger(__name__)
|
||||
class SchedulerManager(manager.Manager):
|
||||
"""Chooses a host to create volumes."""
|
||||
|
||||
RPC_API_VERSION = '1.11'
|
||||
RPC_API_VERSION = '2.0'
|
||||
|
||||
target = messaging.Target(version=RPC_API_VERSION)
|
||||
|
||||
@ -66,7 +66,7 @@ class SchedulerManager(manager.Manager):
|
||||
scheduler_driver = CONF.scheduler_driver
|
||||
self.driver = importutils.import_object(scheduler_driver)
|
||||
super(SchedulerManager, self).__init__(*args, **kwargs)
|
||||
self.additional_endpoints.append(_SchedulerV2Proxy(self))
|
||||
self.additional_endpoints.append(_SchedulerV1Proxy(self))
|
||||
self._startup_delay = True
|
||||
|
||||
def init_host_with_rpc(self):
|
||||
@ -320,9 +320,9 @@ class SchedulerManager(manager.Manager):
|
||||
|
||||
# TODO(dulek): This goes away immediately in Newton and is just present in
|
||||
# Mitaka so that we can receive v1.x and v2.0 messages.
|
||||
class _SchedulerV2Proxy(object):
|
||||
class _SchedulerV1Proxy(object):
|
||||
|
||||
target = messaging.Target(version='2.0')
|
||||
target = messaging.Target(version='1.11')
|
||||
|
||||
def __init__(self, manager):
|
||||
self.manager = manager
|
||||
|
@ -214,7 +214,7 @@ def locked_snapshot_operation(f):
|
||||
class VolumeManager(manager.SchedulerDependentManager):
|
||||
"""Manages attachable block storage devices."""
|
||||
|
||||
RPC_API_VERSION = '1.40'
|
||||
RPC_API_VERSION = '2.0'
|
||||
|
||||
target = messaging.Target(version=RPC_API_VERSION)
|
||||
|
||||
@ -233,7 +233,7 @@ class VolumeManager(manager.SchedulerDependentManager):
|
||||
# update_service_capabilities needs service_name to be volume
|
||||
super(VolumeManager, self).__init__(service_name='volume',
|
||||
*args, **kwargs)
|
||||
self.additional_endpoints.append(_VolumeV2Proxy(self))
|
||||
self.additional_endpoints.append(_VolumeV1Proxy(self))
|
||||
self.configuration = config.Configuration(volume_manager_opts,
|
||||
config_group=service_name)
|
||||
self.stats = {}
|
||||
@ -3476,9 +3476,9 @@ class VolumeManager(manager.SchedulerDependentManager):
|
||||
|
||||
# TODO(dulek): This goes away immediately in Newton and is just present in
|
||||
# Mitaka so that we can receive v1.x and v2.0 messages
|
||||
class _VolumeV2Proxy(object):
|
||||
class _VolumeV1Proxy(object):
|
||||
|
||||
target = messaging.Target(version='2.0')
|
||||
target = messaging.Target(version='1.40')
|
||||
|
||||
def __init__(self, manager):
|
||||
self.manager = manager
|
||||
|
Loading…
Reference in New Issue
Block a user