summaryrefslogtreecommitdiffstats
path: root/puppet/extraconfig
diff options
context:
space:
mode:
authortiswanso <tiswanso@cisco.com>2015-09-22 16:57:20 -0400
committertiswanso <tiswanso@cisco.com>2015-09-22 22:51:05 -0400
commita0240e4e6ad9916641256e88eabf1d1e3e5c83a0 (patch)
treeb9988a5c422935d5bbc1604bee3620341af93015 /puppet/extraconfig
parent8e7a13ebe898a9f6a94bf77d095a681ec744e719 (diff)
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
Diffstat (limited to 'puppet/extraconfig')
-rw-r--r--puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml13
1 files changed, 11 insertions, 2 deletions
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