NoCloud module incompletely configures network interfaces which leads to wrong /etc/resolv.conf configuration in RH-based distros

Bug #1645404 reported by Peter
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Undecided
Unassigned

Bug Description

Hello all!

NoCloud module doesn't put dns-nameservers and dns-search (and hwaddr as well) values to /etc/sysconfig/network-scripts/ifcfg-* files during configuration in Red Hat-based distos, putting it to /etc/resolv.conf instead. As a result having no DNS1, DNS2 and SEARCH defined in ifcfg-* files with PEERDNS=on (default value), /etc/resolv.conf settings get overwritten with settings obtained from DHCP server is there's one around even if BOOTPROTO=static is set. On the other hand, /etc/resolv.conf settings are ignored completely with PEERDNS=off and settings made by cloud-init remain untouched, the downside is that settings obtained over DHCP (if configured) are not written to /etc/resolv.conf as well disabling ability to perform DNS queries.

It would be better if NoCloud put dns-nameservers and dns-search values to DNS1, DNS2 and SEARCH parameters in ifcfg-* files when they are set.

The only option so far is to hard code DNS1 and DNS2 settings in custom made cloud image. That will always set these nameservers to /etc/resolv.conf (until you edit them manually in ifcfg-* file) but that's a warranty that system will always be able to perform DNS queries.

The problem takes place in CentOS 7 with cloud-init 0.7.5 installed.

Peter (pry)
description: updated
Peter (pry)
description: updated
Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi Peter,

Thanks for filing this bug! Is this still an issue you are seeing in more recent versions of cloud-init? If it is, please do give us steps to reproduce and set it back to New.

Thanks!

Dan

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