From 4f55c2d5c384f576e45f4310595e262039fd8175 Mon Sep 17 00:00:00 2001 From: Einst Crazy Date: Wed, 4 May 2016 08:14:01 +0000 Subject: [PATCH] Set config file to db sync and other manage operation Currently, the db sync operation does not specify the config dir or config file. If there is a config file in the home path, it will use this one, but not the right one devstack write. Set config file to these operations. Change-Id: Id1fbc3d85280c19596f5ebd301c46bcf018fa2f6 Closes-Bug: #1578098 --- lib/cinder | 2 +- lib/glance | 4 ++-- lib/heat | 2 +- lib/keystone | 6 +++--- lib/nova | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/cinder b/lib/cinder index 607a6f83c6..daeb94a839 100644 --- a/lib/cinder +++ b/lib/cinder @@ -415,7 +415,7 @@ function init_cinder { recreate_database cinder # Migrate cinder database - $CINDER_BIN_DIR/cinder-manage db sync + $CINDER_BIN_DIR/cinder-manage --config-file $CINDER_CONF db sync fi if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then diff --git a/lib/glance b/lib/glance index cda357fa66..887a14d7ed 100644 --- a/lib/glance +++ b/lib/glance @@ -334,10 +334,10 @@ function init_glance { recreate_database glance # Migrate glance database - $GLANCE_BIN_DIR/glance-manage db_sync + $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync # Load metadata definitions - $GLANCE_BIN_DIR/glance-manage db_load_metadefs + $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs create_glance_cache_dir } diff --git a/lib/heat b/lib/heat index 4326321bd1..730adada26 100644 --- a/lib/heat +++ b/lib/heat @@ -241,7 +241,7 @@ function init_heat { # (re)create heat database recreate_database heat - $HEAT_BIN_DIR/heat-manage db_sync + $HEAT_BIN_DIR/heat-manage --config-file $HEAT_CONF db_sync create_heat_cache_dir } diff --git a/lib/keystone b/lib/keystone index bcd5fab40c..6a202e518c 100644 --- a/lib/keystone +++ b/lib/keystone @@ -489,16 +489,16 @@ function init_keystone { recreate_database keystone # Initialize keystone database - $KEYSTONE_BIN_DIR/keystone-manage db_sync + $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF db_sync if [[ "$KEYSTONE_TOKEN_FORMAT" == "pki" || "$KEYSTONE_TOKEN_FORMAT" == "pkiz" ]]; then # Set up certificates rm -rf $KEYSTONE_CONF_DIR/ssl - $KEYSTONE_BIN_DIR/keystone-manage pki_setup + $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF pki_setup fi if [[ "$KEYSTONE_TOKEN_FORMAT" == "fernet" ]]; then rm -rf "$KEYSTONE_CONF_DIR/fernet-keys/" - $KEYSTONE_BIN_DIR/keystone-manage fernet_setup + $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF fernet_setup fi } diff --git a/lib/nova b/lib/nova index 818ecc4f1b..7f64016dca 100644 --- a/lib/nova +++ b/lib/nova @@ -702,18 +702,18 @@ function init_nova { recreate_database nova # Migrate nova database - $NOVA_BIN_DIR/nova-manage db sync + $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync 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 + $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF api_db sync # Run online migrations on the new databases # Needed for flavor conversion - $NOVA_BIN_DIR/nova-manage db online_data_migrations + $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations fi create_nova_cache_dir