diff options
author | Ruby Loo <rloo@oath.com> | 2018-10-25 02:15:21 +0000 |
---|---|---|
committer | Dmitry Tantsur <divius.inside@gmail.com> | 2018-10-26 13:26:11 +0200 |
commit | b8d0f2b091fe88b42ac4d0b352fd54423c5a3e2c (patch) | |
tree | 77a1e013e30627168bea997c4a5f4dfdd2a36f13 /ironic/cmd | |
parent | 7cf2d18fa5d53cc7635986616f454217d3856118 (diff) | |
download | ironic-b8d0f2b091fe88b42ac4d0b352fd54423c5a3e2c.tar.gz |
Migration step to update objects to latest version
This adds a migration step that will be executed as the last step
in the 'ironic-dbsync online_data_migration' command. It updates
all the objects that aren't in their latest version, to be in
their latest version.
Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Change-Id: Ib39319a75205ce7692f0525f99200a5de3d60a88
Story: #2004174
Task: #27656
Diffstat (limited to 'ironic/cmd')
-rw-r--r-- | ironic/cmd/dbsync.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ironic/cmd/dbsync.py b/ironic/cmd/dbsync.py index e75a9fb15..99badb4df 100644 --- a/ironic/cmd/dbsync.py +++ b/ironic/cmd/dbsync.py @@ -48,6 +48,9 @@ dbapi = db_api.get_instance() # number migrated. If the function determines that no migrations are needed, # it returns (0, 0). # +# The last migration step should always remain the last one -- it migrates +# all objects to their latest known versions. +# # Example of a function docstring: # # def sample_data_migration(context, max_count): @@ -71,6 +74,8 @@ ONLINE_MIGRATIONS = ( # Added in Rocky # TODO(rloo): remove in Stein (portgroup, 'migrate_vif_port_id'), + # NOTE(rloo): Don't remove this; it should always be last + (dbapi, 'update_to_latest_versions'), ) |