5edae54855
During the PTG there was a discussion that the screen developer workflow wasn't nearly as useful as it once was. There were now too many services to see them all on one screen, and one of the most common service restart scenarios was not restarting one service, but a bunch to get code to take effect. This implements a 3rd way of running services instead of direct forking via bash, or running under screen, which is running as systemd units. Logging is adjusted because it's redundant to log datetime in oslo.log when journald has that. Swift needed to have services launched by absolute path to work. This is disabled by default, but with instructions on using it. The long term intent is to make this the way to run devstack, which would be the same between both the gate and local use. Some changes were also needed to run_process to pass the run User in. A hack around the keystone uwsgi launcher was done at the same time to remove a run_process feature that only keystone uwsgi uses. Change-Id: I836bf27c4cfdc449628aa7641fb96a5489d5d4e7
44 lines
1.1 KiB
Bash
44 lines
1.1 KiB
Bash
#!/bin/bash
|
|
#
|
|
# lib/dstat
|
|
# Functions to start and stop dstat
|
|
|
|
# Dependencies:
|
|
#
|
|
# - ``functions`` file
|
|
|
|
# ``stack.sh`` calls the entry points in this order:
|
|
#
|
|
# - start_dstat
|
|
# - stop_dstat
|
|
|
|
# Save trace setting
|
|
_XTRACE_DSTAT=$(set +o | grep xtrace)
|
|
set +o xtrace
|
|
|
|
# start_dstat() - Start running processes, including screen
|
|
function start_dstat {
|
|
# A better kind of sysstat, with the top process per time slice
|
|
run_process dstat "$TOP_DIR/tools/dstat.sh $LOGDIR"
|
|
|
|
# To enable memory_tracker add:
|
|
# enable_service memory_tracker
|
|
# to your localrc
|
|
run_process memory_tracker "$TOP_DIR/tools/memory_tracker.sh" "" "root"
|
|
|
|
# remove support for the old name when it's no longer used (sometime in Queens)
|
|
if is_service_enabled peakmem_tracker; then
|
|
deprecated "Use of peakmem_tracker in devstack is deprecated, use memory_tracker instead"
|
|
run_process peakmem_tracker "$TOP_DIR/tools/memory_tracker.sh" "" "root"
|
|
fi
|
|
}
|
|
|
|
# stop_dstat() stop dstat process
|
|
function stop_dstat {
|
|
stop_process dstat
|
|
stop_process memory_tracker
|
|
}
|
|
|
|
# Restore xtrace
|
|
$_XTRACE_DSTAT
|