oscwrap: make a little quieter

A huge part of the logs is irrelevant bash aliases captured by the
openstack client timing wrapper from the run of "openstack complete",
which is only helpful on interactive systems where you'll interact
with the command line.  Call it directly to avoid capturing the logs.

While we're here, turn off tracing inside the oscwrap function, which
is called frequently.  It's not useful for debugging.

Change-Id: I1cb5399fe7ee6f0e547a9cfff70396aa2007632e
This commit is contained in:
Ian Wienand 2019-08-08 09:15:11 +10:00
parent 1f6bea1768
commit 474f535a14
2 changed files with 9 additions and 1 deletions

View File

@ -2354,6 +2354,10 @@ function time_stop {
} }
function oscwrap { function oscwrap {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local out local out
local rc local rc
local start local start
@ -2368,6 +2372,7 @@ function oscwrap {
echo $((end - start)) >> $OSCWRAP_TIMER_FILE echo $((end - start)) >> $OSCWRAP_TIMER_FILE
echo "$out" echo "$out"
$xtrace
return $rc return $rc
} }

View File

@ -1475,7 +1475,10 @@ fi
# =============== # ===============
# Prepare bash completion for OSC # Prepare bash completion for OSC
openstack complete | sudo tee /etc/bash_completion.d/osc.bash_completion > /dev/null # Note we use "command" to avoid the timing wrapper
# which isn't relevant here and floods logs
command openstack complete \
| sudo tee /etc/bash_completion.d/osc.bash_completion > /dev/null
# If cinder is configured, set global_filter for PV devices # If cinder is configured, set global_filter for PV devices
if is_service_enabled cinder; then if is_service_enabled cinder; then