summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-23 17:29:56 +0000
committerGerrit Code Review <review@openstack.org>2015-09-23 17:29:56 +0000
commit3512e826914664ce8cbc97d2fde7dd61d607ab23 (patch)
tree2b36bb57a9769fed474925ba75db94649973f136 /puppet
parent92fd515d2d544521b6c18e1ad63959c781c29672 (diff)
parenta0240e4e6ad9916641256e88eabf1d1e3e5c83a0 (diff)
Merge "Remove nameserver lookup dependency from Cisco ML2 CollectMacConfig."
Diffstat (limited to 'puppet')
-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