#8383 Test with dnspython 2.0
Closed: fixed by abbra. Opened by cheimes.

Request for enhancement

Fedora is going to update dnspythn to 2.0 in the foreseeable future. dnspython 2.0 deprecates some features and introduces new feature. We should test with Lumir's COPR and verify that the new version does not break FreeIPA.

https://bugzilla.redhat.com/show_bug.cgi?id=1737930
https://dnspython.readthedocs.io/en/latest/whatsnew.html
https://copr.fedorainfracloud.org/coprs/lbalhar/dns/


test_xmlrpc/test_host_plugin.py::TestHostNoNameserversForRevZone::test_create_host_with_ip fails due to:

 ipa: DEBUG: host_add('testhost4.ipa.test', description='Test host <testhost4>', l='Undisclosed location <testhost4>', random=False, force=True, no_reverse=False, ip_address='172.16.30.22', all=False, raw=False, version='2.239', no_members=False)
 ipa: DEBUG: raw: dnszone_show(<DNS name ipa.test.>, version='2.239')
 ipa: DEBUG: dnszone_show(<DNS name ipa.test.>, rights=False, all=False, raw=False, version='2.239')
 ipa: DEBUG: raw: dnsrecord_find(<DNS name ipa.test.>, None, arecord='172.16.30.22', version='2.239')
 ipa: DEBUG: dnsrecord_find(<DNS name ipa.test.>, None, arecord=('172.16.30.22',), structured=False, all=False, raw=False, version='2.239', pkey_only=False)
 ipa: ERROR: non-public: Timeout: The DNS operation timed out after 5.00179123878479 seconds
 Traceback (most recent call last):
   File "/usr/lib/python3.9/site-packages/ipaserver/rpcserver.py", line 395, in wsgi_execute
     result = command(*args, **options)
   File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 471, in __call__
     return self.__do_call(*args, **options)
   File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 499, in __do_call
     ret = self.run(*args, **options)
   File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 821, in run
     return self.execute(*args, **options)
   File "/usr/lib/python3.9/site-packages/ipaserver/plugins/baseldap.py", line 1201, in execute
     entry_attrs.dn = callback(
   File "/usr/lib/python3.9/site-packages/ipaserver/plugins/host.py", line 691, in pre_callback
     add_records_for_host_validation('ip_address',
   File "/usr/lib/python3.9/site-packages/ipaserver/plugins/dns.py", line 596, in add_records_for_host_validation
     revzone, revname = get_reverse_zone(ip)
   File "/usr/lib/python3.9/site-packages/ipaserver/plugins/dns.py", line 545, in get_reverse_zone
     revzone = DNSName(dns.resolver.zone_for_name(revdns))
   File "/usr/lib/python3.9/site-packages/dns/resolver.py", line 1263, in zone_for_name
     answer = resolver.resolve(name, dns.rdatatype.SOA, rdclass, tcp)
   File "/usr/lib/python3.9/site-packages/dns/resolver.py", line 1043, in resolve
     timeout = self._compute_timeout(start, lifetime)
   File "/usr/lib/python3.9/site-packages/dns/resolver.py", line 950, in _compute_timeout
     raise Timeout(timeout=duration)
 dns.exception.Timeout: The DNS operation timed out after 5.00179123878479 seconds
 admin@IPA.TEST: host_add/1('testhost4.ipa.test', description='Test host <testhost4>', l='Undisclosed location <testhost4>', force=True, ip_address='172.16.30.22', version='2.239'): InternalError

Metadata Update from @slev:
- Issue set to the milestone: None (was: FreeIPA 4.8.8)

It seems use_search_by_default should be set to True.

Looking at this.

https://github.com/freeipa/freeipa/pull/5047

master:

  • 0d326a9097c6fe5f1eb6d30340aedbe9200c3d37 Azure: Add Rawhide definitions
  • 60ff2841cd74706a5ebd40924f11ad3defaa1750 Azure: Drop dependency on UsePythonVersion task
  • a5b23287aeddd32b129d4c97e6354900c8b931ec Azure: base: Collect both install and uninstall logs
  • a102cfe5faf28b801d2ad3570477ef9dd5c0d5f1 nss: Raise exception earlier on unsupported DB type
  • f3d10871300498150c41f3acc154688f1ee48ceb deps: Require nss-tools for make's fasttest target
  • 30cf59d0ae39e83f3590152aec19e466dbc3623a Azure: Increase verbosity for Tox task
  • fdb227e55ab976fb26ef417df1e4a842d3280f5c tox: Don't expand symlinks
  • 49e643783d22ded7a44d84599020af4e8a3d4d5a dnspython: Add compatibility shim

ipa-4-8:

  • 5d13ef9bfe52442af7d8d39113a8b0a01f5f0bff Azure: Add Rawhide definitions
  • ae219dffbcb71f6ab12b4e4831a1c02e4279f0b8 Azure: Drop dependency on UsePythonVersion task
  • 0ff6b6ee55bfb633b1aee7948c885dfa3f711168 Azure: base: Collect both install and uninstall logs
  • 0a8997ff0be5b3ce67172da9b123a461be83f1e6 nss: Raise exception earlier on unsupported DB type
  • ee661dc7223bf107d30dda39184c402964f2982f deps: Require nss-tools for make's fasttest target
  • 428373f127f69b4fee45b356c765e7a227c8788b Azure: Increase verbosity for Tox task
  • 76502144dd71c957954ac44002d034e691713cb3 tox: Don't expand symlinks
  • ae8b723c1e0f5d66b0fa5e618b7274d872e918d3 dnspython: Add compatibility shim

Metadata Update from @abbra:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata