File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -704,9 +704,13 @@ function init_nova {
704704 recreate_database nova
705705 recreate_database nova_cell0
706706
707- # Migrate nova database. If "nova-manage cell_v2 simple_cell_setup" has
708- # been run this migrates the "nova" and "nova_cell0" database.
709- # Otherwise it just migrates the "nova" database.
707+ # map_cell0 will create the cell mapping record in the nova_api DB so
708+ # this needs to come after the api_db sync happens. We also want to run
709+ # this before the db sync below since that will migrate both the nova
710+ # and nova_cell0 databases.
711+ nova-manage cell_v2 map_cell0 --database_connection ` database_connection_url nova_cell0`
712+
713+ # Migrate nova and nova_cell0 databases.
710714 $NOVA_BIN_DIR /nova-manage --config-file $NOVA_CONF db sync
711715
712716 if is_service_enabled n-cell; then
@@ -966,9 +970,6 @@ function create_flavors {
966970
967971# create_cell(): Group the available hosts into a cell
968972function create_cell {
969- # NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed
970- (nova-manage cell_v2 map_cell0 --database_connection ` database_connection_url nova_cell0` || true)
971-
972973 if ! is_service_enabled n-cell; then
973974 nova-manage cell_v2 simple_cell_setup --transport-url $( get_transport_url)
974975 else
You can’t perform that action at this time.
0 commit comments