Files
Dan Smith
30d9bf9a6d
Async task support
We have a *ton* of stuff in devstack that is very linear, specifically the ten-ish minutes we spend loading osc to run a single API command against something. We also generate configs, sync databases, and other things that use one core of our worker and make our runtime longer than it really needs to be. The idea in this patch is to make it super simple to run some things in the background and then wait for them to finish before proceeding to something that will require them to be done. This avoids the interleaving you would expect by redirecting the async tasks to a log file, and then cat'ing that log file synchronously during the wait operation. The per-task log file remains so it's easier to examine it in isolation. Multiple people have reported between 22-30% improvement in the time it takes to stack with this. More can be done, but what is here already makes a significant difference. Change-Id: I270a910b531641b023c13f75dfedca057a1f1031
37 lines
1.1 KiB
Bash
37 lines
1.1 KiB
Bash
# tempest.sh - DevStack extras script
if is_service_enabled tempest; then
if [[ "1ドル" == "source" ]]; then
# Initial source
source $TOP_DIR/lib/tempest
elif [[ "1ドル" == "stack" && "2ドル" == "install" ]]; then
echo_summary "Installing Tempest"
async_runfunc install_tempest
elif [[ "1ドル" == "stack" && "2ドル" == "post-config" ]]; then
# Tempest config must come after layer 2 services are running
:
elif [[ "1ドル" == "stack" && "2ドル" == "extra" ]]; then
# Tempest config must come after all other plugins are run
:
elif [[ "1ドル" == "stack" && "2ドル" == "post-extra" ]]; then
# local.conf Tempest option overrides
:
elif [[ "1ドル" == "stack" && "2ドル" == "test-config" ]]; then
async_wait install_tempest
echo_summary "Initializing Tempest"
configure_tempest
echo_summary "Installing Tempest Plugins"
install_tempest_plugins
fi
if [[ "1ドル" == "unstack" ]]; then
# no-op
:
fi
if [[ "1ドル" == "clean" ]]; then
# no-op
:
fi
fi