Skip to content

Commit 474f535

Browse files
committed
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
1 parent 1f6bea1 commit 474f535

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

functions-common

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,6 +2354,10 @@ function time_stop {
23542354
}
23552355

23562356
function oscwrap {
2357+
local xtrace
2358+
xtrace=$(set +o | grep xtrace)
2359+
set +o xtrace
2360+
23572361
local out
23582362
local rc
23592363
local start
@@ -2368,6 +2372,7 @@ function oscwrap {
23682372
echo $((end - start)) >> $OSCWRAP_TIMER_FILE
23692373

23702374
echo "$out"
2375+
$xtrace
23712376
return $rc
23722377
}
23732378

stack.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,10 @@ fi
14751475
# ===============
14761476

14771477
# Prepare bash completion for OSC
1478-
openstack complete | sudo tee /etc/bash_completion.d/osc.bash_completion > /dev/null
1478+
# Note we use "command" to avoid the timing wrapper
1479+
# which isn't relevant here and floods logs
1480+
command openstack complete \
1481+
| sudo tee /etc/bash_completion.d/osc.bash_completion > /dev/null
14791482

14801483
# If cinder is configured, set global_filter for PV devices
14811484
if is_service_enabled cinder; then

0 commit comments

Comments
 (0)