Add debug logging when ip_to_host fails

This commit is contained in:
Erik Johnson 2018-04-19 14:40:19 -05:00
parent 45696e622b
commit 95a6f075cb
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -218,7 +218,8 @@ def ip_to_host(ip):
'''
try:
hostname, aliaslist, ipaddrlist = socket.gethostbyaddr(ip)
except Exception:
except Exception as exc:
log.debug('salt.utils.network.ip_to_host(%r) failed: %s', ip, exc)
hostname = None
return hostname