Merge pull request #40310 from gtmanfred/2016.11

add warning when no host/dns record is found for fqdn_ip
This commit is contained in:
Nicole Thomas 2017-03-24 15:55:19 -06:00 committed by GitHub
commit 839b620f32

View file

@ -1688,6 +1688,8 @@ def ip_fqdn():
info = socket.getaddrinfo(_fqdn, None, socket_type)
ret[key] = list(set(item[4][0] for item in info))
except socket.error:
log.warning('Unable to find IPv{0} record for "{1}" causing a 10 second timeout when rendering grains. '
'Set the dns or /etc/hosts for IPv{0} to clear this.'.format(ipv_num, _fqdn))
ret[key] = []
return ret