Skip to content

autopkgtest failure of networkd-test.py: ERROR: test_resolved_domain_restricted_dns (__main__.DnsmasqClientTest.test_resolved_domain_restricted_dns) #31528

Closed

Description

@mbiebl

Version: git master

Running autopkgtest for networkd-test.py in Debian sid yields the following failure:

======================================================================
ERROR: test_resolved_domain_restricted_dns (__main__.DnsmasqClientTest.test_resolved_domain_restricted_dns)
resolved: domain-restricted DNS servers
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.TESDOU/tree/test/networkd-test.py", line 703, in test_resolved_domain_restricted_dns
    out = subprocess.check_output(['resolvectl', 'query', '-4', 'math.lab'])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['resolvectl', 'query', '-4', 'math.lab']' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 35 tests in 144.719s

FAILED (errors=1, skipped=2)
autopkgtest [15:20:12]: test networkd-test.py: -----------------------]
autopkgtest [15:20:12]: test networkd-test.py:  - - - - - - - - - - results - - - - - - - - - -

Full test log attached.
log.txt

Activity

  1. mbiebl commented on Feb 28, 2024

    @mbiebl
    ContributorAuthor

    Not sure if it's a duplicate of #10487, since I haven't seen this issue for a while.

  2. mbiebl commented on Feb 28, 2024

    @mbiebl
    ContributorAuthor

    do we have anyone who understands the interactions between networkd/resolved/DNSSEC etc.
    @rpigott , @LiveFreeAndRoam maybe?

  3. rpigott commented on Feb 28, 2024

    @rpigott
    Contributor

    Pretty sure there is no interesting DNS interaction here.

     95s Feb 28 14:13:42 host systemd-resolved[7303]: Firing regular transaction 64159 for <math.lab IN A> scope dns on testvpnclient/* (validate=yes).
     95s Feb 28 14:13:42 host systemd-resolved[7303]: Using feature level UDP+EDNS0+DO for transaction 64159.
     95s Feb 28 14:13:42 host systemd-resolved[7303]: Using DNS server 10.241.3.1 for transaction 64159.
    [....]
     95s Feb 28 14:13:45 host systemd-resolved[7303]: Regular transaction 64159 for <math.lab IN A> on scope dns on testvpnclient/* now complete with <EHOSTUNREACH> from none (unsigned; non-confidential).
     95s Feb 28 14:13:45 host systemd-resolved[7303]: Sent message type=error sender=n/a destination=:1.60 path=n/a interface=n/a member=n/a cookie=9 reply_cookie=2 signature=s error-name=System.Error.EHOSTUNREACH error-message=Lookup failed due to system error: No route to host
    

    Sure seems like a prefix route should be present but /shrug. Wonder if it could have to do with:

    /* Let's temporarily bind the socket to the specified ifindex. The kernel currently takes
    * only the SO_BINDTODEVICE/SO_BINDTOINDEX ifindex into account when making routing decisions
    * in connect() — and not IP_UNICAST_IF. We don't really want any of the other semantics of
    * SO_BINDTODEVICE/SO_BINDTOINDEX, hence we immediately unbind the socket after the fact
    * again.
    *
    * As a special exception we don't do this if we notice that the specified IP address is on
    * the local host. SO_BINDTODEVICE in combination with destination addresses on the local
    * host result in EHOSTUNREACH, since Linux won't send the packets out of the specified
    * interface, but delivers them directly to the local socket. */
    if (s->link &&
    !manager_find_link_address(s->manager, sa.sa.sa_family, sockaddr_in_addr(&sa.sa)) &&
    in_addr_is_localhost(sa.sa.sa_family, sockaddr_in_addr(&sa.sa)) == 0) {
    r = socket_bind_to_ifindex(fd, ifindex);
    if (r < 0)
    return r;
    bound = true;
    }

    P.S. This kernel issue has since been resolved: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0e4d354762cefd3e16b4cff8988ff276e45effc4

  4. rpigott commented on Feb 29, 2024

    @rpigott
    Contributor

    @mbiebl If you remove the SO_BINDTODEVICE workaround, does it work?

  5. bluca commented on Feb 29, 2024

    @bluca
    Member

    Trying that here #31553

  6. mbiebl commented on Mar 1, 2024

    @mbiebl
    ContributorAuthor

    Not sure if it's a duplicate of #10487, since I haven't seen this issue for a while.

    actually, I haven't seen this for a while because I disabled that test in Debian /o\

    https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/patches/debian/Skip-flaky-test_resolved_domain_restricted_dns-in-network.patch?ref_type=heads

  7. bluca commented on Mar 1, 2024

    @bluca
    Member

    Trying that here #31553

    still fails unfortunately
    networkd-test.py-stdout.gz

  8. rpigott commented on Mar 1, 2024

    @rpigott
    Contributor

    It occurs to me that if the issue of IP_UNICAST_IF not being accounted for in connect was fixed, perhaps this was resolved "the wrong way" for us and IP_UNICAST_IF alone is now sufficient to cause EHOSTUNREACH and skipping SO_BINDTODEVICE for local addresses alone is no longer enough.

  9. rpigott commented on Mar 1, 2024

    @rpigott
    Contributor

    idk how to get the logs for this test...

  10. bluca commented on Mar 1, 2024

    @bluca
    Member

    the failing job has to be triggered manually, given it doesn't work it's not enabled yet, I've done so now for that PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions