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

retrieve virtual switch name from driver object directly #8103

Merged
merged 1 commit into from
May 12, 2020

Conversation

sharifelgamal
Copy link
Collaborator

@sharifelgamal sharifelgamal commented May 12, 2020

RawDriver is never being populated anymore by non-legacy drivers, and we never noticed because this code was not called by anything but mount. This is fixed by addressing a long-standing TODO and just grab the wanted value directly from the object instead of counting on RawDriver.

Before

* minikube v1.10.0 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
* Automatically selected the hyperv driver. Other choices: docker, virtualbox
* Starting control plane node minikube in cluster minikube
* Creating hyperv VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
* Preparing Kubernetes v1.18.1 on Docker 19.03.8 ...
panic: runtime error: index out of range [1] with length 0

goroutine 1 [running]:
k8s.io/minikube/pkg/minikube/cluster.HostIP(0xc000a0c240, 0x7, 0x1df4d40, 0xc0004cfcb0, 0x0, 0xc000782690)
        C:/Users/shari/Documents/minikube/pkg/minikube/cluster/ip.go:46 +0xcd5
k8s.io/minikube/pkg/minikube/node.Start(0x1dc3d20, 0xc00059a0a0, 0x0, 0x1de35a0, 0xc0005aa380, 0xc000a0c240, 0xc0003e6e00, 0xc0005aa280, 0xc000535aa0, 0x4e01, ...)
        C:/Users/shari/Documents/minikube/pkg/minikube/node/start.go:93 +0x201
k8s.io/minikube/cmd/minikube/cmd.startWithDriver(0x1dc3d20, 0xc00059a0a0, 0x0, 0x1de35a0, 0xc0005aa380, 0xc000a0c240, 0xc0003e6e00, 0xc0005aa280, 0xc000535aa0, 0x0, ...)
        C:/Users/shari/Documents/minikube/cmd/minikube/cmd/start.go:281 +0x83
k8s.io/minikube/cmd/minikube/cmd.runStart(0x2ac7c40, 0x2b13d10, 0x0, 0x0)
        C:/Users/shari/Documents/minikube/cmd/minikube/cmd/start.go:202 +0x6f3
github.com/spf13/cobra.(*Command).execute(0x2ac7c40, 0x2b13d10, 0x0, 0x0, 0x2ac7c40, 0x2b13d10)
        C:/Users/shari/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x2a4
github.com/spf13/cobra.(*Command).ExecuteC(0x2ac6c80, 0x0, 0x0, 0xc00059a201)
        C:/Users/shari/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        C:/Users/shari/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
k8s.io/minikube/cmd/minikube/cmd.Execute()
        C:/Users/shari/Documents/minikube/cmd/minikube/cmd/root.go:112 +0x6ba
main.main()
        C:/Users/shari/Documents/minikube/cmd/minikube/main.go:66 +0xed

After

* minikube v1.10.0 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
* Automatically selected the hyperv driver. Other choices: docker, virtualbox
* Starting control plane node minikube in cluster minikube
* Creating hyperv VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
* Preparing Kubernetes v1.18.1 on Docker 19.03.8 ...
* Verifying Kubernetes components...
* Enabled addons: default-storageclass, storage-provisioner
* Done! kubectl is now configured to use "minikube"

closes #8080

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 12, 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 added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 12, 2020
@codecov-io
Copy link

Codecov Report

Merging #8103 into master will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8103      +/-   ##
==========================================
- Coverage   35.37%   35.35%   -0.03%     
==========================================
  Files         146      146              
  Lines        9315     9321       +6     
==========================================
  Hits         3295     3295              
- Misses       5621     5627       +6     
  Partials      399      399              
Impacted Files Coverage Δ
pkg/minikube/cluster/ip.go 0.00% <0.00%> (ø)

@medyagh
Copy link
Member

medyagh commented May 12, 2020

/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 May 12, 2020
@medyagh medyagh merged commit 6417324 into kubernetes:master May 12, 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.

v1.10.0 initialization issue, nil pointer [WINDOWS]
4 participants