Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Vagrantfile: add a configuration patch to fix slow networking on some…
Browse files Browse the repository at this point in the history
… hosts.

See also hashicorp/vagrant#1172 and https://gist.github.com/simono/73e37d8c3a45664c7045 for a description of the problem and the origins of this fix.

Signed-off-by: Eric Myhre <eric@flynn.io>
  • Loading branch information
warpfork committed Dec 13, 2014
1 parent 732ff86 commit b18e2a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
v.cpus = ENV["VAGRANT_CPUS"] || 2
end

# Address issues some hosts experience with networking (specifically, DNS latency) inside the development environment VM.
# See also mitchellh/vagrant#1172 for a description of the problem.
config.vm.provision :shell, inline: <<SCRIPT
if [ ! $(grep single-request-reopen /etc/resolvconf/resolv.conf.d/base) ]; then echo "options single-request-reopen" >> /etc/resolvconf/resolv.conf.d/base && resolvconf -u; fi
SCRIPT

config.vm.provision "shell", privileged: false, inline: <<SCRIPT
grep '^export GOPATH' ~/.bashrc || echo export GOPATH=~/go >> ~/.bashrc
grep '^export PATH' ~/.bashrc || echo export PATH=\\\$PATH:~/go/bin:/vagrant/script >> ~/.bashrc
Expand Down

0 comments on commit b18e2a4

Please sign in to comment.