summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2015-06-18 12:56:09 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-06-18 15:01:31 +0200
commit3c95a5aea23b6deb9d9b91799d9fd29ab25a6d78 (patch)
treec8f068213a1f584d43c94fae116b34ee8e72658e /ipaserver
parentc3a3d789b5da353a6abf2722932df4f5fc05dbe5 (diff)
downloadfreeipa-3c95a5aea23b6deb9d9b91799d9fd29ab25a6d78.tar.gz
freeipa-3c95a5aea23b6deb9d9b91799d9fd29ab25a6d78.tar.xz
freeipa-3c95a5aea23b6deb9d9b91799d9fd29ab25a6d78.zip
Improve error messages about reverse address resolution in ipa-replica-prepare
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/installutils.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 5fb2bb29f..42df2b711 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -195,12 +195,18 @@ def verify_fqdn(host_name, no_host_dns=False, local_hostname=True):
revname = socket.gethostbyaddr(address)[0]
except Exception, e:
root_logger.debug('Check failed: %s', e)
- raise HostReverseLookupError("Unable to resolve the reverse ip address, check /etc/hosts or DNS name resolution")
+ raise HostReverseLookupError(
+ "Unable to resolve the IP address %s to a host name, "
+ "check /etc/hosts and DNS name resolution" % address)
root_logger.debug('Found reverse name: %s', revname)
if revname != host_name:
- raise HostReverseLookupError("The host name %s does not match the reverse lookup %s" % (host_name, revname))
+ raise HostReverseLookupError(
+ "The host name %s does not match the value %s obtained "
+ "by reverse lookup on IP address %s"
+ % (host_name, revname, address))
verified.add(address)
+
def record_in_hosts(ip, host_name=None, conf_file=paths.HOSTS):
"""
Search record in /etc/hosts - static table lookup for hostnames