From 327a9686589fa70de9e2dc301686ebf2611c8325 Mon Sep 17 00:00:00 2001 From: vponomaryov Date: Tue, 19 Jan 2016 17:45:35 +0200 Subject: [PATCH] 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 --- .../post-install.d/50-update-hosts-config | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 elements/manila-ubuntu-core/post-install.d/50-update-hosts-config diff --git a/elements/manila-ubuntu-core/post-install.d/50-update-hosts-config b/elements/manila-ubuntu-core/post-install.d/50-update-hosts-config new file mode 100755 index 0000000..a5dc7eb --- /dev/null +++ b/elements/manila-ubuntu-core/post-install.d/50-update-hosts-config @@ -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