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

Include pod output in 'logs' command & display detected problems during start #3673

Merged
merged 10 commits into from
Feb 15, 2019

Conversation

tstromberg
Copy link
Contributor

@tstromberg tstromberg commented Feb 14, 2019

This PR adds logs for the following containers to the logs command:

  • k8s_kube-apiserver
  • k8s_coredns_coredn
  • k8s_kube-scheduler

This PR also detects common problems within these pods, as well as the kubelet, and displays these errors if "minikube start" fails. Example output below:

💡  Tip: To create a new cluster, use 'minikube start -p <new name>' or use 'minikube delete' to delete this one.
🔄  Restarting existing none VM for "minikube" ...
⌛  Waiting for SSH access ...
📶  "minikube" IP address is 172.31.148.205
🐳  Configuring Docker as your container runtime ...
✨  Preparing Kubernetes environment ...
    ▪ apiserver.feature-gates=BoundServiceAccountTokenVolume=true
🚜  Pulling images used by Kubernetes v1.13.3 ...
🔄  Relaunching Kubernetes v1.13.3 using kubeadm ... 
⌛  Restarting kube-proxy ...
💣  Error restarting cluster: restarting kube-proxy: waiting for kube-proxy to be up for configmap update: timed out waiting for the condition

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new
❌  Problems detected in "k8s_kube-apiserver":
    error: [service-account-issuer is a required flag when BoundServiceAccountTokenVolume is enabled, --service-account-signing-key-file and --service-account-issuer are required flags]

This PR resolves #3550 and #3532

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 14, 2019
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2019
@tstromberg tstromberg changed the title Add pod logs to 'logs' command, show detected problems during minikube start Include pod output in 'logs' command, show detected problems during minikube start Feb 14, 2019
@tstromberg tstromberg changed the title Include pod output in 'logs' command, show detected problems during minikube start Include pod output in 'logs' command & display detected problems during start Feb 14, 2019
@tstromberg
Copy link
Contributor Author

@minikube-bot OK to test

@balopat balopat self-assigned this Feb 14, 2019
Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

I think this looks good - I have a bunch of nits and ideas - please consider them before merging.
Thank you, I'm very excited to have problem parsing from logs!

pkg/minikube/logs/logs_test.go Outdated Show resolved Hide resolved
pkg/minikube/logs/logs.go Outdated Show resolved Hide resolved
pkg/minikube/exit/exit.go Outdated Show resolved Hide resolved
pkg/minikube/bootstrapper/bootstrapper.go Outdated Show resolved Hide resolved
pkg/minikube/logs/logs.go Show resolved Hide resolved
pkg/minikube/logs/logs.go Show resolved Hide resolved
balopat and others added 4 commits February 14, 2019 13:16
Co-Authored-By: tstromberg <tstromberg@google.com>
Co-Authored-By: tstromberg <tstromberg@google.com>
@balopat
Copy link
Contributor

balopat commented Feb 14, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 14, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: balopat, tstromberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add apiserver logs to "minikube logs" command
3 participants