Merge "Track db sync command time useage"

This commit is contained in:
Jenkins 2017-06-15 19:36:25 +00:00 committed by Gerrit Code Review
commit b24bfac43d
7 changed files with 14 additions and 0 deletions

View File

@ -407,8 +407,10 @@ function init_cinder {
# (Re)create cinder database # (Re)create cinder database
recreate_database cinder recreate_database cinder
time_start "dbsync"
# Migrate cinder database # Migrate cinder database
$CINDER_BIN_DIR/cinder-manage --config-file $CINDER_CONF db sync $CINDER_BIN_DIR/cinder-manage --config-file $CINDER_CONF db sync
time_stop "dbsync"
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

@ -285,11 +285,13 @@ function init_glance {
# (Re)create glance database # (Re)create glance database
recreate_database glance recreate_database glance
time_start "dbsync"
# Migrate glance database # Migrate glance database
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf 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 --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
time_stop "dbsync"
create_glance_cache_dir create_glance_cache_dir
} }

View File

@ -465,8 +465,10 @@ function init_keystone {
recreate_database keystone recreate_database keystone
fi fi
time_start "dbsync"
# Initialize keystone database # Initialize keystone database
$KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF db_sync $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF db_sync
time_stop "dbsync"
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

View File

@ -336,8 +336,10 @@ function init_neutron_new {
recreate_database neutron recreate_database neutron
time_start "dbsync"
# Run Neutron db migrations # Run Neutron db migrations
$NEUTRON_BIN_DIR/neutron-db-manage upgrade heads $NEUTRON_BIN_DIR/neutron-db-manage upgrade heads
time_stop "dbsync"
create_neutron_cache_dir create_neutron_cache_dir
} }

View File

@ -417,8 +417,10 @@ function create_mutnauq_accounts {
# init_mutnauq() - Initialize databases, etc. # init_mutnauq() - Initialize databases, etc.
function init_mutnauq { function init_mutnauq {
recreate_database $Q_DB_NAME recreate_database $Q_DB_NAME
time_start "dbsync"
# Run Neutron db migrations # Run Neutron db migrations
$NEUTRON_BIN_DIR/neutron-db-manage --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head $NEUTRON_BIN_DIR/neutron-db-manage --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
time_stop "dbsync"
} }
# install_mutnauq() - Collect source and prepare # install_mutnauq() - Collect source and prepare

View File

@ -649,7 +649,9 @@ function init_nova_cells {
iniset $NOVA_CELLS_CONF DEFAULT enabled_apis metadata iniset $NOVA_CELLS_CONF DEFAULT enabled_apis metadata
fi fi
time_start "dbsync"
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF db sync $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF db sync
time_stop "dbsync"
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1 $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
$NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1 $NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1

View File

@ -149,7 +149,9 @@ function create_placement_accounts {
function init_placement { function init_placement {
if [ "$PLACEMENT_DB_ENABLED" != False ]; then if [ "$PLACEMENT_DB_ENABLED" != False ]; then
recreate_database placement recreate_database placement
time_start "dbsync"
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF api_db sync $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF api_db sync
time_stop "dbsync"
fi fi
create_placement_accounts create_placement_accounts
} }