From 03786b1cca196473d90c8ce0dc1c98a1b3081ac5 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 10 Jun 2015 11:31:51 -0700 Subject: [PATCH] Create and initialize the nova api_db 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 --- lib/nova | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/nova b/lib/nova index 11fa2a0ba4..a9f335115d 100644 --- a/lib/nova +++ b/lib/nova @@ -53,6 +53,7 @@ NOVA_CONF=$NOVA_CONF_DIR/nova.conf NOVA_CELLS_CONF=$NOVA_CONF_DIR/nova-cells.conf NOVA_FAKE_CONF=$NOVA_CONF_DIR/nova-fake.conf NOVA_CELLS_DB=${NOVA_CELLS_DB:-nova_cell} +NOVA_API_DB=${NOVA_API_DB:-nova_api} NOVA_API_PASTE_INI=${NOVA_API_PASTE_INI:-$NOVA_CONF_DIR/api-paste.ini} # NOVA_API_VERSION valid options @@ -471,6 +472,7 @@ function create_nova_conf { iniset $NOVA_CONF DEFAULT s3_port "$S3_SERVICE_PORT" iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP" iniset $NOVA_CONF database connection `database_connection_url nova` + iniset $NOVA_CONF api_database connection `database_connection_url nova_api` iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x" iniset $NOVA_CONF osapi_v3 enabled "True" @@ -675,6 +677,9 @@ function init_nova { if is_service_enabled n-cell; then recreate_database $NOVA_CELLS_DB fi + + recreate_database $NOVA_API_DB + $NOVA_BIN_DIR/nova-manage api_db sync fi create_nova_cache_dir