yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #92317
[Bug 2015494] Re: network-manager renderer not properly configuring /etc/resolv.conf
Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/4097
** Bug watch added: github.com/canonical/cloud-init/issues #4097
https://github.com/canonical/cloud-init/issues/4097
** Changed in: cloud-init
Status: Triaged => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/2015494
Title:
network-manager renderer not properly configuring /etc/resolv.conf
Status in cloud-init:
Expired
Bug description:
I'm running cloud-init 23.1.1 on a rockylinux 9 virtual machine
(running on Proxmox VE) with network-manager renderer.
The cloud-init network-config file is:
version: 1
config:
- type: physical
name: eth0
mac_address: '62:04:02:7b:34:a0'
subnets:
- type: static
address: '172.18.7.1'
netmask: '255.255.254.0'
gateway: '172.18.7.254'
- type: nameserver
address:
- '192.84.134.50'
- '192.84.134.55'
search:
- 'na.infn.it'
Inside the VM base image I have, in /etc/cloud/cloud.cfg:
system_info:
network:
renderers: ['network-manager']
activators: ['network-manager']
When I start the VM, everything works fine and the renderer creates
the correct NIC config file: /etc/NetworkManager/system-
connections/cloud-init-eth0.nmconnection:
# Generated by cloud-init. Changes will be lost.
[connection]
id=cloud-init eth0
uuid=1dd9a779-d327-56e1-8454-c65e2556c12c
type=ethernet
[user]
org.freedesktop.NetworkManager.origin=cloud-init
[ethernet]
mac-address=62:04:02:7B:34:A0
[ipv4]
method=manual
may-fail=false
address1=172.18.7.1/23
gateway=172.18.7.254
The problem is that /etc/resolv.conf is not correctly configured with my DNS servers:
# cat /etc/resolv.conf
# Generated by NetworkManager
search na.infn.it
Digging into /usr/lib/python3.9/site-packages/cloudinit/net/network_manager.py it seems to me that networ-manager renderer only adds DNS servers if specified in NIC configuration (i.e. in a "subnets" section of the yaml network-config file).
Those specified under "type: nameserver" get ignored.
Not sure if this is a bug or it's the expected behavior.
Could you please clarify ?
Thanks
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/2015494/+subscriptions
References