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

Create Hyper-V External Switch #6264

Merged
merged 13 commits into from
Feb 8, 2020
Merged

Conversation

laozc
Copy link
Contributor

@laozc laozc commented Jan 10, 2020

This PR tries to find an external switch or create one for Hyper-V driver if the user specifies -hyperv-use-external-switch.

If the adapter is not specified, the driver will first look up LAN adapters before other adapters (WiFi, ...).
Or the user may specify an adapter to attach to the external switch.

Since Windows 10 only allows one external switch for the same adapter, it will find the virtual switch before creating one. The external switch will be created and named as "minikube" if not the case.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 10, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @laozc. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 10, 2020
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: laozc
To complete the pull request process, please assign medyagh
You can assign the PR to them by writing /assign @medyagh in a comment when ready.

The full list of commands accepted by this bot can be found 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

@codecov-io
Copy link

codecov-io commented Jan 10, 2020

Codecov Report

Merging #6264 into master will increase coverage by 0.12%.
The diff coverage is 66.46%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6264      +/-   ##
=========================================
+ Coverage   37.97%   38.1%   +0.12%     
=========================================
  Files         138     137       -1     
  Lines        8714    8690      -24     
=========================================
+ Hits         3309    3311       +2     
+ Misses       4987    4963      -24     
+ Partials      418     416       -2
Impacted Files Coverage Δ
pkg/minikube/bootstrapper/bootstrapper.go 0% <ø> (ø) ⬆️
pkg/minikube/cluster/start.go 51.37% <ø> (ø) ⬆️
pkg/minikube/bootstrapper/bsutil/versions.go 81.81% <ø> (ø) ⬆️
cmd/minikube/cmd/delete.go 25.12% <0%> (ø) ⬆️
pkg/minikube/bootstrapper/bsutil/kubeadm.go 82.6% <100%> (+0.51%) ⬆️
pkg/minikube/cruntime/crio.go 53.12% <100%> (+6.25%) ⬆️
pkg/minikube/cruntime/docker.go 42.4% <100%> (+4.79%) ⬆️
pkg/minikube/bootstrapper/bsutil/extraconfig.go 80.82% <100%> (+1.71%) ⬆️
cmd/minikube/cmd/start.go 22.59% <33.33%> (-0.12%) ⬇️
cmd/minikube/cmd/env.go 57.37% <62.18%> (+0.46%) ⬆️
... and 3 more

@medyagh
Copy link
Member

medyagh commented Jan 10, 2020

@laozc I am curious why the formatting changed so much ? we run goimports -w on all the code...it should be same ...

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 10, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2020
@RA489
Copy link

RA489 commented Jan 13, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 13, 2020
@minikube-bot
Copy link
Collaborator

All Times minikube: [ 122.082626 121.300649 126.761437]
All Times Minikube (PR 6264): [ 121.384663 111.825862 111.659941]

Average minikube: 123.381571
Average Minikube (PR 6264): 114.956822

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6264) |
+----------------------+-----------+--------------------+
| minikube v           |  0.430779 |           0.404907 |
| Creating kvm2        | 46.968129 |          45.965266 |
| Preparing Kubernetes | 50.305746 |          43.643313 |
| Pulling images       |  2.822725 |           2.459825 |
| Launching Kubernetes | 20.199817 |          19.360840 |
| Waiting for cluster  |  2.610544 |           3.080574 |
| Done                 |           |                    |
|                      |  0.043807 |           0.042096 |
+----------------------+-----------+--------------------+

@laozc
Copy link
Contributor Author

laozc commented Jan 13, 2020

@laozc I am curious why the formatting changed so much ? we run goimports -w on all the code...it should be same ...

Do you mean the formatting in cmd/minikube/cmd/start.go and pkg/minikube/config/types.go?
I think golang would try to align the definition by column and the new field hypervUseExternalSwitch is one character more than existing fields.

@minikube-bot
Copy link
Collaborator

Error: running mkcmp: exit status 1

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 17, 2020
@minikube-bot
Copy link
Collaborator

Error: running mkcmp: exit status 1

