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

add experimental warning for multinode clusters #7934

Merged
merged 5 commits into from
May 1, 2020

Conversation

sharifelgamal
Copy link
Collaborator

@sharifelgamal sharifelgamal commented Apr 29, 2020

Before:

πŸ˜„  minikube v1.10.0-beta.1 on Darwin 10.15.4
✨  Automatically selected the hyperkit driver
πŸ‘  Starting control plane node minikube in cluster minikube
πŸ”₯  Creating hyperkit VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
πŸ”Ž  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner

πŸ‘  Starting node minikube-m02 in cluster minikube
πŸƒ  Updating the running hyperkit "minikube" VM ...
🌐  Found network options:
    β–ͺ NO_PROXY=192.168.64.17
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
πŸ„  Done! kubectl is now configured to use "minikube"

After:

πŸ˜„  minikube v1.10.0-beta.1 on Darwin 10.15.4
✨  Automatically selected the hyperkit driver
πŸ‘  Starting control plane node minikube in cluster minikube
πŸ”₯  Creating hyperkit VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
πŸ”Ž  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner

❗  Multi-node clusters are currently experimental and might exhibit unintended behavior.
To track progress on multi-node clusters, see https://github.com/kubernetes/minikube/issues/7538.

πŸ‘  Starting node minikube-m02 in cluster minikube
πŸƒ  Updating the running hyperkit "minikube" VM ...
🌐  Found network options:
    β–ͺ NO_PROXY=192.168.64.17
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
πŸ„  Done! kubectl is now configured to use "minikube"

@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 Apr 29, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sharifelgamal

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 requested review from blueelvis and RA489 April 29, 2020 17:16
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2020
@@ -305,6 +306,10 @@ func startWithDriver(starter node.Starter, existing *config.ClusterConfig) (*kub
return kubeconfig, nil
}

func warnAboutMultiNode() {
out.T(out.Tip, "Multi-node clusters are currently experimental and might exhibit unintended behavior.\nTo track progress on multi-node clusters, see https://github.com/kubernetes/minikube/issues/7538.")
Copy link
Contributor

Choose a reason for hiding this comment

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

out.WarningT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wasn't sure if I wanted to pollute std err with this message, but it makes sense. Fixed.

@sharifelgamal
Copy link
Collaborator 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 Apr 29, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
docker Driver

@@ -57,6 +57,7 @@ var nodeAddCmd = &cobra.Command{

// Make sure to decrease the default amount of memory we use per VM if this is the first worker node
if len(cc.Nodes) == 1 && viper.GetString(memory) == "" {
warnAboutMultiNode()
Copy link
Member

Choose a reason for hiding this comment

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

is this the only part of the code we could detect it is multi node?
I think I saw somewhere else too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the only time we care about warning the user is when they are starting a multinode cluster, so just minikube start or the first minikube node add which is what this is detecting

Copy link
Member

Choose a reason for hiding this comment

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

so this condition " len(cc.Nodes) == 1 && viper.GetString(memory) == ""

would detect both
minikube node add
and also
minikube start -n=3?

wouldn;t the len(cc.Nodes) be 3 in that case and not trigger this if?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you're right that we shouldn't put the check inside this if because of the memory check. there'a separate call to warnAboutMultiNode() that will detect the minikube start -n 3 case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed this check. the other check is in start.go

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 29, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [64.689959064 63.87372677500001 64.579396422]
Average time for minikube: 64.38102742033334

Times for Minikube (PR 7934): [66.431633393 65.43663727 64.067846902]
Average time for Minikube (PR 7934): 65.31203918833334

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7934) |
+--------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.1 on   |  0.064806 |           0.064186 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.021089 |           0.023222 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.013835 |           0.003978 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 39.826304 |          40.034317 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.1 | 22.049223 |          23.066043 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.512396 |           1.564515 |
| components...                  |           |                    |
| * Enabled addons:              |  0.807450 |           0.442707 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.082261 |           0.106483 |
| configured to use "minikube"   |           |                    |
|                                |  0.003663 |           0.006589 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [30.371288909999993 29.835072767 28.27149989]
Average time for minikube: 29.492620522333336

Times for Minikube (PR 7934): [28.232376244999998 28.905191753999997 28.897069663999993]
Average time for Minikube (PR 7934): 28.678212554333328

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 7934) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.1 on           |  0.082283 |           0.084102 |
| Debian 9.11                            |           |                    |
| * Using the docker driver              |  0.002986 |           0.002979 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.071593 |           0.065629 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  8.888426 |           8.373315 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.1         |  0.182909 |           0.139979 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 19.060435 |          18.576352 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  0.967909 |           1.280427 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.162218 |           0.082226 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.067799 |           0.067430 |
| configured to use "minikube"           |           |                    |
|                                        |  0.006064 |           0.005774 |
+----------------------------------------+-----------+--------------------+

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

approved but needs to do manual check that this has not affected the single cluster.
need to check the following:

  • start single cluster with no args (should be given the default auto select)
  • start single cluster with memory = 3000mb and should see that minikube respected it in reality.

if len(cc.Nodes) == 1 {
warnAboutMultiNode()
if viper.GetString(memory) == "" {
cc.Memory = 2200
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems unrelated - can it be moved to a second PR for release notes-sake?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the memory check already existed, I just moved a little of the logic around to make it more clear

@sharifelgamal
Copy link
Collaborator Author

$ out/minikube start
πŸ˜„  minikube v1.10.0-beta.1 on Darwin 10.15.4
✨  Automatically selected the hyperkit driver
πŸ‘  Starting control plane node minikube in cluster minikube
πŸ”₯  Creating hyperkit VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
πŸ”Ž  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
πŸ„  Done! kubectl is now configured to use "minikube"
$ out/minikube delete
πŸ”₯  Deleting "minikube" in hyperkit ...
πŸ’€  Removed all traces of the "minikube" cluster.
$ out/minikube start --memory=3000
πŸ˜„  minikube v1.10.0-beta.1 on Darwin 10.15.4
✨  Automatically selected the hyperkit driver
πŸ‘  Starting control plane node minikube in cluster minikube
πŸ”₯  Creating hyperkit VM (CPUs=2, Memory=3000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
πŸ”Ž  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
πŸ„  Done! kubectl is now configured to use "minikube"

@codecov-io
Copy link

codecov-io commented May 1, 2020

Codecov Report

Merging #7934 into master will increase coverage by 0.33%.
The diff coverage is 11.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7934      +/-   ##
==========================================
+ Coverage   35.71%   36.04%   +0.33%     
==========================================
  Files         149      144       -5     
  Lines        9408     9196     -212     
==========================================
- Hits         3360     3315      -45     
+ Misses       5644     5480     -164     
+ Partials      404      401       -3     
Impacted Files Coverage Ξ”
cmd/minikube/cmd/completion.go 0.00% <ΓΈ> (ΓΈ)
cmd/minikube/cmd/node_add.go 17.85% <0.00%> (-1.38%) ⬇️
cmd/minikube/cmd/start.go 15.61% <0.00%> (-0.12%) ⬇️
cmd/minikube/cmd/tunnel.go 5.26% <100.00%> (+0.13%) ⬆️
pkg/minikube/download/progressbar.go

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [64.42572186700001 68.997260659 66.877050186]
Average time for minikube: 66.76667757066666

Times for Minikube (PR 7934): [68.91616142000001 68.69140936200002 65.899790825]
Average time for Minikube (PR 7934): 67.83578720233335

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7934) |
+--------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on   |  0.064856 |           0.066559 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.020831 |           0.021128 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.006037 |           0.003311 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 42.084697 |          41.259415 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.1 | 22.222463 |          24.116983 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.512340 |           1.358458 |
| components...                  |           |                    |
| * Enabled addons:              |  0.783320 |           0.927569 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.068749 |           0.076706 |
| configured to use "minikube"   |           |                    |
|                                |  0.003384 |           0.005657 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [28.013316707 27.008722157999998 28.698574478]
Average time for minikube: 27.90687111433333

Times for Minikube (PR 7934): [27.493045504999998 27.911607212 27.851864929000005]
Average time for Minikube (PR 7934): 27.752172548666664

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 7934) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on           |  0.075993 |           0.081148 |
| Debian 9.11                            |           |                    |
| * Using the docker driver              |  0.003992 |           0.002510 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.064810 |           0.060752 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  7.844126 |           7.872616 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.1         |  0.124824 |           0.123544 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 18.203429 |          18.589686 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  1.466875 |           0.858923 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.055257 |           0.094090 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.064581 |           0.064164 |
| configured to use "minikube"           |           |                    |
|                                        |  0.002984 |           0.004741 |
+----------------------------------------+-----------+--------------------+

@sharifelgamal sharifelgamal merged commit cc32892 into kubernetes:master May 1, 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.

6 participants