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 configures the wrong host network interface #8456

Closed
afbjorklund opened this issue Jun 11, 2020 · 2 comments · Fixed by #8475
Closed

minikube configures the wrong host network interface #8456

afbjorklund opened this issue Jun 11, 2020 · 2 comments · Fixed by #8475
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@afbjorklund
Copy link
Collaborator

When looking at some other issue, I saw that the internal host address was wrong:

                         _             _            
            _         _ ( )           ( )           
  ___ ___  (_)  ___  (_)| |/')  _   _ | |_      __  
/' _ ` _ `\| |/' _ `\| || , <  ( ) ( )| '_`\  /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )(  ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)

$ cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	minikube
192.168.50.1	host.minikube.internal
192.168.99.121	control-plane.minikube.internal
$ ping host.minikube.internal
PING host.minikube.internal (192.168.50.1): 56 data bytes
^C
--- host.minikube.internal ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss

It was supposed to be 192.168.99.1, but picked up the wrong interface (vboxnet1).

 VBoxManage list hostonlyifs
Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       192.168.99.124
NetworkMask:     255.255.255.0
IPV6Address:     fe80::ce1a:401e:995b:f57a
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType:      Ethernet
Wireless:        No
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0

Name:            vboxnet1
GUID:            786f6276-656e-4174-8000-0a0027000001
DHCP:            Disabled
IPAddress:       192.168.50.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType:      Ethernet
Wireless:        No
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet1

There needs to be some code that matches the name of the interfaces.

Instead of just taking the last one and hoping for the best, like now ?

@afbjorklund afbjorklund added kind/bug Categorizes issue or PR as related to a bug. co/virtualbox priority/backlog Higher priority than priority/awaiting-more-evidence. labels Jun 11, 2020
@11janci
Copy link
Contributor

11janci commented Jun 13, 2020

I'd be happy to take a look

@afbjorklund
Copy link
Collaborator Author

@11janci : You will find the code in pkg/minikube/cluster/ip.go,
function HostIP under case driver.VirtualBox. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants