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
This commit is contained in:
Jeffrey Zhang 2016-05-12 20:09:21 +08:00
parent 27580054db
commit 43abb15c25
2 changed files with 9 additions and 5 deletions

View File

@ -11,15 +11,18 @@ export KEEPALIVED_VIRTUAL_ROUTER_ID=$(shuf -i 1-255 -n 1)
function copy_logs { function copy_logs {
cp -rnL /var/lib/docker/volumes/kolla_logs/_data/* /tmp/logs/kolla/ 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 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 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 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 { function sanity_check {
@ -65,6 +68,7 @@ network_interface: "${PRIVATE_INTERFACE}"
neutron_external_interface: "fake_interface" neutron_external_interface: "fake_interface"
enable_horizon: "no" enable_horizon: "no"
enable_heat: "no" enable_heat: "no"
openstack_logging_debug: "True"
EOF EOF
mkdir /etc/kolla/config/nova mkdir /etc/kolla/config/nova

View File

@ -119,7 +119,7 @@ function setup_logging {
# For ease of access we symlink that logs directory to a known path # For ease of access we symlink that logs directory to a known path
ln -s $(pwd)/logs /tmp/logs 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 setup_logging