diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index a24f6dda..5bcb5194 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -249,14 +249,14 @@ fi echo "Triggered by: https://review.openstack.org/$ZUUL_CHANGE patchset $ZUUL_PATCHSET" echo "Pipeline: $ZUUL_PIPELINE" echo "IP configuration of this host:" -ip addr show +indent ip addr show echo "IP routing tables of this host:" -ip route show -ip -6 route show +indent ip route show +indent ip -6 route show echo "ARP table of this host:" -ip neighbor show +indent ip neighbor show echo "Available disk space on this host:" -df -h +indent df -h tsfilter setup_host &> $WORKSPACE/logs/devstack-gate-setup-host.txt diff --git a/functions.sh b/functions.sh index 15268cfa..692e8c3e 100644 --- a/functions.sh +++ b/functions.sh @@ -33,6 +33,12 @@ function tsfilter { }' } +# indent the output of a command 4 spaces, useful for distinguishing +# the output of a command from the command itself +function indent { + $@ | (while read; do echo " $REPLY"; done) +} + # Attempt to fetch a git ref for a project, if that ref is not empty function git_fetch_at_ref { local project=$1