Going forward, nova will have another database at the API level (similar to how
current cells has an api-level cell, with its own database). This patch creates
and initializes it so that we can start testing the migrations with grenade.
Change-Id: I0dfae32102aeda9c5d17e134527b6a18f4b88014
| ... | ... |
@@ -53,6 +53,7 @@ NOVA_CONF=$NOVA_CONF_DIR/nova.conf |
| 53 | 53 |
NOVA_CELLS_CONF=$NOVA_CONF_DIR/nova-cells.conf |
| 54 | 54 |
NOVA_FAKE_CONF=$NOVA_CONF_DIR/nova-fake.conf |
| 55 | 55 |
NOVA_CELLS_DB=${NOVA_CELLS_DB:-nova_cell}
|
| 56 |
+NOVA_API_DB=${NOVA_API_DB:-nova_api}
|
|
| 56 | 57 |
|
| 57 | 58 |
NOVA_API_PASTE_INI=${NOVA_API_PASTE_INI:-$NOVA_CONF_DIR/api-paste.ini}
|
| 58 | 59 |
# NOVA_API_VERSION valid options |
| ... | ... |
@@ -471,6 +472,7 @@ function create_nova_conf {
|
| 471 | 471 |
iniset $NOVA_CONF DEFAULT s3_port "$S3_SERVICE_PORT" |
| 472 | 472 |
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP" |
| 473 | 473 |
iniset $NOVA_CONF database connection `database_connection_url nova` |
| 474 |
+ iniset $NOVA_CONF api_database connection `database_connection_url nova_api` |
|
| 474 | 475 |
iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
|
| 475 | 476 |
iniset $NOVA_CONF osapi_v3 enabled "True" |
| 476 | 477 |
|
| ... | ... |
@@ -675,6 +677,9 @@ function init_nova {
|
| 675 | 675 |
if is_service_enabled n-cell; then |
| 676 | 676 |
recreate_database $NOVA_CELLS_DB |
| 677 | 677 |
fi |
| 678 |
+ |
|
| 679 |
+ recreate_database $NOVA_API_DB |
|
| 680 |
+ $NOVA_BIN_DIR/nova-manage api_db sync |
|
| 678 | 681 |
fi |
| 679 | 682 |
|
| 680 | 683 |
create_nova_cache_dir |