For some reason we were defaulting the name of the cell0 database
to nova_api_cell0 instead of nova_cell0. Devstack inherited that to
make things work, but we don't really want that. This patch makes us
use the proper name and create the cell0 mapping accordingly. As a
side effect, it also starts the process of unifying the cellsv1 and
cellsv2 paths by creating the cell0 mapping the same for both.
Change-Id: I4e7f6c5eaa068c98e5c4ef3feaee50d8e4f5d484
... | ... |
@@ -678,10 +678,10 @@ function init_nova { |
678 | 678 |
if is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-api; then |
679 | 679 |
# (Re)create nova databases |
680 | 680 |
recreate_database nova |
681 |
- recreate_database nova_api_cell0 |
|
681 |
+ recreate_database nova_cell0 |
|
682 | 682 |
|
683 | 683 |
# Migrate nova database. If "nova-manage cell_v2 simple_cell_setup" has |
684 |
- # been run this migrates the "nova" and "nova_api_cell0" database. |
|
684 |
+ # been run this migrates the "nova" and "nova_cell0" database. |
|
685 | 685 |
# Otherwise it just migrates the "nova" database. |
686 | 686 |
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync |
687 | 687 |
|
... | ... |
@@ -945,11 +945,12 @@ function create_flavors { |
945 | 945 |
|
946 | 946 |
# create_cell(): Group the available hosts into a cell |
947 | 947 |
function create_cell { |
948 |
+ # NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed |
|
949 |
+ (nova-manage cell_v2 map_cell0 --database_connection `database_connection_url nova_cell0`|| true) |
|
950 |
+ |
|
948 | 951 |
if ! is_service_enabled n-cell; then |
949 | 952 |
nova-manage cell_v2 simple_cell_setup --transport-url $(get_transport_url) |
950 | 953 |
else |
951 |
- # NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed |
|
952 |
- (nova-manage cell_v2 map_cell0 || true) |
|
953 | 954 |
nova-manage --config-file $NOVA_CELLS_CONF --verbose cell_v2 map_cell_and_hosts \ |
954 | 955 |
--transport-url $(get_transport_url child_cell) --name 'cell1' |
955 | 956 |
nova-manage db sync |