From 116bcbb250481127de6ff1e60f7ba9140cd130fc Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Mon, 21 Mar 2022 14:51:08 +0100 Subject: [PATCH 1/2] vagrant: Enable IPv6 and IP forwarding By default, the most of Vagrant boxes are explicitly disabling IPv6 through sysctl. This change makes sure that IPv6, and also IP forwarding for all families, are enabled. This change is necessary for using dual-stack in Vagrant environment. Signed-off-by: Michal Rostecki --- scripts/provision/vagrant | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/provision/vagrant b/scripts/provision/vagrant index 663d9d6e18..b637d475eb 100755 --- a/scripts/provision/vagrant +++ b/scripts/provision/vagrant @@ -68,6 +68,19 @@ cat <<\EOF >/etc/motd EOF +# --- Enable IPv6 and IP forwarding +sysctl -w net.ipv4.ip_forward=1 +sysctl -w net.ipv6.conf.all.disable_ipv6=0 +sysctl -w net.ipv6.conf.all.forwarding=1 +sed -i \ + -e "/^net.ipv6.conf.all.disable_ipv6 = 1/d" \ + /etc/sysctl.conf +cat <>/etc/sysctl.conf +net.ipv4.ip_forward = 1 +net.ipv6.conf.all.disable_ipv6 = 0 +net.ipv6.conf.all.forwarding = 1 +EOF + # --- Utility function to download go download_go() { goversion=$(grep "golang:" Dockerfile.dapper | sed -e 's/.*golang:\(.*\)-.*/\1/') From ef8d5d7030e8b52011e2cca6492ea13cbd4c80a0 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Mon, 21 Mar 2022 22:36:56 +0100 Subject: [PATCH 2/2] vagrant: Set mount options for NFS NFS is the default (and well tested) mount type for vagrant-libvirt. Howver, to make it work, it nneeds the vers=3,tcp options to be provided. Signed-off-by: Michal Rostecki --- Vagrantfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index a975a01bc1..9d5d70e601 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -40,7 +40,11 @@ Vagrant.configure("2") do |config| if Vagrant.has_plugin?("vagrant-timezone") config.timezone.value = :host end - config.vm.synced_folder HOME, HOME, type: MOUNT_TYPE + if "#{MOUNT_TYPE}" == "nfs" + config.vm.synced_folder HOME, HOME, type: "nfs", mount_options: ["vers=3,tcp"] + else + config.vm.synced_folder HOME, HOME, type: MOUNT_TYPE + end if NUM_NODES==0 provision(config.vm, 0)