8000 status: Explicitly state that the cluster does not exist by tstromberg · Pull Request #6438 · kubernetes/minikube · GitHub
[go: up one dir, main page]

Skip to content

status: Explicitly state that the cluster does not exist - #6438

Merged
tstromberg merged 1 commit into
kubernetes:masterfrom
tstromberg:nonexistent-status
Jan 31, 2020
Merged

tstromberg merged 1 commit into
kubernetes:masterfrom
tstromberg:nonexistent-status

Conversation

@tstromberg
Copy link
Copy Markdown
Contributor

While debugging a local integration test failure that said the cluster status was "", I dug in and noticed that "minikube status" on a nonexistent cluster emits no error:

host: 
kubelet: 
apiserver: 
kubeconfig: 

This PR changes the behavior to emit an error to stderr, and populate the fields with "Nonexistent":

E0130 14:43:04.992476    7478 status.go:98] The "minikube" cluster does not exist!
host: Nonexistent
kubelet: Nonexistent
apiserver: Nonexistent
kubeconfig: Nonexistent

With -o json, it emits:

E0130 14:43:07.520741    7534 status.go:98] The "minikube" cluster does not exist!
{"Host":"Nonexistent","Kubelet":"Nonexistent","APIServer":"Nonexistent","Kubeconfig":"Nonexistent"} 

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 30, 2020
@tstromberg tstromberg changed the title Explicitly say that a cluster is nonexistent status: Explicitly state that the cluster does not exist Jan 30, 2020
@tstromberg
Copy link
Copy Markdown
Contributor Author

/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 Jan 30, 2020
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tstromberg

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

The pull request process is described here

Details 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 Jan 30, 2020
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #6438 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6438      +/-   ##
==========================================
- Coverage   37.68%   37.64%   -0.04%     
==========================================
  Files         128      128              
  Lines        8654     8662       +8     
==========================================
  Hits         3261     3261              
- Misses       4970     4978       +8     
  Partials      423      423
Impacted Files Coverage Δ
cmd/minikube/cmd/status.go 26.31% <0%> (-2.42%) ⬇️

@minikube-pr-bot
Copy link
Copy Markdown

All Times minikube: [ 92.984026 98.199648 95.280520]
All Times Minikube (PR 6438): [ 94.672726 96.674145 97.683283]

Average minikube: 95.488065
Average Minikube (PR 6438): 96.343385

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6438) |
+----------------------+-----------+--------------------+
| minikube v           |  0.316215 |           0.300070 |
| Creating kvm2        | 19.843634 |          20.480782 |
| Preparing Kubernetes | 49.317161 |          49.315685 |
| Pulling images       |  3.601241 |           3.723885 |
| Launching Kubernetes | 19.623075 |          19.907964 |
| Waiting for cluster  |  2.730142 |           2.560205 |
+----------------------+-----------+--------------------+

@sharifelgamal
Copy link
Copy Markdown
Contributor

is the line printed to stderr going to break stuff ingesting the json output?

@tstromberg
Copy link
Copy Markdown
Contributor Author

is the line printed to stderr going to break stuff ingesting the json output?

It could: but that's fine with me: stderr is never designed to be parsed, as it may always contain a random unrelated error message.

@tstromberg
tstromberg merged commit 02902f7 into kubernetes:master Jan 31, 2020
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. 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.

5 participants

0