console-conf does not allow to set up dns for static ip

Bug #1626617 reported by Federico Gimenez
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
Undecided
Martin Pitt
nplan (Ubuntu)
Fix Released
Undecided
Martin Pitt
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned
subiquity (Ubuntu)
Fix Released
Critical
Unassigned
Xenial
Won't Fix
Undecided
Unassigned
Yakkety
Won't Fix
Undecided
Unassigned

Bug Description

[Impact]
subiquity and other nplan users may need to include DNS information when setting up a system.

[Test case]
1) set up a system with a netplan configuration including the nameserver: key for an interface, such as the following:

network:
  ethernets:
    enxb827ebd3f20f:
      addresses: [192.168.0.200/24]
      nameservers: 192.168.0.10
  version: 2

Verify that the nameserver settings are properly installed to the system (see /etc/resolv.conf or /run/systemd/resolve/resolv.conf)

[Regression potential]
Existing configurations that do not include nameserver configs should continue to work as-is; without nameserver data if using static addresses, or with the nameserver data retrieved from DHCP.

[Original bug report]
There's no way to setup DNS info for static IP configuration, which leads to broken name resolution:

fgimenez@localhost:~$ cat /etc/netplan/00-snapd-config.yaml
# This is the network config written by 'console-conf'
network:
  ethernets:
    enxb827ebd3f20f:
      addresses: [192.168.0.200/24]
  version: 2
fgimenez@localhost:~$ ping www.ubuntu.com
ping: unknown host www.ubuntu.com
fgimenez@localhost:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

Selecting DHCP config from console-conf all works fine:

fgimenez@localhost:~$ cat /etc/netplan/00-snapd-config.yaml
# This is the network config written by 'console-conf'
network:
  ethernets:
    enxb827ebd3f20f:
      addresses: []
      dhcp4: true
  version: 2
fgimenez@localhost:~$ ping www.ubuntu.com
PING www.ubuntu.com (91.189.90.59) 56(84) bytes of data.
64 bytes from www.ubuntu.com (91.189.90.59): icmp_seq=1 ttl=51 time=34.0 ms
64 bytes from www.ubuntu.com (91.189.90.59): icmp_seq=2 ttl=51 time=39.4 ms
64 bytes from www.ubuntu.com (91.189.90.59): icmp_seq=3 ttl=51 time=37.0 ms
^C
--- www.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 34.066/36.882/39.496/2.221 ms
fgimenez@localhost:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.0.1

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I don't think netplan supports this yet :(

