On 7.5.2015 08:59, David Kupka wrote:
> On 05/06/2015 03:20 PM, Martin Basti wrote:
>> On 05/05/15 15:00, Martin Basti wrote:
>>> On 30/04/15 15:37, David Kupka wrote:
>>>> On 04/24/2015 02:56 PM, Martin Basti wrote:
>>>>> Patches attached.
>>>> Hi,
>>>> thanks for patches.
>>>> 1. You changed message in DNSServerNotRespondingWarning class but not
>>>> the test in ipatest/test_xmlrpc/test_dns_plugin.py
>>>> nitpick. Please spell 'edns' correctly. I've seen several instances
>>>> of 'ends'.
>>> Thank you,
>>> updated patches attached:
>>> * new error messages
>>> * logging to debug log server output if exception was raised
>>> * fixed test
>>> * fixed spelling
>> Fixed tests (again)
>> Updated patches attached
> The code looks good to me and tests are no longer broken. (I would prefer
> better fix of the tests but given that the priorities are different now it can
> wait.)
> Petr, can you please confirm that the patch set works for you?

Sorry, NACK:

$ ipa dnsforwardzone-add ptr.test. --forwarder=
Server will check DNS forwarder(s).
This may take some time, please wait ...
ipa: ERROR: an internal error has occurred

# /var/log/httpd/error_log
ipa: ERROR: non-public: AssertionError:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 350, in
    result = self.Command[name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 443, in
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 760, in run
    return self.execute(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/plugins/dns.py", line 4444, in
  File "/usr/lib/python2.7/site-packages/ipalib/plugins/dns.py", line 4405, in
  File "/usr/lib/python2.7/site-packages/ipalib/util.py", line 715, in
  File "/usr/lib/python2.7/site-packages/ipalib/util.py", line 610, in
    assert isinstance(nameserver_ip, basestring)
ipa: INFO: [jsonserver_session] admin@IPA.EXAMPLE: dnsforwardzone_add(<DNS
name ptr.test.>, idnsforwarders=(u'',), all=False, raw=False,
version=u'2.116'): AssertionError

This is constantly reproducible in my vm-090.abc. Let me know if you want to
take a look.

I'm attaching little response.patch which improves compatibility with older
python-dns packages. This patch allows IPA to work while error messages are
simply not as nice as they could be with latest python-dns :-)

check_fwd_msg.patch is a little nitpick, just to make sure everyone
understands the message.

BTW why some messages in check_forwarders() are printed using 'print' and
others using logger? I would prefer to use logger for everything to make sure
that logs contain all the information, including warnings.

Thank you for your time!

Petr^2 Spacek
--- a/ipalib/util.py	2015-05-07 11:33:28.679000000 +0200
+++ b/ipalib/util.py	2015-05-07 11:54:54.960000000 +0200
@@ -593,7 +593,7 @@
     assert isinstance(e, DNSException)
     if log is not None:
-        response = e.kwargs.get('response')
+        response = getattr(e, 'kwargs', {}).get('response')
         if response:
             log.debug("DNSException: %s; server response: %s", e, response)
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 725324c..77ff342 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -464,7 +464,7 @@ def check_reverse_zones(ip_addresses, reverse_zones, options, unattended, search
     return ret_reverse_zones
 def check_forwarders(dns_forwarders, logger):
-    print "Checking forwarders, please wait ..."
+    print "Checking DNS forwarders, please wait ..."
     forwarders_dnssec_valid = True
     for forwarder in dns_forwarders:
         logger.debug("Checking DNS server: %s", forwarder)
Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to