diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-04-04 10:21:02 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-04-04 10:21:02 +0000 |
commit | 7ad3f9de8b7308b99a56fffba08b6914890138ab (patch) | |
tree | 650bd68602fff101e8074e25f8561b7a0c26e7d2 | |
parent | 7a9af981a9982d2eec74bca73a4ec2ebd3fb9442 (diff) | |
parent | 4f10391494ad1135de5995abdc3cedc76672d8d2 (diff) | |
download | ironic-7ad3f9de8b7308b99a56fffba08b6914890138ab.tar.gz |
Merge "Updates to RPC and object version pinning"
-rw-r--r-- | etc/ironic/ironic.conf.sample | 15 | ||||
-rw-r--r-- | ironic/common/release_mappings.py | 12 | ||||
-rw-r--r-- | ironic/conf/default.py | 14 | ||||
-rw-r--r-- | ironic/tests/unit/common/test_release_mappings.py | 8 |
4 files changed, 35 insertions, 14 deletions
diff --git a/etc/ironic/ironic.conf.sample b/etc/ironic/ironic.conf.sample index f71df190a..566d92db5 100644 --- a/etc/ironic/ironic.conf.sample +++ b/etc/ironic/ironic.conf.sample @@ -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 diff --git a/ironic/common/release_mappings.py b/ironic/common/release_mappings.py index 063e14a4f..cc4592fa9 100644 --- a/ironic/common/release_mappings.py +++ b/ironic/common/release_mappings.py @@ -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': { diff --git a/ironic/conf/default.py b/ironic/conf/default.py index 79d1079eb..476e7b861 100644 --- a/ironic/conf/default.py +++ b/ironic/conf/default.py @@ -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.')), ] diff --git a/ironic/tests/unit/common/test_release_mappings.py b/ironic/tests/unit/common/test_release_mappings.py index 74d8d5853..783921bb7 100644 --- a/ironic/tests/unit/common/test_release_mappings.py +++ b/ironic/tests/unit/common/test_release_mappings.py @@ -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) |