summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2013-04-22 14:17:03 -0400
committerMartin Kosek <mkosek@redhat.com>2013-04-24 15:29:06 +0200
commit29b22d5f8b4d62127e644b51ea2d67aeb8c30f10 (patch)
tree4bbcad92811b3a7586caef026c577f336371e263
parent6e443eb0d1673d6ffe2c3cd638108d5769916d29 (diff)
downloadfreeipa.git-29b22d5f8b4d62127e644b51ea2d67aeb8c30f10.tar.gz
freeipa.git-29b22d5f8b4d62127e644b51ea2d67aeb8c30f10.tar.xz
freeipa.git-29b22d5f8b4d62127e644b51ea2d67aeb8c30f10.zip
Handle socket.gethostbyaddr() exceptions when verifying hostnames.
Log any socket exceptions raised and let the process continue. This failure isn't a show-stopper. Other checks past this will catch any other problems. This was seen when /etc/hosts and /etc/resolv.conf were both empty. https://fedorahosted.org/freeipa/ticket/3581
-rw-r--r--ipaserver/install/installutils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 3368533d..f5fbaff5 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -132,6 +132,8 @@ def verify_fqdn(host_name, no_host_dns=False, local_hostname=True):
"Please check /etc/hosts or DNS name resolution" % (host_name, ex_name[0]))
except socket.gaierror:
pass
+ except socket.error, e:
+ root_logger.debug('socket.gethostbyaddr() error: %d: %s' % (e.errno, e.strerror))
if no_host_dns:
print "Warning: skipping DNS resolution of host", host_name