From a0240e4e6ad9916641256e88eabf1d1e3e5c83a0 Mon Sep 17 00:00:00 2001 From: tiswanso Date: Tue, 22 Sep 2015 16:57:20 -0400 Subject: Remove nameserver lookup dependency from Cisco ML2 CollectMacConfig. The collection of hostname to MAC mappings done in AllNodesPostDeploy uses 'hostname -f' to get the FQDN for each node. This form of the command causes a nameserver lookup for the domain name. A timing issue has been seen where the hostname lookup fails due to the nameserver not having the mapping yet. The solution is to hardcode the domain to 'localdomain' as is done in a few other patches--ie. see controller-puppet.yaml. Change-Id: Ibea50fcc6b9f22ca163ff063e0dc9ca69dff5f34 --- .../extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'puppet/extraconfig/all_nodes') diff --git a/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml index 277b0747..d08a1692 100644 --- a/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml +++ b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml @@ -163,8 +163,17 @@ resources: config: | #!/bin/sh MACS=$(ifconfig | grep ether | awk '{print $2}' | tr "\n" " ") - HOSTNAME=$(hostname -f) - echo "$HOSTNAME $MACS" + HOST_FQDN=$(hostname -f) + if [ -z "$HOST_FQDN" ]; then + HOSTNAME=$(hostname -s) + # hardcoding the domain name to avoid DNS lookup dependency + # same type of hardcoding appears elsewhere + # --ie. controller-puppet.yaml + # FIXME_HOSTNAME_DOMAIN_HARDCODE + echo "$HOSTNAME.localdomain $MACS" + else + echo "$HOST_FQDN $MACS" + fi CollectMacDeploymentsController: type: OS::Heat::SoftwareDeployments -- cgit 1.2.3-korg