Set ubound to debug level and dump cache

Debug unbound DNS queries in job for investigation of
DNS failures.
Dump unbound DNS cache server cache..

Depends-On: Ia76ac9b20d6b8402060b71e11e00e515bc74077d
Related-Bug: #1730931

Change-Id: Ic8b9e33067141366655fad1b99dee1adb40dfba3
This commit is contained in:
Sagi Shnaidman 2017-11-15 14:03:58 +02:00
parent 7ca408bb6b
commit 962205603d
5 changed files with 17 additions and 0 deletions

View File

@ -11,6 +11,9 @@ if [ -f "$TRIPLEO_ROOT/tripleo-ci/deploy.env" ]; then
source $TRIPLEO_ROOT/tripleo-ci/deploy.env
fi
sudo sed -i "s/verbosity: .*$/verbosity: 5/g" /etc/unbound/conf.d/unbound-logging.conf
sudo systemctl restart unbound
# Ensure epel-release is not installed
sudo yum erase -y epel-release || :

View File

@ -10,6 +10,8 @@ export TRIPLEO_ROOT=${TRIPLEO_ROOT:-"/opt/stack/new"}
if [ -f "$TRIPLEO_ROOT/tripleo-ci/deploy.env" ]; then
source $TRIPLEO_ROOT/tripleo-ci/deploy.env
fi
sudo sed -i "s/verbosity: .*$/verbosity: 5/g" /etc/unbound/conf.d/unbound-logging.conf
sudo systemctl restart unbound
# Ensure epel-release is not installed
sudo yum erase -y epel-release || :

View File

@ -7,6 +7,9 @@ set -eux
export START_JOB_TIME=$(date +%s)
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
sudo sed -i "s/verbosity: .*$/verbosity: 5/g" /etc/unbound/conf.d/unbound-logging.conf
sudo systemctl restart unbound
# Maintain compatibility with the old jobtypes
if [[ ! $TOCI_JOBTYPE =~ "featureset" ]]; then
echo "WARNING: USING OLD DEPLOYMENT METHOD. THE OLD DEPLOYMENT METHOD THAT USES tripleo.sh WILL BE DEPRECATED IN THE QUEENS CYCLE"

View File

@ -428,3 +428,7 @@ if [ -z "${TE_DATAFILE:-}" -a "$OSINFRA" = "0" ] ; then
else
$TOCIRUNNER
fi
sudo unbound-control dump_cache > /tmp/dns_cache.txt
sudo chown ${USER}: /tmp/dns_cache.txt
cat /tmp/dns_cache.txt | gzip - > $WORKSPACE/logs/dns_cache.txt.gz

View File

@ -106,6 +106,11 @@ $LOCAL_WORKING_DIR/bin/ara generate html $LOGS_DIR/ara_oooq || true
gzip --best --recursive $LOGS_DIR/ara_oooq || true
popd
sudo unbound-control dump_cache > /tmp/dns_cache.txt
sudo chown ${USER}: /tmp/dns_cache.txt
cat /tmp/dns_cache.txt | gzip - > $LOGS_DIR/dns_cache.txt.gz
# record the size of the logs directory
# -L, --dereference dereference all symbolic links
du -L -ch $LOGS_DIR/* | sort -rh | head -n 200 &> $LOGS_DIR/log-size.txt || true