Comment 1 for bug 2064916

Revision history for this message
Michael Johnson (johnsom) wrote :

I can see that dnspython has a class BaseResolver that has an init that attempts to read the resolv.conf.

https://github.com/rthalley/dnspython/blob/main/dns/resolver.py#L944

This the stack trace from the Debian bug:
======================================================================
FAIL: designate.tests.unit.mdns.test_handler.MdnsHandleTest.test_notify
designate.tests.unit.mdns.test_handler.MdnsHandleTest.test_notify
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/usr/lib/python3.12/unittest/mock.py", line 1390, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/designate/tests/unit/mdns/test_handler.py", line 79, in test_notify
    self.assertEqual(dns.rcode.NOERROR, tuple(response)[0].rcode())
                                        ^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/designate/mdns/handler.py", line 142, in _handle_notify
    resolver = dns.resolver.Resolver()
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/dns/resolver.py", line 944, in __init__
    self.read_resolv_conf(filename)
  File "/usr/lib/python3/dist-packages/dns/resolver.py", line 1038, in read_resolv_conf
    raise NoResolverConfiguration("no nameservers")
dns.resolver.NoResolverConfiguration: no nameservers