Comment 2 for bug 1998920

Revision history for this message
Olivier Gayot (ogayot) wrote :

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.