Track db sync command time useage
We are trying to keep better track of what pieces of devstack consume the most time. Add the db sync commands to the time tracking as they run the database migrations which can take more time than expected. Change-Id: Ib92f2b8304ccf703712d45fd7207444de3599e2d
This commit is contained in:
parent
f4b4a79979
commit
633dbc3d8e
@ -407,8 +407,10 @@ function init_cinder {
|
||||
# (Re)create cinder database
|
||||
recreate_database cinder
|
||||
|
||||
time_start "dbsync"
|
||||
# Migrate cinder database
|
||||
$CINDER_BIN_DIR/cinder-manage --config-file $CINDER_CONF db sync
|
||||
time_stop "dbsync"
|
||||
fi
|
||||
|
||||
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
|
||||
|
@ -285,11 +285,13 @@ function init_glance {
|
||||
# (Re)create glance database
|
||||
recreate_database glance
|
||||
|
||||
time_start "dbsync"
|
||||
# Migrate glance database
|
||||
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_sync
|
||||
|
||||
# Load metadata definitions
|
||||
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
|
||||
time_stop "dbsync"
|
||||
|
||||
create_glance_cache_dir
|
||||
}
|
||||
|
@ -458,8 +458,10 @@ function init_keystone {
|
||||
recreate_database keystone
|
||||
fi
|
||||
|
||||
time_start "dbsync"
|
||||
# Initialize keystone database
|
||||
$KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF db_sync
|
||||
time_stop "dbsync"
|
||||
|
||||
if [[ "$KEYSTONE_TOKEN_FORMAT" == "pki" || "$KEYSTONE_TOKEN_FORMAT" == "pkiz" ]]; then
|
||||
# Set up certificates
|
||||
|
@ -336,8 +336,10 @@ function init_neutron_new {
|
||||
|
||||
recreate_database neutron
|
||||
|
||||
time_start "dbsync"
|
||||
# Run Neutron db migrations
|
||||
$NEUTRON_BIN_DIR/neutron-db-manage upgrade heads
|
||||
time_stop "dbsync"
|
||||
|
||||
create_neutron_cache_dir
|
||||
}
|
||||
|
@ -417,8 +417,10 @@ function create_mutnauq_accounts {
|
||||
# init_mutnauq() - Initialize databases, etc.
|
||||
function init_mutnauq {
|
||||
recreate_database $Q_DB_NAME
|
||||
time_start "dbsync"
|
||||
# Run Neutron db migrations
|
||||
$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
|
||||
|
2
lib/nova
2
lib/nova
@ -649,7 +649,9 @@ function init_nova_cells {
|
||||
iniset $NOVA_CELLS_CONF DEFAULT enabled_apis metadata
|
||||
fi
|
||||
|
||||
time_start "dbsync"
|
||||
$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 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
|
||||
|
||||
|
@ -149,7 +149,9 @@ function create_placement_accounts {
|
||||
function init_placement {
|
||||
if [ "$PLACEMENT_DB_ENABLED" != False ]; then
|
||||
recreate_database placement
|
||||
time_start "dbsync"
|
||||
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF api_db sync
|
||||
time_stop "dbsync"
|
||||
fi
|
||||
create_placement_accounts
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user