Skip to content

Commit

Permalink
Merge pull request deis#4218 from kmala/flannel
Browse files Browse the repository at this point in the history
fix(flannel): use default iface for starting flannel except vagrant
  • Loading branch information
carmstrong committed Aug 6, 2015
2 parents 6365a24 + 3769ee2 commit 1f2264c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Vagrant.configure("2") do |config|
# Vagrant binds the VMs IP in VirtualBox's bridge network to the eth1 interface instead of eth0.
# This necessitates the substitution below, which is not required anywhere except in Vagrant.
user_data = File.read(CLOUD_CONFIG_PATH)
new_userdata = user_data.gsub("--iface=eth0", "--iface=eth1")
new_userdata = user_data.gsub("/opt/bin/flanneld --ip-masq=true", "/opt/bin/flanneld --iface=eth1 --ip-masq=true")
File.open(CLOUD_CONFIG_PATH, "w") {|file| file.puts new_userdata }
else
raise Vagrant::Errors::VagrantError.new, "Run 'make discovery-url' first to create user-data."
Expand Down
2 changes: 1 addition & 1 deletion contrib/coreos/user-data.example
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ coreos:
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
--env-file=/run/flannel/options.env \
--volume=/usr/share/ca-certificates:/etc/ssl/certs:ro \
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --iface=eth0 --ip-masq=true
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true

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

0 comments on commit 1f2264c

Please sign in to comment.