manage_resolv_conf not working in ubuntu18.04 cloud images

Bug #1843221 reported by Pedro A. Aranda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Invalid
Undecided
Unassigned

Bug Description

I'm using the following stanza in my cloud-init VM configurations:

manage_resolv_conf: true
resolv_conf:
  nameservers:
  - 8.8.8.8
  - 8.8.4.4

However, neither /etc/resolv.conf not 'systemd-resolv --status' reflects it. In both cases, DNS is delegated to the virtualisation host.

The virtualisation host is:

paag@pavilion:~/virt/images$ uname -a
Linux pavilion 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
paag@pavilion:~/virt/images$ virsh --version
4.0.0

I'm creating the VMs directly with virsh.

Revision history for this message
Pedro A. Aranda (paaguti-p) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi Pedro,

Thanks for using cloud-init and for taking the time to file this bug! Per the cloud-init docs[0], the cc_resolv_conf module is not supported on Ubuntu, and it therefore doesn't run in the default configuration. This is because systemd-resolved is used on Ubuntu systems, so configuring resolv.conf won't have the effect that you are looking for.

Presumably you're building your own NoCloud data source ISOs to include the user-data snippet you mentioned? If so, you can follow the NoCloud docs[1] for information on how to write network configuration that will configure DNS servers appropriately.

As this isn't a bug in cloud-init per se, I'm going to mark this as Invalid. Please do feel free to continue to ask questions here, or in #cloud-init on freenode. (If you don't think my assessment of Invalid is correct, feel free to move the bug back to New.)

Thanks!

Dan

[0] https://cloudinit.readthedocs.io/en/latest/topics/modules.html#resolv-conf
[1] https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html#datasource-nocloud

Changed in cloud-init:
status: New → Invalid
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.