not possible to override dns servers when using dhcp

Bug #1882300 reported by Philipp Leusmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Undecided
Unassigned

Bug Description

I need to override the nameserver provided by DHCP with a config like this:

network:
  version: 2
  ethernets:
    ens160:
      dhcp4: true
      nameservers:
        addresses: [8.8.8.8]

Revision history for this message
Paride Legovini (paride) wrote :

Hi Philipp,

What you need should be doable with the following configuration:

  dhcp4: true
  dhcp4-overrides:
      use-dns: false

For reference see: https://netplan.io/reference

I'm marking this report as Incomplete for the moment. Please change its status to Won't Fix if you think no further action is needed, otherwise change it back to New after commenting back and we'll look at it again. Thanks!

Changed in cloud-init:
status: New → Incomplete
Revision history for this message
Ryan Harper (raharper) wrote :

@Paride

For additional context, users can supply such netplan config to cloud-init, however, when cloud-init renderes sysconfig (or eni) it does not *yet* emit equivalent configuration.

That is, cloudinit/net/network_state.py does not encode the idea of 'override dhcp dns/routes' such that when sysconfig or eni renderers write config, they emit the corresponding config.

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

[Expired for cloud-init because there has been no activity for 60 days.]

Changed in cloud-init:
status: Incomplete → Expired
Revision history for this message
James Falcon (falcojr) wrote :
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.