Uploaded image for project: 'openATTIC'
  1. openATTIC
  2. OP-2004

Vagrant provisioning fails due to custom routing settings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.18
    • Fix Version/s: 2.0.19
    • Component/s: None
    • Labels:

      Description

      Running Vagrant provisioning (development branch) fails because you have added custom routing rule to remove default gateway and add a new one on secondary ethernet interface:

          config.vm.provision "shell",
              run: "always",
              inline: "ip route flush 0/0"
          config.vm.provision "shell",
              run: "always",
              inline: "route add default gw #{distro_settings[distro][:gateway]}"

      This makes impossible for the guest machine to download and install system packages, and provisioning fails, making development environment more difficult to install.

      In order to enable internet access for the secondary interface I was forced to enable ip forwarding and enabling NAT on secondary network interface subnet:

      echo 1 > /proc/sys/net/ipv4/ip_forward
      iptables -t nat -A POSTROUTING -s 192.168.10.0/24 \! -d 192.168.10.0/24 -j MASQUERADE

      Tested on:

      Host: Ubuntu 16.04.2 LTS
      Virtualbox: 5.1.6
      Vagrant: 1.9.2
      Guest: Malachite

        Attachments

          Activity

            People

            Assignee:
            vtheile Theile, Volker
            Reporter:
            mscam Massimo Scamarcia
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: