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}
# Save the nameservers configured by our provider.
echo 'forward-zone:' > /tmp/forwarding.conf
echo ' name: "."' >> /tmp/forwarding.conf
# HPCloud nameservers (which have 10. addresses) strip RRSIG records.
# Until this is resolved, use google instead.
if grep "^nameserver \(10\|206\)\." /etc/resolv.conf; then
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
cat >/tmp/forwarding.conf <<EOF
forward-zone:
name: "."
forward-addr: 8.8.8.8
EOF
sudo hostname $HOSTNAME
# Fedora image doesn't come with wget