Browse code

Merge "Fix cellsv2 cell0 database name"

Jenkins authored on 2017/01/17 06:38:44
Showing 1 changed files
... ...
@@ -682,10 +682,10 @@ function init_nova {
682 682
 
683 683
         # (Re)create nova databases
684 684
         recreate_database nova
685
-        recreate_database nova_api_cell0
685
+        recreate_database nova_cell0
686 686
 
687 687
         # Migrate nova database. If "nova-manage cell_v2 simple_cell_setup" has
688
-        # been run this migrates the "nova" and "nova_api_cell0" database.
688
+        # been run this migrates the "nova" and "nova_cell0" database.
689 689
         # Otherwise it just migrates the "nova" database.
690 690
         $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync
691 691
 
... ...
@@ -946,11 +946,12 @@ function create_flavors {
946 946
 
947 947
 # create_cell(): Group the available hosts into a cell
948 948
 function create_cell {
949
+    # NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed
950
+    (nova-manage cell_v2 map_cell0 --database_connection `database_connection_url nova_cell0`|| true)
951
+
949 952
     if ! is_service_enabled n-cell; then
950 953
         nova-manage cell_v2 simple_cell_setup --transport-url $(get_transport_url)
951 954
     else
952
-        # NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed
953
-        (nova-manage cell_v2 map_cell0 || true)
954 955
         nova-manage --config-file $NOVA_CELLS_CONF  --verbose cell_v2 map_cell_and_hosts \
955 956
                 --transport-url $(get_transport_url child_cell) --name 'cell1'
956 957
         nova-manage db sync