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

Flannel allows you to send invalid/unused commandline args without dying. #217

Closed
jayunit100 opened this issue Jun 21, 2015 · 4 comments
Closed

Comments

@jayunit100
Copy link
Contributor

UPDATE when i created this issue, I was not using the proper current --iface option for flannel. Flannel did not die, so i assumed it was reading in the option, but actually, it was just silently ignoring it.... Nevertheless, the reason i discovered this was that I found eth0 wasn't working (its a bad idea to use eth0 for vagrant based VBox setups where, for example, the bridge is eth0).,.... neverthelss ill leave the comments below unaltered for historical purposes.

but the only bug here is that we need to make sure flannel dies when you give it bad cmd line args :) ...

Related to #216, I've found that in my flannel subnet, I have a subnet w/ publicIP 10.0.2.15.

[root@kube0 vagrant]# etcdctl get /coreos.com/network/subnets/99.0.30.0-24 {"PublicIP":"10.0.2.15","BackendType":"vxlan","BackendData":{"VtepMAC":"8a:eb:23:bd:1b:4a"}}

However, looking deeper into the subnet, the public IP above (10.0.2.15) corresponds to eth0.

[root@kube0 vagrant]# ip a | grep eth1 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 inet 192.168.4.100/24 brd 192.168.4.255 scope global eth1

Oddly, though, I have launched flannel with the eth1 argument:

[root@kube0 vagrant]# ps -ax | grep fla
16332 ?        Ssl    0:00 /usr/bin/flanneld -etcd-endpoints=http://127.0.0.1:2379 -etcd-prefix=/coreos.com/network eth1

I'm assuming that normally, the flannel publicIP should always match the eth interface which flannel is launched on, but maybe there are situations where flannel falls back to eth0 even if another nic is specified?

@jayunit100 jayunit100 changed the title Flannel PublicIP versus ethX argument Flannel PublicIP not matching eth0 instead of the given eth1 argument Jun 21, 2015
@jayunit100 jayunit100 changed the title Flannel PublicIP not matching eth0 instead of the given eth1 argument Flannel PublicIP is matching eth0, instead of the given eth1 argument Jun 21, 2015
@jayunit100
Copy link
Contributor Author

Diving deeper, it appears that in my system, the MAC Addresses for all machines aren't written to etcd, rather, there is exactly one IP subnet and one mac adress . Maybe that is the problem....

[root@kube0 vagrant]# etcdctl ls /coreos.com/network/subnets/
/coreos.com/network/subnets/99.0.30.0-24

(ive deleted my earlier question around ip addresses, as it appears that etcd is only responsible for storing machines+subnets, not individual IPs)

@jayunit100
Copy link
Contributor Author

NEVERMIND I foud that the eth1 argument being sent requires a --iface= option. Meanwhile, i still have other issues, but now im getting two subnets properly provisioned by flannel to different VM's container spaces.

For anyone curious, you have to be careful to make sure you properly use the iface option when starting flannel with vagrant provisioned VMs on a bridged network (eth0 is the bridge in some cases, which can lead to two separate machines trying to use IPs in the same subnet)

@jayunit100
Copy link
Contributor Author

REopening because, flannel should provide an error if you give it an unused/invalid commandline option. Will change the name shortly...

@jayunit100 jayunit100 changed the title Flannel PublicIP is matching eth0, instead of the given eth1 argument Flannel allows you to send invalid/unused commandline args without dying. Jun 21, 2015
@eyakubovich
Copy link
Contributor

I think #223 fixes this. Can it be closed? With latest Go (1.4), bad command line options should result in an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants