Skip to content

Commit 3769ee2

Browse files
author
Keerthan Mala
committed
fix(flannel): use default iface for starting flannel except vagrant
1 parent 376a098 commit 3769ee2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Vagrant.configure("2") do |config|
9494
# Vagrant binds the VMs IP in VirtualBox's bridge network to the eth1 interface instead of eth0.
9595
# This necessitates the substitution below, which is not required anywhere except in Vagrant.
9696
user_data = File.read(CLOUD_CONFIG_PATH)
97-
new_userdata = user_data.gsub("--iface=eth0", "--iface=eth1")
97+
new_userdata = user_data.gsub("/opt/bin/flanneld --ip-masq=true", "/opt/bin/flanneld --iface=eth1 --ip-masq=true")
9898
File.open(CLOUD_CONFIG_PATH, "w") {|file| file.puts new_userdata }
9999
else
100100
raise Vagrant::Errors::VagrantError.new, "Run 'make discovery-url' first to create user-data."

contrib/coreos/user-data.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ coreos:
9292
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
9393
--env-file=/run/flannel/options.env \
9494
--volume=/usr/share/ca-certificates:/etc/ssl/certs:ro \
95-
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --iface=eth0 --ip-masq=true
95+
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true
9696

9797
# Update docker options
9898
ExecStartPost=/usr/bin/docker run --net=host --rm -v /run:/run \

0 commit comments

Comments
 (0)