1 similar comment
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 18, 2020
@minikube-pr-bot
Copy link

All Times minikube: [ 116.244172 112.958288 114.386224]
All Times Minikube (PR 6264): [ 244.793081 225.304119 225.218155]

Average minikube: 114.529561
Average Minikube (PR 6264): 231.771785

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6264) |
+----------------------+-----------+--------------------+
| minikube v           |  0.284735 |           0.293265 |
| Creating kvm2        | 41.023519 |         160.967011 |
| Preparing Kubernetes | 46.634871 |          40.757989 |
| Pulling images       |  3.971491 |           2.407591 |
| Launching Kubernetes | 19.817252 |          24.752266 |
| Waiting for cluster  |  2.747079 |           2.542124 |
+----------------------+-----------+--------------------+

pkg/minikube/registry/drvs/hyperv/vswitch.go Outdated Show resolved Hide resolved
pkg/minikube/registry/drvs/hyperv/vswitch.go Show resolved Hide resolved
pkg/minikube/registry/drvs/hyperv/vswitch.go Outdated Show resolved Hide resolved
@minikube-pr-bot
Copy link

All Times Minikube (PR 6264): [ 229.077501 246.523218 231.590488]
All Times minikube: [ 95.276105 92.479505 96.625606]

Average minikube: 94.793739
Average Minikube (PR 6264): 235.730402

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6264) |
+----------------------+-----------+--------------------+
| minikube v           |  0.433618 |           0.314531 |
| Creating kvm2        | 20.156116 |         161.218599 |
| Preparing Kubernetes | 48.477586 |          42.959591 |
| Pulling images       |  3.540941 |           2.239183 |
| Launching Kubernetes | 18.619572 |          24.274581 |
| Waiting for cluster  |  1.401563 |           2.732030 |
+----------------------+-----------+--------------------+

@medyagh
Copy link
Member

medyagh commented Feb 5, 2020

@laozc thanks for resolving the code reviews, letss resolve the conflicts and I think we could merge this !

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 5, 2020
@tstromberg
Copy link
Contributor

Merge conflict, but otherwise seems to be ready!

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 6, 2020
@minikube-pr-bot
Copy link

All Times minikube: [ 99.851257 95.978568 94.742635]
All Times Minikube (PR 6264): [ 97.467316 97.596322 101.248441]

Average minikube: 96.857486
Average Minikube (PR 6264): 98.770693

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6264) |
+----------------------+-----------+--------------------+
| minikube v           |  0.160111 |           0.224438 |
| Creating kvm2        | 19.784521 |          20.000718 |
| Preparing Kubernetes | 50.664457 |          51.084255 |
| Pulling images       |  3.848554 |           3.386625 |
| Launching Kubernetes | 20.645624 |          20.453880 |
| Waiting for cluster  |  0.051469 |           1.726974 |
+----------------------+-----------+--------------------+

@tstromberg
Copy link
Contributor

/ok-to-test

@medyagh
Copy link
Member

medyagh commented Feb 8, 2020

@laozc thank you for your patience and thank you for resolving the conflict a few times, I promise this be the last time and your PR will get a high priority to be merged.

thank you again

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 8, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 8, 2020
@minikube-pr-bot
Copy link

All Times minikube: [ 93.260324 93.643328 93.578822]
All Times Minikube (PR 6264): [ 93.296713 93.047563 94.122484]

Average minikube: 93.494158
Average Minikube (PR 6264): 93.488920

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6264) |
+----------------------+-----------+--------------------+
| minikube v           |  0.127772 |           0.125245 |
| Creating kvm2        | 19.959462 |          20.075174 |
| Preparing Kubernetes | 50.702470 |          50.983311 |
| Pulling images       |           |                    |
| Launching Kubernetes | 20.504717 |          20.676903 |
| Waiting for cluster  |  0.561666 |           0.047047 |
+----------------------+-----------+--------------------+

@medyagh medyagh merged commit 239be7e into kubernetes:master Feb 8, 2020
@medyagh
Copy link
Member

medyagh commented Feb 8, 2020

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants