From 43abb15c2565fce7869194fa56829f86caf4bcfb Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Thu, 12 May 2016 20:09:21 +0800 Subject: [PATCH] Collect more info from the gate for debug * enable the openstack logging debug in the gate * copy the /etc/kolla files out * copy the /var/log files out TrivialFix Change-Id: I9cf5fa773ec5f41c6ea93325076a64dd24ce22da --- tools/deploy_aio.sh | 12 ++++++++---- tools/setup_gate.sh | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/deploy_aio.sh b/tools/deploy_aio.sh index 9a6ae60e94..57617fc27f 100755 --- a/tools/deploy_aio.sh +++ b/tools/deploy_aio.sh @@ -11,15 +11,18 @@ export KEEPALIVED_VIRTUAL_ROUTER_ID=$(shuf -i 1-255 -n 1) function copy_logs { cp -rnL /var/lib/docker/volumes/kolla_logs/_data/* /tmp/logs/kolla/ - # NOTE(SamYaple): Fix permissions for log extraction in gate + cp -rnL /etc/kolla/* /tmp/logs/kolla_configs/ + cp -rvnL /var/log/* /tmp/logs/system_logs/ + if [[ -x "$(command -v journalctl)" ]]; then - journalctl --no-pager -u docker.service > /tmp/logs/kolla/docker.log + journalctl --no-pager -u docker.service > /tmp/logs/system_logs/docker.log else - cp /var/log/upstart/docker.log /tmp/logs/kolla/docker.log + cp /var/log/upstart/docker.log /tmp/logs/system_logs/docker.log fi - chmod -R 777 /tmp/logs/kolla/ + # NOTE(SamYaple): Fix permissions for log extraction in gate + chmod -R 777 /tmp/logs/kolla /tmp/logs/kolla_configs /tmp/logs/system_logs } function sanity_check { @@ -65,6 +68,7 @@ network_interface: "${PRIVATE_INTERFACE}" neutron_external_interface: "fake_interface" enable_horizon: "no" enable_heat: "no" +openstack_logging_debug: "True" EOF mkdir /etc/kolla/config/nova diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index dbfcd3d646..d8b4d70671 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -119,7 +119,7 @@ function setup_logging { # For ease of access we symlink that logs directory to a known path ln -s $(pwd)/logs /tmp/logs - mkdir -p /tmp/logs/{ansible,build,kolla} + mkdir -p /tmp/logs/{ansible,build,kolla,kolla_configs,system_logs} } setup_logging