dns-search rendered for ipv4 when no addresses configured

Bug #1786726 reported by Daniel Axtens on 2018-08-13
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan
Undecided
Unassigned
netplan.io (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[Impact]
Users configuring IPv6 static address with NetworkManager as a backend.

[Test cases]
1) Configure netplan for static addresses for IPv6, dns settings, but no IPv4 configuration:

    [...]
    ens8:
      accept-ra: false
      addresses: ['23:b0:87:58:65:f7:fb:8b/45', '63:94:73:e1:46:15:79:58/50']
      nameservers:
        addresses: ['f2:9d:bc:04:7b:87:ec:28']
        search: [lab, home]
      renderer: NetworkManager

2) Verify that no IPv4 configuration was added in NetworkManager:

  'nmcli'

3) Verify that warnings aren't in /var/log/syslog about invalid properties.

[Regression potential]
Possible regressions might include issues with setting DNS search domains or addresses for the nameservers. Any issues related to resolving addresses on such an IPv6 network, where the nameserver or search domains are incorrectly added.

---

In an IPv6 static setup with NetworkManager, such as the following:

    ens8:
      accept-ra: false
      addresses: ['23:b0:87:58:65:f7:fb:8b/45', '63:94:73:e1:46:15:79:58/50']
      nameservers:
        addresses: ['f2:9d:bc:04:7b:87:ec:28']
        search: [lab, home]
      renderer: NetworkManager

we see the following error in syslog:

NetworkManager[19666]: <warn> [1532665946.1502] keyfile: error loading connection from file /run/NetworkManager/system-connections/net
plan-ens8: invalid connection: ipv4.dns-search: this property is not allowed for 'method=link-local'

netplan renders an ipv4 dns search property, even though there is no configured ipv4 address. NetworkManager doesn't like this and it prevents the connection from being configured.

Daniel Axtens (daxtens) on 2018-09-18
Changed in netplan:
status: New → Fix Committed
Changed in netplan.io (Ubuntu):
status: New → Fix Released
Changed in netplan:
status: Fix Committed → Fix Released

netplan.io 0.40 in cosmic contains this fix.

description: updated

Hello Daniel, or anyone else affected,

Accepted netplan.io into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.40~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in netplan.io (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Łukasz Zemczak (sil2100) wrote :

Hello Daniel, or anyone else affected,

Accepted netplan.io into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.40.1~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Verification-done with netplan.io 0.40.1~18.04.1:

root@careful-tahr:/run/NetworkManager/system-connections# sudo apt install netplan.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python3-netifaces
The following NEW packages will be installed:
  python3-netifaces
The following packages will be upgraded:
  netplan.io
1 upgraded, 1 newly installed, 0 to remove and 37 not upgraded.
Need to get 76.6 kB of archives.
After this operation, 64.5 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-netifaces amd64 0.10.4-0.1build4 [12.8 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 netplan.io amd64 0.40.1~18.04.1 [63.8 kB]
Fetched 76.6 kB in 0s (164 kB/s)
Selecting previously unselected package python3-netifaces.
(Reading database ... 28984 files and directories currently installed.)
Preparing to unpack .../python3-netifaces_0.10.4-0.1build4_amd64.deb ...
Unpacking python3-netifaces (0.10.4-0.1build4) ...
Preparing to unpack .../netplan.io_0.40.1~18.04.1_amd64.deb ...
Unpacking netplan.io (0.40.1~18.04.1) over (0.36.3) ...
Setting up python3-netifaces (0.10.4-0.1build4) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up netplan.io (0.40.1~18.04.1) ...
root@careful-tahr:/run/NetworkManager/system-connections# sudo netplan apply
root@careful-tahr:/run/NetworkManager/system-connections# ls
netplan-eth0
root@careful-tahr:/run/NetworkManager/system-connections# cat netplan-eth0
[connection]
id=netplan-eth0
type=ethernet
interface-name=eth0

[ethernet]
wake-on-lan=0

[ipv4]
method=link-local

[ipv6]
method=auto
address1=23:b0:87:58:65:f7:fb:8b/45
address2=63:94:73:e1:46:15:79:58/50
dns=2001:4860:4860::8888;
dns-search=cyphermox.net;

I have checked that with an IPv6-only setup, no dns-search is rendered for ipv4 and NetworkManager no longer displays an error message in logs when failing to parse ipv4.dns-search for the 'link-local' method.

tags: added: verification-done-bionic
removed: verification-needed verification-needed-bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers