Merge "lib/nova: create api db first"
This commit is contained in:
commit
f62a3fb9c6
6
lib/nova
6
lib/nova
|
@ -677,6 +677,9 @@ function init_nova {
|
|||
# All nova components talk to a central database.
|
||||
# Only do this step once on the API node for an entire cluster.
|
||||
if is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-api; then
|
||||
recreate_database $NOVA_API_DB
|
||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF api_db sync
|
||||
|
||||
# (Re)create nova databases
|
||||
recreate_database nova
|
||||
recreate_database nova_api_cell0
|
||||
|
@ -690,9 +693,6 @@ function init_nova {
|
|||
recreate_database $NOVA_CELLS_DB
|
||||
fi
|
||||
|
||||
recreate_database $NOVA_API_DB
|
||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF api_db sync
|
||||
|
||||
# Run online migrations on the new databases
|
||||
# Needed for flavor conversion
|
||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations
|
||||
|
|
Loading…
Reference in New Issue