Merge "Updates to RPC and object version pinning"
This commit is contained in:
commit
7ad3f9de8b
@ -354,13 +354,16 @@
|
||||
# value)
|
||||
#host = localhost
|
||||
|
||||
# WARNING: This configuration option is part of the incomplete
|
||||
# rolling upgrades work; changing this value has no effect.
|
||||
# Used for rolling upgrades. Setting this option downgrades
|
||||
# the internal ironic RPC communication to the specified
|
||||
# version to enable communication with older services. When
|
||||
# doing a rolling upgrade from version X to version Y, set
|
||||
# this to X. Defaults to using the newest possible RPC
|
||||
# behavior. (string value)
|
||||
# Allowed values: ocata, 7.0
|
||||
# (or pins) the internal ironic RPC communication to the
|
||||
# specified version to enable communication with older
|
||||
# services. When doing a rolling upgrade from version X to
|
||||
# version Y, set (pin) this to X. To unpin, leave it unset.
|
||||
# Defaults to using the newest possible RPC behavior. (string
|
||||
# value)
|
||||
# Allowed values: ocata, 8.0, 7.0
|
||||
#pin_release_version = <None>
|
||||
|
||||
# Path to the rootwrap configuration file to use for running
|
||||
|
@ -57,6 +57,18 @@ RELEASE_MAPPING = {
|
||||
'VolumeTarget': '1.0',
|
||||
}
|
||||
},
|
||||
'8.0': {
|
||||
'rpc': '1.40',
|
||||
'objects': {
|
||||
'Node': '1.21',
|
||||
'Conductor': '1.2',
|
||||
'Chassis': '1.3',
|
||||
'Port': '1.6',
|
||||
'Portgroup': '1.3',
|
||||
'VolumeConnector': '1.0',
|
||||
'VolumeTarget': '1.0',
|
||||
}
|
||||
},
|
||||
'master': {
|
||||
'rpc': '1.40',
|
||||
'objects': {
|
||||
|
@ -265,11 +265,15 @@ service_opts = [
|
||||
cfg.StrOpt('pin_release_version',
|
||||
choices=versions.RELEASE_VERSIONS,
|
||||
# TODO(xek): mutable=True,
|
||||
help=_('Used for rolling upgrades. Setting this option '
|
||||
'downgrades the internal ironic RPC communication to '
|
||||
'the specified version to enable communication with '
|
||||
'older services. When doing a rolling upgrade from '
|
||||
'version X to version Y, set this to X. Defaults to '
|
||||
help=_('WARNING: This configuration option is part of the '
|
||||
'incomplete rolling upgrades work; changing this '
|
||||
'value has no effect. '
|
||||
'Used for rolling upgrades. Setting this option '
|
||||
'downgrades (or pins) the internal ironic RPC '
|
||||
'communication to the specified version to enable '
|
||||
'communication with older services. When doing a '
|
||||
'rolling upgrade from version X to version Y, set (pin) '
|
||||
'this to X. To unpin, leave it unset. Defaults to '
|
||||
'using the newest possible RPC behavior.')),
|
||||
]
|
||||
|
||||
|
@ -29,8 +29,10 @@ def _check_versions_compatibility(conf_version, actual_version):
|
||||
Returns True if the configured version is <= the actual version;
|
||||
otherwise returns False.
|
||||
|
||||
param conf_version: configured version, a string with dots
|
||||
param actual_version: actual version, a string with dots
|
||||
:param conf_version: configured version, a string with dots
|
||||
:param actual_version: actual version, a string with dots
|
||||
:returns: True if the configured version is <= the actual version;
|
||||
False otherwise.
|
||||
"""
|
||||
conf_cap = versionutils.convert_version_to_tuple(conf_version)
|
||||
actual_cap = versionutils.convert_version_to_tuple(actual_version)
|
||||
@ -80,7 +82,7 @@ class ReleaseMappingsTestCase(base.TestCase):
|
||||
exceptions = set(['NodeTag', 'ConductorHardwareInterfaces'])
|
||||
# NOTE(xek): As a rule, all models which can be changed between
|
||||
# releases or are sent through RPC should have their counterpart
|
||||
# versioned objects. This means all, but very simple models.
|
||||
# versioned objects.
|
||||
model_names -= exceptions
|
||||
object_names = set(RELEASE_MAPPING['master']['objects'])
|
||||
self.assertEqual(model_names, object_names)
|
||||
|
Loading…
Reference in New Issue
Block a user