← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1843634] Re: cloud-init misconfigure the network on SLES

 

This bug is believed to be fixed in cloud-init in version 19.2-50. If
this is still a problem for you, please make a comment and set the state
back to New

Thank you.

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

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

Title:
  cloud-init misconfigure the network on SLES

Status in cloud-init:
  Fix Released
Status in cloud-init package in Suse:
  Incomplete

Bug description:
  cloud-init's sysconfig renderer injects the cloud-init header even
  if no DNS configuration is provided in network-config.

  cloud-init.service may need to update service file with additional
  wicked service names to ensure that networking is up before starting.

  
  [Original Description]
  I reproduced the issue on an Azure VM with SLES12 SP4 and cloud-init 19.1.
  The DNS is unreachable when cloud-init takes the responsibility of configuring the network. No nameservers or search domains are added to the /etc/resolv.conf as following:
  ; Created by cloud-init on instance boot automatically, do not edit.
  ;
  ### /etc/resolv.conf file autogenerated by netconfig!
  #
  # Before you change this file manually, consider to define the
  # static DNS configuration using the following variables in the
  # /etc/sysconfig/network/config file:
  #     NETCONFIG_DNS_STATIC_SEARCHLIST
  #     NETCONFIG_DNS_STATIC_SERVERS
  #     NETCONFIG_DNS_FORWARDER
  # or disable DNS configuration updates via netconfig by setting:
  #     NETCONFIG_DNS_POLICY=''
  #
  # See also the netconfig(8) manual page and other documentation.
  #
  # Note: Manual change of this file disables netconfig too, but
  # may get lost when this file contains comments or empty lines
  # only, the netconfig settings are same with settings in this
  # file and in case of a "netconfig update -f" call.
  #
  ### Please remove (at least) this line when you modify the file!

  I also attached the "/etc/sysconfig/network/config" in the first
  comment for your reference:

  When I disable the network configuration in cloud-init and leave it for netconfig, the /etc/resolv.conf is correctly populated with the search domain and the nameserver and the DNS is reachable. Here's the contents of the /etc/resolv.conf:
  ### /etc/resolv.conf file autogenerated by netconfig!
  #
  # Before you change this file manually, consider to define the
  # static DNS configuration using the following variables in the
  # /etc/sysconfig/network/config file:
  #     NETCONFIG_DNS_STATIC_SEARCHLIST
  #     NETCONFIG_DNS_STATIC_SERVERS
  #     NETCONFIG_DNS_FORWARDER
  # or disable DNS configuration updates via netconfig by setting:
  #     NETCONFIG_DNS_POLICY=''
  #
  # See also the netconfig(8) manual page and other documentation.
  #
  # Note: Manual change of this file disables netconfig too, but
  # may get lost when this file contains comments or empty lines
  # only, the netconfig settings are same with settings in this
  # file and in case of a "netconfig update -f" call.
  #
  ### Please remove (at least) this line when you modify the file!
  search xkf00b0rtzgejkug4xc2pcinre.xx.internal.cloudapp.net
  nameserver 168.63.129.16

  When I tried to populate the network config dictionary that's built by
  DataSourceAzure with a default nameserver "168.63.129.16" and search
  domain "xkf00b0rtzgejkug4xc2pcinre.xx.internal.cloudapp.net", The DNS
  was reachable. But It's my understanding that cloud-init should be
  able to figure out this nameserver and the search domain the same way
  netconfig does.

  Another issue is the eth0 interface is not brought up automatically even though the contents of the file "/etc/sysconfig/network/ifcfg-eth0" seems correct
  # Created by cloud-init on instance boot automatically, do not edit.
  #
  BOOTPROTO=dhcp
  DEVICE=eth0
  HWADDR=00:0d:3a:06:1e:04
  NM_CONTROLLED=no
  ONBOOT=yes
  STARTMODE=auto
  TYPE=Ethernet
  USERCTL=no

  I had to bring it up by executing "ifup eth0" from Azure.py code after
  the network config is applied. This way I was able to ssh into the VM.

  Here's also the contents of "etc/udev/rules.d/85-persistent-net-cloud-
  init.rules":SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
  ATTR{address}=="00:0d:3a:6d:e4:53", NAME="eth0"

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


References