From c66407174e995d58ac90dade05e7595cdc154b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Str=C3=B6mberg?= Date: Tue, 18 Aug 2020 13:03:40 -0700 Subject: [PATCH 1/2] Add post-mortem log collection --- .../en/docs/handbook/troubleshooting.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/site/content/en/docs/handbook/troubleshooting.md b/site/content/en/docs/handbook/troubleshooting.md index 930daa4674..9a9da9caf3 100644 --- a/site/content/en/docs/handbook/troubleshooting.md +++ b/site/content/en/docs/handbook/troubleshooting.md @@ -17,6 +17,29 @@ Example: `minikube start --alsologtostderr --v=2` will start minikube and output all the important debug logs to stderr. +## Post-mortem debug logs + +minikube stores post-mortem INFO logs in the temporary directory of your system. On macOS or Linux, it's easy to get a list of recent INFO logs: + +`find $TMPDIR -mtime -1 -type f -name "*minikube*INFO*" -ls 2>/dev/null` + +For instance, this shows: + +`75318976 8 -rw-r--r-- 1 tstromberg primarygroup 718 Aug 18 12:40 /var/folders/n1/qxvd9kc11w15mc4qv6g43x80000kt3/T//minikube.tstromberg-macbookpro.tstromberg.log.INFO.20200818-124017.63501` + +These are plain text log files: you may rename them to ".log" and then drag/drop them into a GitHub issue for further analysis by the minikube team. You can quickly inspect the final lines of any of these logs via: + +`tail -n 10 ` + +for example, this shows: + +``` +I0818 12:40:17.027317 63501 out.go:197] Setting ErrFile to fd 2... +I0818 12:40:17.027321 63501 out.go:231] isatty.IsTerminal(2) = true +I0818 12:40:17.027423 63501 root.go:272] Updating PATH: /Users/tstromberg/.minikube/bin +I0818 12:40:17.027715 63501 mustload.go:64] Loading cluster: minikube +``` + ## Gathering VM logs To debug issues where Kubernetes failed to deploy, it is very useful to collect the Kubernetes pod and kernel logs: From 9a770098fdd9f932bf987b583f6d51ea5b894915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Str=C3=B6mberg?= Date: Tue, 18 Aug 2020 13:04:59 -0700 Subject: [PATCH 2/2] Update troubleshooting.md --- site/content/en/docs/handbook/troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/en/docs/handbook/troubleshooting.md b/site/content/en/docs/handbook/troubleshooting.md index 9a9da9caf3..bc44b458c7 100644 --- a/site/content/en/docs/handbook/troubleshooting.md +++ b/site/content/en/docs/handbook/troubleshooting.md @@ -17,7 +17,7 @@ Example: `minikube start --alsologtostderr --v=2` will start minikube and output all the important debug logs to stderr. -## Post-mortem debug logs +## Post-mortem minikube debug logs minikube stores post-mortem INFO logs in the temporary directory of your system. On macOS or Linux, it's easy to get a list of recent INFO logs: @@ -25,7 +25,7 @@ minikube stores post-mortem INFO logs in the temporary directory of your system. For instance, this shows: -`75318976 8 -rw-r--r-- 1 tstromberg primarygroup 718 Aug 18 12:40 /var/folders/n1/qxvd9kc11w15mc4qv6g43x80000kt3/T//minikube.tstromberg-macbookpro.tstromberg.log.INFO.20200818-124017.63501` +`-rw-r--r-- 1 user grp 718 Aug 18 12:40 /var/folders/n1/qxvd9kc/T//minikube.mac.user.log.INFO.20200818-124017.63501` These are plain text log files: you may rename them to ".log" and then drag/drop them into a GitHub issue for further analysis by the minikube team. You can quickly inspect the final lines of any of these logs via: