Make PTR records check optional for IPA installation

PTR records are not mandratory for IPA, result fo checks should be only
warning not hard error.

https://fedorahosted.org/freeipa/ticket/5686

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
This commit is contained in:
Martin Basti
2016-02-24 14:33:34 +01:00
committed by Tomas Babej
parent f714cb4692
commit bd725f4ba4

View File

@@ -206,15 +206,16 @@ def verify_fqdn(host_name, no_host_dns=False, local_hostname=True):
revname = socket.gethostbyaddr(address)[0]
except Exception as e:
root_logger.debug('Check failed: %s', e)
raise HostReverseLookupError(
root_logger.error(
"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 value %s obtained "
"by reverse lookup on IP address %s"
% (host_name, revname, address))
"check /etc/hosts and DNS name resolution", address)
else:
root_logger.debug('Found reverse name: %s', revname)
if revname != host_name:
root_logger.error(
"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)