From bd89e49ed771ff8677cf0e8aa4b0d40eaa0c39b6 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Apr 24 2013 13:28:57 +0000 Subject: 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 --- diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index 600acfe..bc28dec 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -128,6 +128,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