[Bug 1998920] Re: dns search domain gets duplicated

Olivier Gayot 1998920 at bugs.launchpad.net
Thu Jan 5 12:01:45 UTC 2023


I'm observing the same behavior. Furthermore, applying the IPv4 settings
multiple times already produces duplicates (the specified search domains
get appended each time the form is submitted).

The "guilty" code is in NetworkController.set_static_config where we
extend the list of search domains (and also DNS addresses) without
clearing the existing values first.

https://github.com/canonical/subiquity/blob/69264ad7f2d3308a7e744331af51d394590fb862/subiquitycore/controllers/network.py#L357

    ns = dev.config.setdefault('nameservers', {})
    ns.setdefault('addresses', []).extend(static_config.nameservers)
    ns.setdefault('search', []).extend(static_config.searchdomains)
    self.update_link(dev)

Also relates to
https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1993193

Clearing the values first might be an option but we need to be extra
careful since since this code is shared between the subiquity client,
the subiquity server and console_conf.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1998920

Title:
  dns search domain gets duplicated

Status in subiquity:
  New
Status in subiquity package in Ubuntu:
  Confirmed

Bug description:
  When configuring the network on Ubuntu Server 22.04.1 Installer with Subiquity 22.10.1 entering the same search domain in both IPv4 and IPv6 makes it appear twice in the generated netplan config.
  Editing the search domain in either IPv4 or IPv6 seems to duplicate them even further.

  e.g.:
  network:
    ethernets:
      enp1s0:
        addresses:
        - [IPv4]/24
        - [IPv6]/64
        nameservers:
          addresses:
          - [IPv4]
          - [IPv4]
          - [IPv6]
          - [IPv6]
          search:
          - example.com
          - example.com
        routes:
        - to: default
         via: [IPv6]
    version: 2

  For that the default route gets only generated once see Bug #1993792.

To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/1998920/+subscriptions




More information about the foundations-bugs mailing list