Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log daemons' failure reasons to supervisord log files #21444

Merged
merged 3 commits into from
Feb 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cluster/saltbase/salt/supervisor/kubelet-checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ max_seconds=10
while true; do
if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:{{kubelet_port}}/healthz > /dev/null; then
echo "kubelet failed!"
curl --insecure -s http://127.0.0.1:{{kubelet_port}}/healthz
exit 2
fi
sleep 10
Expand Down
7 changes: 7 additions & 0 deletions test/e2e/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ func CoreDump(dir string) {
{"cat /var/log/kube-apiserver.log", "kube-apiserver"},
{"cat /var/log/kube-scheduler.log", "kube-scheduler"},
{"cat /var/log/kube-controller-manager.log", "kube-controller-manager"},
{"cat /var/log/etcd.log", "kube-etcd"},
}
if isUsingSystemdKubelet(provider, master) {
cmds = append(cmds, command{"sudo journalctl --output=cat -u kubelet.service", "kubelet"})
} else {
cmds = append(cmds, []command{
{"cat /var/log/kubelet.log", "kubelet"},
{"cat /var/log/supervisor/supervisord.log", "supervisord"},
{"cat /var/log/supervisor/kubelet-stdout.log", "supervisord-kubelet-stdout"},
{"cat /var/log/supervisor/kubelet-stderr.log", "supervisord-kubelet-stderr"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want to gather /var/log/docker.log and docker-stdout/stderr.log? I think /var/log/docker.log will be helpful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, forgot to pick up docker.log. Will add them. I couldn't make docker-stdout/stderr.log have more information. All I can get is

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

{"cat /var/log/kern.log", "kern.log"},
{"cat /var/log/docker.log", "docker.log"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need the .log in the second string - it gets added automatically. i.e. this should be

{"cat /var/log/docker.log", "docker"},

(similar for other uses. kern.log is likewise incorrect, though I missed that earlier)

}...)
}

Expand All @@ -88,7 +92,10 @@ func CoreDump(dir string) {
cmds = append(cmds, []command{
{"cat /var/log/kubelet.log", "kubelet"},
{"cat /var/log/supervisor/supervisord.log", "supervisord"},
{"cat /var/log/supervisor/kubelet-stdout.log", "supervisord-kubelet-stdout"},
{"cat /var/log/supervisor/kubelet-stderr.log", "supervisord-kubelet-stderr"},
{"cat /var/log/kern.log", "kern.log"},
{"cat /var/log/docker.log", "docker.log"},
}...)
}

Expand Down