dns: Handle SERVFAIL in check if domain already exists.

In cases where domain is already delegated to IPA prior installation
we might get timeout or SERVFAIL. The answer depends on the recursive
server we are using for the check.

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Petr Spacek
2015-12-16 13:37:39 +01:00
committed by Petr Vobornik
parent c265e8736e
commit 58331208a5
3 changed files with 10 additions and 9 deletions

View File

@@ -126,10 +126,12 @@ def install_check(standalone, replica, options, hostname):
domain = dnsutil.DNSName(util.normalize_zone(api.env.domain))
print("Checking DNS domain %s, please wait ..." % domain)
try:
ipautil.check_zone_overlap(domain, raise_on_timeout=False)
ipautil.check_zone_overlap(domain, raise_on_error=False)
except ValueError as e:
if options.force or options.allow_zone_overlap:
root_logger.warning(e.message)
root_logger.warning("%s Please make sure that the domain is "
"properly delegated to this IPA server.",
e.message)
else:
raise e