Skip to content

Commit 1f2264c

Browse files
committed
Merge pull request #4218 from kmala/flannel
fix(flannel): use default iface for starting flannel except vagrant
2 parents 6365a24 + 3769ee2 commit 1f2264c

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
@@ -93,7 +93,7 @@ coreos:
9393
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
9494
--env-file=/run/flannel/options.env \
9595
--volume=/usr/share/ca-certificates:/etc/ssl/certs:ro \
96-
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --iface=eth0 --ip-masq=true
96+
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true
9797

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

0 commit comments

Comments
 (0)