← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Public bug reported:

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 would 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 7.5 installed.

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
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/1645404

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

Status in cloud-init:
  New

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 would 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 7.5 installed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1645404/+subscriptions


Follow ups