Run online_data_migrations during nova setup

This is a normal step in the process for upgrade and is now
required for migration of flavors from the main DB to the API DB.
Since we previously made a bad decision to encode those flavors into
the first database migration, that means that even on new installs we
need to run these.

Deployment tools are going to be running this command any time they
do anything to the database post-deployment, which means adding this
to devstack is putting it in line with what normal deployments will
be doing.

Change-Id: I8ab03af9d2f4974f26a7f8487ec978caea957e45
This commit is contained in:
Dan Smith 2016-03-28 11:03:35 -07:00
parent 8b416ae821
commit bb49d35739

View File

@ -708,6 +708,10 @@ function init_nova {
recreate_database $NOVA_API_DB
$NOVA_BIN_DIR/nova-manage api_db sync
# Run online migrations on the new databases
# Needed for flavor conversion
$NOVA_BIN_DIR/nova-manage db online_data_migrations
fi
create_nova_cache_dir