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