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
diff --git a/lib/nova b/lib/nova
index 2b8fefa..602a6ef 100644
--- a/lib/nova
+++ b/lib/nova
@@ -708,6 +708,10 @@
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