Update system hosts file to understand local domainnames

Currently Manila service image has no info about its local domainnames,
and recent Neutron feature [1] became incompatible with Manila because of it.
That led to b_u_g 1535692. Neutron started adding default DNS resolvers to
Nova VMs, and Manila was failing because of timeouts, since default resolvers
do not know this local machine domainnames. So, add static domainname info
to make new Neutron feature be able to work with Manila.

[1] I17a884f467d307432a06f67a9dd93ed2fa6081a3

Closes-Bug: #1535804
Change-Id: Icf7f189d621e9686c4bb449b5770b83e4bd072ee
This commit is contained in:
vponomaryov 2016-01-19 17:45:35 +02:00
parent 572cef52e2
commit 327a968658

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# Update 'hosts' file with dn-ip predefinitions
hosts_config="/etc/hosts"
echo "127.0.0.1 localhost localhost.localdomain" >> $hosts_config