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
This commit is contained in:
Einst Crazy 2016-05-04 08:14:01 +00:00
parent a5c1a93096
commit 4f55c2d5c3
5 changed files with 10 additions and 10 deletions

View File

@ -415,7 +415,7 @@ function init_cinder {
recreate_database cinder recreate_database cinder
# Migrate cinder database # Migrate cinder database
$CINDER_BIN_DIR/cinder-manage db sync $CINDER_BIN_DIR/cinder-manage --config-file $CINDER_CONF db sync
fi fi
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then

View File

@ -334,10 +334,10 @@ function init_glance {
recreate_database glance recreate_database glance
# Migrate glance database # 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 # 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 create_glance_cache_dir
} }

View File

@ -241,7 +241,7 @@ function init_heat {
# (re)create heat database # (re)create heat database
recreate_database heat 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 create_heat_cache_dir
} }

View File

@ -489,16 +489,16 @@ function init_keystone {
recreate_database keystone recreate_database keystone
# Initialize keystone database # 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 if [[ "$KEYSTONE_TOKEN_FORMAT" == "pki" || "$KEYSTONE_TOKEN_FORMAT" == "pkiz" ]]; then
# Set up certificates # Set up certificates
rm -rf $KEYSTONE_CONF_DIR/ssl 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 fi
if [[ "$KEYSTONE_TOKEN_FORMAT" == "fernet" ]]; then if [[ "$KEYSTONE_TOKEN_FORMAT" == "fernet" ]]; then
rm -rf "$KEYSTONE_CONF_DIR/fernet-keys/" 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 fi
} }

View File

@ -702,18 +702,18 @@ function init_nova {
recreate_database nova recreate_database nova
# Migrate nova database # 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 if is_service_enabled n-cell; then
recreate_database $NOVA_CELLS_DB recreate_database $NOVA_CELLS_DB
fi fi
recreate_database $NOVA_API_DB 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 # Run online migrations on the new databases
# Needed for flavor conversion # 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 fi
create_nova_cache_dir create_nova_cache_dir