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:
parent
a5c1a93096
commit
4f55c2d5c3
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
2
lib/heat
2
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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
6
lib/nova
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user