Changed in subiquity (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Martin Pitt (pitti) wrote :

I'm working on this since this morning.

Changed in netplan:
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Changed in nplan (Ubuntu):
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

In xenial, specifying search domains when using networkd does not work. I filed bug 1635256 about this. Other than that, things look good in both x and y.

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in netplan:
status: In Progress → Fix Released
Changed in nplan (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

0.13 uploaded to zesty-proposed.

Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded to the xenial-proposed SRU review queue.

Changed in nplan (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Andy Whitcroft (apw) wrote : Please test proposed package

Hello Federico, or anyone else affected,

Accepted nplan into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.13~16.04 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in nplan (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Steve Langasek (vorlon)
Changed in subiquity (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.13

---------------
nplan (0.13) zesty; urgency=medium

  [ Jonathan Cave ]
  * Blacklist mwifiex_pcie from rebinds (work around LP: #1630285)

  [ Martin Pitt ]
  * Add support for nameservers (LP: #1626617)

 -- Martin Pitt <email address hidden> Thu, 20 Oct 2016 16:23:58 +0200

Changed in nplan (Ubuntu):
status: Fix Committed → Fix Released
Simon Fels (morphis)
tags: added: plano-acan
Revision history for this message
Martin Pitt (pitti) wrote :

Frederico, Michael, is this working/sufficient for you? If so, please mark as verification-done so that we can release this.

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Hi Martin, I can confirm that this works now, verified on amd64, core v16.04.1 r324.

Thanks!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for nplan has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.13~16.04

---------------
nplan (0.13~16.04) xenial; urgency=medium

  [ Martin Pitt ]
  * Update to 0.13.
  * tests/integration.py: Disable search domain check in /etc/resolv.conf with
    networkd, until this gets fixed in systemd (see LP: #1635256)

  [ Simon Fels ]
  * src/netplan: Use absolute path to the nmcli utility provided by the
    network-manager snap. Contributes to LP #1633004.

nplan (0.13) zesty; urgency=medium

  [ Jonathan Cave ]
  * Blacklist mwifiex_pcie from rebinds (work around LP: #1630285)

  [ Martin Pitt ]
  * Add support for nameservers (LP: #1626617)

 -- Martin Pitt <email address hidden> Thu, 20 Oct 2016 16:44:36 +0200

Changed in nplan (Ubuntu Xenial):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Federico, or anyone else affected,

Accepted nplan into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.23~16.10.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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in nplan (Ubuntu Yakkety):
status: New → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Steve Langasek (vorlon)
Changed in subiquity (Ubuntu Xenial):
status: New → Won't Fix
Changed in subiquity (Ubuntu Yakkety):
status: New → Won't Fix
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Verification done for yakkety:

Preparing to unpack .../nplan_0.23~16.10.1_amd64.deb ...
Unpacking nplan (0.23~16.10.1) over (0.12) ...
Setting up nplan (0.23~16.10.1) ...

Verified that nameservers can be set via netplan in yakkety-proposed; used the configuration below:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens4:
      dhcp4: yes
      nameservers:
        search: [ 'cyphermox.net' ]
        addresses: [ 10.10.10.1 ]

The correct nameservers are used by systemd-resolved, but /etc/resolv.conf will not include the values directly (because it gets 127.0.0.53, as a side-effect of the use of systemd-resolved behind resolvconf.

tags: added: verification-done-yakkety
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.23~16.10.1

---------------
nplan (0.23~16.10.1) yakkety; urgency=medium

  * Backport netplan 0.23 to 16.10. (LP: #1688632)

nplan (0.23) artful; urgency=medium

  * Do not unbind brcmfmac, interface will be gone. (LP: #1696162)

nplan (0.22) artful; urgency=medium

  * Add support for setting a custom MAC address on all device types.
    (LP: #1690388)
  * Improved MAC/vlan integration tests; thanks for Dimitri John Ledkov for the
    changes.

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

nplan (0.20) zesty; urgency=medium

  * tests/integration.py: increase timeout for integration tests (networkd and
    NetworkManager "wait-online" checks) to account for longer bring-up times
    when dealing with stacked virtual devices.

nplan (0.19) zesty; urgency=medium

  * Add support for unordered definition of network devices: you can now
    specify a virtual devices before their member devices. (LP: #1670495)
  * Allow setting up the STP state for a bridge. (LP: #1665088)
  * Document bond/bridge parameters support. (LP: #1664702)

nplan (0.18) zesty; urgency=medium

  * debian/tests/integration.py: in some cases 'iw reg get' may qualify the
    reg domain results with 'global'; we must not let that trip up tests when
    they are run on Ubuntu infrastructure vs. local tests.

nplan (0.17) zesty; urgency=medium

  * New release:
    - Add support for configuring bonds.
    - Add support for configuring bridges.

nplan (0.16) zesty; urgency=medium

  [ Martin Pitt ]
  * doc/example-config: Adjust "routes:" example.
    It does not make sense to make "routes:" a global thing, they should be
    tied to an interface so that the route is only set when the corresponding
    interface exists and is up, and the config is not split in two parts.
  * doc/netplan.md: Point out that NM does not support globbing (LP: #1631018)

  [ Mathieu Trudel-Lapierre ]
  * Fix coverage for src/netplan to be 100%, and fail if coverage falls below
    that mark again.
  * Add support for specifying routes.

nplan (0.15) zesty; urgency=medium

  * tests/generate.py: Fix PEP-8 error (newly detected by -proposed
    pycodestyle).

nplan (0.14) zesty; urgency=medium

  * tests/generate.py: Introduce macros for commonly expected networkd output
  * networkd: Use NetworkManager compatible DHCP route metrics (LP: #1639754)
  * doc/netplan.md: Fix wrong wifi reference in "br0" example
  * doc/netplan.md: Clarify introduction
  * tests/integration.py: Fix race condition with waiting for networkd

nplan (0.13) zesty; urgency=medium

  [ Jonathan Cave ]
  * Blacklist mwifiex_pcie from rebinds (work around LP: #1630285)

  [ Martin Pitt ]
  * Add support for nameservers (LP: #1626617)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Jun 2017 17:25:57 -0700

Changed in nplan (Ubuntu Yakkety):
status: Fix Committed → Fix Released
John Lenton (chipaca)
no longer affects: snappy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.