Always forward to 8.8.8.8 on test nodes

Our providers have unreliable DNS in different ways.  Instead of
special casing all of them, just always forward queries to 8.8.8.8
until we have our own neutron-local recursive resolvers.

Closes-Bug: 1286963
Change-Id: I5eca2e2db75b38f829ba458bb8c3789646f562c2
This commit is contained in:
James E. Blair 2014-03-31 13:04:30 -07:00
parent 3a7afd773d
commit 0e9ddc78ab

View File

@ -24,15 +24,11 @@ PYPY=${5:-false}
ALL_MYSQL_PRIVS=${6:-false} ALL_MYSQL_PRIVS=${6:-false}
# Save the nameservers configured by our provider. # Save the nameservers configured by our provider.
echo 'forward-zone:' > /tmp/forwarding.conf cat >/tmp/forwarding.conf <<EOF
echo ' name: "."' >> /tmp/forwarding.conf forward-zone:
# HPCloud nameservers (which have 10. addresses) strip RRSIG records. name: "."
# Until this is resolved, use google instead. forward-addr: 8.8.8.8
if grep "^nameserver \(10\|206\)\." /etc/resolv.conf; then EOF
echo " forward-addr: 8.8.8.8">> /tmp/forwarding.conf
else
grep "^nameserver" /etc/resolv.conf|sed 's/nameserver \(.*\)/ forward-addr: \1/' >> /tmp/forwarding.conf
fi
sudo hostname $HOSTNAME sudo hostname $HOSTNAME
# Fedora image doesn't come with wget # Fedora image doesn't come with wget