Merge "Disallow rolling upgrade from Ocata to Queens"
This commit is contained in:
commit
6d14576744
@ -368,7 +368,7 @@
|
|||||||
# (default), leave it unset and the latest versions of RPC
|
# (default), leave it unset and the latest versions of RPC
|
||||||
# communication and database objects will be used. (string
|
# communication and database objects will be used. (string
|
||||||
# value)
|
# value)
|
||||||
# Allowed values: pike, ocata, 9.1, 9.0, 8.0, 7.0
|
# Allowed values: pike, 9.1, 9.0, 8.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
|
||||||
@ -3657,8 +3657,8 @@
|
|||||||
# Minimum value: 0
|
# Minimum value: 0
|
||||||
#udp_transport_timeout = 1.0
|
#udp_transport_timeout = 1.0
|
||||||
|
|
||||||
# Maximum number of UDP request retries, 0 means just a single
|
# Maximum number of UDP request retries, 0 means no retries.
|
||||||
# request. (integer value)
|
# (integer value)
|
||||||
# Minimum value: 0
|
# Minimum value: 0
|
||||||
#udp_transport_retries = 5
|
#udp_transport_retries = 5
|
||||||
|
|
||||||
|
@ -54,18 +54,6 @@
|
|||||||
# oldest named release.
|
# oldest named release.
|
||||||
|
|
||||||
RELEASE_MAPPING = {
|
RELEASE_MAPPING = {
|
||||||
'7.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'],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'8.0': {
|
'8.0': {
|
||||||
'rpc': '1.40',
|
'rpc': '1.40',
|
||||||
'objects': {
|
'objects': {
|
||||||
@ -128,7 +116,6 @@ RELEASE_MAPPING = {
|
|||||||
# release (that we are no longer supporting for a rolling upgrade).
|
# release (that we are no longer supporting for a rolling upgrade).
|
||||||
#
|
#
|
||||||
# There should be at most two named mappings here.
|
# There should be at most two named mappings here.
|
||||||
RELEASE_MAPPING['ocata'] = RELEASE_MAPPING['7.0']
|
|
||||||
RELEASE_MAPPING['pike'] = RELEASE_MAPPING['9.1']
|
RELEASE_MAPPING['pike'] = RELEASE_MAPPING['9.1']
|
||||||
|
|
||||||
# List of available versions with named versions first; 'master' is excluded.
|
# List of available versions with named versions first; 'master' is excluded.
|
||||||
|
@ -243,19 +243,14 @@ class IronicObject(object_base.VersionedObject):
|
|||||||
db_version = db_object['version']
|
db_version = db_object['version']
|
||||||
|
|
||||||
if db_version is None:
|
if db_version is None:
|
||||||
# NOTE(rloo): This can only happen after we've updated the DB
|
# NOTE(rloo): This can only happen if the DB is corrupt or this
|
||||||
# tables to include the 'version' column but haven't saved the
|
# is the conductor object. (Because the rest of the objects will
|
||||||
# object to the DB since the new column was added. This column is
|
# all have their DB version set properly.)
|
||||||
# added in the Pike cycle, so if the version isn't set, use the
|
# TODO(rloo): This entire if clause can be deleted in Rocky
|
||||||
# version associated with the most recent release, i.e. '8.0'.
|
# since the dbsync online migration populates all the conductor
|
||||||
# The objects and RPC versions haven't changed between '8.0' and
|
# versions and it must be run to completion before upgrading to
|
||||||
# Ocata, which is why it is fine to use Ocata.
|
# Rocky.
|
||||||
# Furthermore, if this is a new object that did not exist in the
|
db_version = versions.RELEASE_MAPPING['pike']['objects'].get(
|
||||||
# most recent release, we assume it is version 1.0.
|
|
||||||
# TODO(rloo): This entire if clause can be deleted in Queens
|
|
||||||
# since the dbsync online migration populates all the versions
|
|
||||||
# and it must be run to completion before upgrading to Queens.
|
|
||||||
db_version = versions.RELEASE_MAPPING['ocata']['objects'].get(
|
|
||||||
objname, ['1.0'])[0]
|
objname, ['1.0'])[0]
|
||||||
|
|
||||||
if not versionutils.is_compatible(db_version, obj.__class__.VERSION):
|
if not versionutils.is_compatible(db_version, obj.__class__.VERSION):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user