Merge "Functional: only copy logs on exception"

This commit is contained in:
Jenkins 2015-12-03 23:15:16 +00:00 committed by Gerrit Code Review
commit 9ee2f9bc17

View File

@ -47,9 +47,11 @@ if [[ "$COE" == "kubernetes" ]]; then
remote_exec $SSH_USER "sudo journalctl -u kube-controller-manager --no-pager" kube-controller-manager.log remote_exec $SSH_USER "sudo journalctl -u kube-controller-manager --no-pager" kube-controller-manager.log
remote_exec $SSH_USER "sudo journalctl -u docker --no-pager" docker.log remote_exec $SSH_USER "sudo journalctl -u docker --no-pager" docker.log
remote_exec $SSH_USER "sudo journalctl -u flanneld --no-pager" flanneld.log remote_exec $SSH_USER "sudo journalctl -u flanneld --no-pager" flanneld.log
remote_exec $SSH_USER "sudo ip a" ipa.log
remote_exec $SSH_USER "sudo netstat -an" netstat.log
elif [[ "$COE" == "swarm" ]]; then elif [[ "$COE" == "swarm" ]]; then
SSH_USER=fedora SSH_USER=fedora
remote_exec $SSH_USER "sudo systemctl list-units" systemctl_list_units.log remote_exec $SSH_USER "sudo systemctl --full list-units" systemctl_list_units.log
remote_exec $SSH_USER "sudo journalctl -u cloud-config --no-pager" cloud-config.log remote_exec $SSH_USER "sudo journalctl -u cloud-config --no-pager" cloud-config.log
remote_exec $SSH_USER "sudo journalctl -u cloud-final --no-pager" cloud-final.log remote_exec $SSH_USER "sudo journalctl -u cloud-final --no-pager" cloud-final.log
remote_exec $SSH_USER "sudo journalctl -u cloud-init-local --no-pager" cloud-init-local.log remote_exec $SSH_USER "sudo journalctl -u cloud-init-local --no-pager" cloud-init-local.log
@ -59,6 +61,8 @@ elif [[ "$COE" == "swarm" ]]; then
remote_exec $SSH_USER "sudo journalctl -u swarm-agent --no-pager" swarm-agent.log remote_exec $SSH_USER "sudo journalctl -u swarm-agent --no-pager" swarm-agent.log
remote_exec $SSH_USER "sudo journalctl -u docker --no-pager" docker.log remote_exec $SSH_USER "sudo journalctl -u docker --no-pager" docker.log
remote_exec $SSH_USER "sudo journalctl -u flanneld --no-pager" flanneld.log remote_exec $SSH_USER "sudo journalctl -u flanneld --no-pager" flanneld.log
remote_exec $SSH_USER "sudo ip a" ipa.log
remote_exec $SSH_USER "sudo netstat -an" netstat.log
else else
echo "ERROR: Unknown COE '${COE}'" echo "ERROR: Unknown COE '${COE}'"
EXIT_CODE=1 EXIT_CODE=1