omega8cc / boa

Barracuda Octopus Aegir 5.4.0
https://omega8.cc/compare
394 stars 75 forks source link

Prevent invalid DNS error during installation #480

Closed ar-jan closed 9 years ago

ar-jan commented 9 years ago

I've noticed that on DigitalOcean, you must remove the default 127.0.1.1 entry from /etc/hosts, or you will get an invalid DNS error during install. I suppose BOA can strip this entry if present?

omega8cc commented 9 years ago

This must be something new? We never experienced failed DNS while testing BOA on DO. What 127.0.1.1 is doing there anyway, and why it causes DNS error? Steps to reproduce?

ar-jan commented 9 years ago

This came up here, though it's not directly related to that thread.

Steps to reproduce: Create a droplet with hostname like boa.example.com with Debian 7 64-bit in region AMS3 (and IPv6 enabled, probably doesn't matter). Make sure DNS entries are pointing to the correct IP. The new droplet's /etc/hosts contains both 127.0.0.1 and 127.0.1.1 entries:

root@boa:~# cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   boa.example.com boa

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

If I don't touch /etc/hosts, and run the standard installation as follows, I run into invalid DNS error: cd;wget -q -U iCab http://files.aegir.cc/BOA.sh.txt;bash BOA.sh.txt boa in-stable public boa.example.com me@example.com o1 mini

If I remove the 127.0.1.1 entry BOA installs as expected.

ar-jan commented 9 years ago

So following what MacMladen quoted in the other thread, maybe there reason is I don't have a permanent IP address on DO and you somehow do?

omega8cc commented 9 years ago

No, all VM instanced there have static IP. Not sure why they are adding 127.0.1.1, but are you saying that you have got this line added there automatically? This looks like some new behavior, I believe.

ar-jan commented 9 years ago

Yes, I consistently get a machine with a 127.0.1.1 entry in /etc/hosts on DO. I noticed it some months ago (and confirmed it's still happening). Thanks for the fix.