Move static definition of forwarding.conf later in script
While the original implementation may have been to save the nameservers given by the provider, we now just use a static nameserver. As such we can define the contents of forwarding.conf later and help avoid any potential race conditions, such as that in bug 1373505. Change-Id: I921cca03a6915f1e7b471d1bf90b82abcb1a0606 related-bug: 1373505
This commit is contained in:
parent
0b4568c7c3
commit
e4237ccc79
@ -23,13 +23,6 @@ PYTHON3=${4:-false}
|
|||||||
PYPY=${5:-false}
|
PYPY=${5:-false}
|
||||||
ALL_MYSQL_PRIVS=${6:-false}
|
ALL_MYSQL_PRIVS=${6:-false}
|
||||||
|
|
||||||
# Save the nameservers configured by our provider.
|
|
||||||
cat >/tmp/forwarding.conf <<EOF
|
|
||||||
forward-zone:
|
|
||||||
name: "."
|
|
||||||
forward-addr: 8.8.8.8
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sudo hostname $HOSTNAME
|
sudo hostname $HOSTNAME
|
||||||
# Fedora image doesn't come with wget
|
# Fedora image doesn't come with wget
|
||||||
if [ -f /usr/bin/yum ]; then
|
if [ -f /usr/bin/yum ]; then
|
||||||
@ -48,9 +41,12 @@ else
|
|||||||
-e "class {'openstack_project::single_use_slave': install_users => false, sudo => $SUDO, bare => $BARE, python3 => $PYTHON3, include_pypy => $PYPY, all_mysql_privs => $ALL_MYSQL_PRIVS, ssh_key => '$NODEPOOL_SSH_KEY', }"
|
-e "class {'openstack_project::single_use_slave': install_users => false, sudo => $SUDO, bare => $BARE, python3 => $PYTHON3, include_pypy => $PYPY, all_mysql_privs => $ALL_MYSQL_PRIVS, ssh_key => '$NODEPOOL_SSH_KEY', }"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The puppet modules should install unbound. Take the nameservers
|
# The puppet modules should install unbound. Set up some nameservers.
|
||||||
# that we ended up with at boot and configure unbound to forward to
|
cat >/tmp/forwarding.conf <<EOF
|
||||||
# them.
|
forward-zone:
|
||||||
|
name: "."
|
||||||
|
forward-addr: 8.8.8.8
|
||||||
|
EOF
|
||||||
sudo mv /tmp/forwarding.conf /etc/unbound/
|
sudo mv /tmp/forwarding.conf /etc/unbound/
|
||||||
sudo chown root:root /etc/unbound/forwarding.conf
|
sudo chown root:root /etc/unbound/forwarding.conf
|
||||||
sudo chmod a+r /etc/unbound/forwarding.conf
|
sudo chmod a+r /etc/unbound/forwarding.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user