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

Show last start and audit logs on minikube logs if minikube not running #10839

Merged
merged 3 commits into from
Mar 16, 2021

Conversation

spowelljr
Copy link
Member

@spowelljr spowelljr commented Mar 15, 2021

Closes #10729

The first thing the minkube logs command does is tries loading the running cluster, and if the cluster config does not exist (not running), exits within the load function with the message:

🤷  Profile "minikube" not found. Run "minikube profile list" to view all profiles.
👉  To start a cluster, run: "minikube start"

But if a user is having a problem starting minikube and wants to create a GitHub issue, this prevents them from getting the logs they need to provide in the issue.

I moved the last start and audit logs output before the cluster load to ensure they're output regardless of the status of the cluster.

Running minikube logs on non-running cluster:
Before:

🤷  Profile "minikube" not found. Run "minikube profile list" to view all profiles.
👉  To start a cluster, run: "minikube start"

Now:

==> Audit <==
...

==> Last Start <==
...

🤷  Profile "minikube" not found. Run "minikube profile list" to view all profiles.
👉  To start a cluster, run: "minikube start"

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 15, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 15, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

pkg/minikube/logs/logs.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/logs.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, spowelljr

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2021
@medyagh
Copy link
Member

medyagh commented Mar 16, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 16, 2021
@kubernetes kubernetes deleted a comment from minikube-pr-bot Mar 16, 2021
@kubernetes kubernetes deleted a comment from minikube-pr-bot Mar 16, 2021
@medyagh
Copy link
Member

medyagh commented Mar 16, 2021

/retest-this-please

@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with Minikube (PR 10839): timing cmd: [/home/performance-monitor/.minikube/minikube-binaries/10839/minikube start --driver=kvm2]: starting cmd: fork/exec /home/performance-monitor/.minikube/minikube-binaries/10839/minikube: exec format error
docker Driver
error collecting results for docker driver: timing run 0 with Minikube (PR 10839): timing cmd: [/home/performance-monitor/.minikube/minikube-binaries/10839/minikube start --driver=docker]: starting cmd: fork/exec /home/performance-monitor/.minikube/minikube-binaries/10839/minikube: exec format error

@medyagh
Copy link
Member

medyagh commented Mar 16, 2021

/retest-this-please

@medyagh medyagh merged commit e4d32a7 into kubernetes:master Mar 16, 2021
@spowelljr spowelljr deleted the fixLogsOutput branch June 28, 2021 17:40
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. pr_verified size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make minikube logs command output audit and last start logs when minikube not running
5 participants