Merge "Fix cellsv2 cell0 database name"

This commit is contained in:
Jenkins 2017-01-16 21:38:44 +00:00 committed by Gerrit Code Review
commit 1afe532a3e
1 changed files with 5 additions and 4 deletions

View File

@ -682,10 +682,10 @@ function init_nova {
# (Re)create nova databases
recreate_database nova
recreate_database nova_api_cell0
recreate_database nova_cell0
# Migrate nova database. If "nova-manage cell_v2 simple_cell_setup" has
# been run this migrates the "nova" and "nova_api_cell0" database.
# been run this migrates the "nova" and "nova_cell0" database.
# Otherwise it just migrates the "nova" database.
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync
@ -946,11 +946,12 @@ function create_flavors {
# create_cell(): Group the available hosts into a cell
function create_cell {
# NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed
(nova-manage cell_v2 map_cell0 --database_connection `database_connection_url nova_cell0`|| true)
if ! is_service_enabled n-cell; then
nova-manage cell_v2 simple_cell_setup --transport-url $(get_transport_url)
else
# NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed
(nova-manage cell_v2 map_cell0 || true)
nova-manage --config-file $NOVA_CELLS_CONF --verbose cell_v2 map_cell_and_hosts \
--transport-url $(get_transport_url child_cell) --name 'cell1'
nova-manage db sync