Bug 2161957 - [NMCI] ipv6_dns_ignore-auto-dns_with_manually_set_dns test failure
Summary: [NMCI] ipv6_dns_ignore-auto-dns_with_manually_set_dns test failure
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Beniamino Galvani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-18 12:49 UTC by Vladimir Benes
Modified: 2023-02-07 15:13 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
test log (356.54 KB, text/html)
2023-01-18 12:49 UTC, Vladimir Benes
no flags Details


Links
System ID Private Priority Status Summary Last Updated
freedesktop.org Gitlab NetworkManager NetworkManager merge_requests 1506 0 None merged dns: consider the dns-type and the priority when hashing DNS configs 2023-02-01 08:05:30 UTC

Description Vladimir Benes 2023-01-18 12:49:02 UTC
Created attachment 1938862 [details]
test log

Description of problem:
we see manual ipv6 dns missing in the test
as Beniamino pointed out:
we set them as follows:
 <trace> [1674039359.6494] dns-sd-resolved[e6e2b354a840f92b]: send-updates: SetLinkDNS ( (22, [(10, [0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]), (10, [0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01])]) )
and remove them later on:
<trace> [1674039359.6828] dns-sd-resolved[e6e2b354a840f92b]: send-updates: SetLinkDNS ( (22, [(2, [0x0a, 0x10, 0x01, 0x01])]) )


Version-Release number of selected component (if applicable):
NetworkManager-1.41.8-1.fc38.x86_64

How reproducible:
always

Steps to Reproduce:
1. git clone https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci
2. cd NetworkManager-ci
3. ./test_run.sh ipv6_dns_ignore-auto-dns_with_manually_set_dns test

!! WATCH OUT THIS CAN BREAK YOUR INSTALLATION. DO IT IN A DEDICATED VM ONLY!!

Actual results:
no ipv6 DNS

Expected results:
ipv6 DNS

Additional info:

Comment 1 Vladimir Benes 2023-01-18 12:49:41 UTC
present in older NM and fedoras (37 and 36)

Comment 2 Beniamino Galvani 2023-01-18 15:46:21 UTC
This failure is present (at least) since NM 1.32. 

The cause is that after IPv4 gets the default route, there are 2 configurations in the DNS manager:

  dns-mgr: config:      100 best    v4 22    : 10.16.1.1
  dns-mgr: config:      100 default v6 22    : 4000::1 5000::1

Since the v6 configuration doesn't have the default route and doesn't have a domain, it's discarded by the sd-resolved NM backend [1].

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.41.8-dev/src/core/dns/nm-dns-systemd-resolved.c#L389

After IPv6 gets the default route, the DNS manager should update systemd-resolved, but it determines that nothing changed because it only compares the configurations without the type (best, default) [2], and so the update is skipped.

[2] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.41.8-dev/src/core/dns/nm-dns-manager.c#L1211

Comment 3 Ben Cotton 2023-02-07 15:13:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.


Note You need to log in before you can comment on or make changes to this bug.