|
...
|
...
|
@@ -85,6 +85,9 @@ METADATA_SERVICE_PORT=${METADATA_SERVICE_PORT:-8775}
|
|
85
|
85
|
# NOTE: Set ``FORCE_CONFIG_DRIVE="False"`` to turn OFF config drive
|
|
86
|
86
|
FORCE_CONFIG_DRIVE=${FORCE_CONFIG_DRIVE:-"False"}
|
|
87
|
87
|
|
|
|
88
|
+# Option to initialize CellsV2 environment
|
|
|
89
|
+NOVA_CONFIGURE_CELLSV2=$(trueorfalse False NOVA_CONFIGURE_CELLSV2)
|
|
|
90
|
+
|
|
88
|
91
|
# Nova supports pluggable schedulers. The default ``FilterScheduler``
|
|
89
|
92
|
# should work in most cases.
|
|
90
|
93
|
SCHEDULER=${SCHEDULER:-filter_scheduler}
|
|
...
|
...
|
@@ -682,10 +685,15 @@ function init_nova {
|
|
682
|
682
|
# All nova components talk to a central database.
|
|
683
|
683
|
# Only do this step once on the API node for an entire cluster.
|
|
684
|
684
|
if is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-api; then
|
|
685
|
|
- # (Re)create nova database
|
|
|
685
|
+ # (Re)create nova databases
|
|
686
|
686
|
recreate_database nova
|
|
|
687
|
+ if [ "$NOVA_CONFIGURE_CELLSV2" != "False" ]; then
|
|
|
688
|
+ recreate_database nova_api_cell0
|
|
|
689
|
+ fi
|
|
687
|
690
|
|
|
688
|
|
- # Migrate nova database
|
|
|
691
|
+ # Migrate nova database. If "nova-manage cell_v2 simple_cell_setup" has
|
|
|
692
|
+ # been run this migrates the "nova" and "nova_api_cell0" database.
|
|
|
693
|
+ # Otherwise it just migrates the "nova" database.
|
|
689
|
694
|
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync
|
|
690
|
695
|
|
|
691
|
696
|
if is_service_enabled n-cell; then
|