mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.97k stars 1.44k forks source link

Vagrant not work #1667

Open EliterScripts opened 4 years ago

EliterScripts commented 4 years ago

I apologize if I am duplicating this post ( https://discourse.mailinabox.email/t/setting-up-vagrant-development-setup/5618/5 ), but I was having issues getting Vagrant/VirtualBox to work on my Ubuntu LTS 16.04 desktop.

So it appears that the ifupdown Ubuntu package previously came with Ubuntu 14.04, and is no longer included in the Ubuntu 18.04 LTS system by default (see https://github.com/cilium/cilium/issues/1918 ). This is the error:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

ifdown -a; ifup -a; ifup -a --allow=hotplug

Stdout from the command:

Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device
bash: line 2: ifdown: command not found
bash: line 2: ifup: command not found
bash: line 2: ifup: command not found

After I get into the system using vagrant ssh and doing sudo apt-get install ifupdown, shutting down the machine and doing vagrant up --provision, it gives me another error:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifdown eth1 2> /dev/null

Stdout from the command:

Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device

So it appears this is also a problem, due to the fact that Ubuntu switched to systemd, because of “Predictable Network Interface naming”, since Ubuntu 15.04 (see: https://askubuntu.com/questions/704361/why-is-my-network-interface-named-enp0s25-instead-of-eth0 and http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ ).

Is there any way to fix this, so I can smooth the process of developing and testing Mail-in-a-Box?

JoshData commented 4 years ago

I don't think this issue has anything specific to do with Mail-in-a-Box. It sounds like the Vagrant on 16.04 may be too old to run an 18.04 image?

EliterScripts commented 4 years ago

Is there any chance there is a workaround?

droidforce commented 4 years ago

This is fixed in the latest Vagrant (currently 2.2.7)