From 34fc447c00189d53ccf44184cfd5ed48cde6bf86 Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Wed, 2 Apr 2014 11:04:07 +0200 Subject: Add wait_for_dns option to default.conf. This option makes record changes in DNS tree synchronous. IPA calls will wait until new data are visible over DNS protocol or until timeout. It is intended only for testing. It should prevent tests from failing if there is bigger delay between changes in LDAP and DNS. Reviewed-By: Petr Viktorin --- ipalib/errors.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ipalib/errors.py') diff --git a/ipalib/errors.py b/ipalib/errors.py index 716decb2b..311127f62 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -1512,6 +1512,24 @@ class DatabaseTimeout(DatabaseError): format = _('LDAP timeout') +class DNSDataMismatch(ExecutionError): + """ + **4212** Raised when an DNS query didn't return expected answer + in a configured time limit. + + For example: + + >>> raise DNSDataMismatch(expected="zone3.test. 86400 IN A 192.0.2.1", \ + got="zone3.test. 86400 IN A 192.168.1.1") + Traceback (most recent call last): + ... + DNSDataMismatch: DNS check failed: Expected {zone3.test. 86400 IN A 192.0.2.1} got {zone3.test. 86400 IN A 192.168.1.1} + """ + + errno = 4212 + format = _('DNS check failed: Expected {%(expected)s} got {%(got)s}') + + class CertificateError(ExecutionError): """ **4300** Base class for Certificate execution errors (*4300 - 4399*). -- cgit