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

Minikube stop - correct the number of stopped nodes #11752

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

RA489
Copy link

@RA489 RA489 commented Jun 23, 2021

Minikube stop - correct the number of stopped nodes
fixes #11740

PS: PTAL at Before and after o/p below:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 23, 2021
@RA489
Copy link
Author

RA489 commented Jun 23, 2021

necuser@necuser-HP-ProBook-430-G6:~/minikube$ ./out/minikube start
😄  minikube v1.21.0 on Ubuntu 18.04
❗  Kubernetes 1.21.0 has a known performance issue on cluster startup. It might take 2 to 3 minutes for a cluster to start.
❗  For more information, see: https://github.com/kubernetes/kubeadm/issues/2395
✨  Using the kvm2 driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🔄  Restarting existing kvm2 VM for "minikube" ...
🐳  Preparing Kubernetes v1.21.0 on Docker 20.10.2 ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
necuser@necuser-HP-ProBook-430-G6:~/minikube$ ./out/minikube stop
✋  Stopping node "minikube"  ...
🛑  1 node stopped.

@RA489
Copy link
Author

RA489 commented Jun 23, 2021

with more than 1 node o/p:

necuser@necuser-HP-ProBook-430-G6:~/minikube$ ./out/minikube start --nodes 2 -p multinode-demo
😄  [multinode-demo] minikube v1.21.0 on Ubuntu 18.04
✨  Using the kvm2 driver based on existing profile
👍  Starting control plane node multinode-demo in cluster multinode-demo
🔄  Restarting existing kvm2 VM for "multinode-demo" ...
🐳  Preparing Kubernetes v1.20.7 on Docker 20.10.6 ...
🔗  Configuring CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
❗  The cluster multinode-demo already exists which means the --nodes parameter will be ignored. Use "minikube node add" to add nodes to an existing cluster.
👍  Starting node multinode-demo-m02 in cluster multinode-demo
🔄  Restarting existing kvm2 VM for "multinode-demo-m02" ...
🌐  Found network options:
    ▪ NO_PROXY=192.168.50.193
🐳  Preparing Kubernetes v1.20.7 on Docker 20.10.6 ...
    ▪ env NO_PROXY=192.168.50.193
🔎  Verifying Kubernetes components...
🏄  Done! kubectl is now configured to use "multinode-demo" cluster and "default" namespace by default
necuser@necuser-HP-ProBook-430-G6:~/minikube$ ./out/minikube stop -p multinode-demo
✋  Stopping node "multinode-demo"  ...
✋  Stopping node "multinode-demo-m02"  ...
🛑  2 nodes stopped.

@RA489
Copy link
Author

RA489 commented Jun 23, 2021

/assign @ilya-zuyev

Copy link
Contributor

@JulienBreux JulienBreux left a comment

Choose a reason for hiding this comment

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

Hello 👋🏻

I think is clearer with a Go template syntax.

To reduce code complexity.

⚠️ Code not tested.

What do you mean?

cmd/minikube/cmd/stop.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 30, 2021
@medyagh medyagh self-requested a review June 30, 2021 18:42
@medyagh
Copy link
Member

medyagh commented Jun 30, 2021

@RA489 I agree with @JulienBreux please use the go template syntax or a avoid duplicating code, u could put the word in a var. or use go template syntax

@RA489
Copy link
Author

RA489 commented Jul 5, 2021

@RA489 I agree with @JulienBreux please use the go template syntax or a avoid duplicating code, u could put the word in a var. or use go template syntax

sure will update accordingly.

@RA489
Copy link
Author

RA489 commented Jul 8, 2021

/retest-this-please

@spowelljr
Copy link
Member

@RA489 Linting and building is failing

@RA489
Copy link
Author

RA489 commented Sep 2, 2021

@RA489 Linting and building is failing

Updated the PR. PTAL

@RA489
Copy link
Author

RA489 commented Sep 2, 2021

Looking for LGTM!

@RA489
Copy link
Author

RA489 commented Sep 30, 2021

Any update here?

@spowelljr
Copy link
Member

@RA489 I agree with @JulienBreux please use the go template syntax or a avoid duplicating code, u could put the word in a var. or use go template syntax

It doesn't seem this was addressed, both the lines have duplicated code.

Have you looked at @JulienBreux's suggestion:

out.Step(style.Stopped, `{{.count}} node{{if gt .count 1}}s{{end}} stopped.`, out.V{"count": stoppedNodes})

@RA489
Copy link
Author

RA489 commented Oct 1, 2021

sure, I'll update it with go template syntax.

@spowelljr spowelljr added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 5, 2021
@RA489
Copy link
Author

RA489 commented Oct 6, 2021

@spowelljr Updated to use the go template syntax. PTAL

@RA489
Copy link
Author

RA489 commented Oct 6, 2021

/hold cancel

@RA489
Copy link
Author

RA489 commented Oct 6, 2021

/unhold

@spowelljr spowelljr merged commit 7f827f9 into kubernetes:master Oct 6, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, RA489, 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

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minikube stop - correct the number of stopped nodes
6 participants