← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1705804] Re: sysconfig renderer should render DNSx= and GATEWAY= lines

 

This bug is believed to be fixed in cloud-init in 17.1. 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/1705804

Title:
  sysconfig renderer should render DNSx= and GATEWAY= lines

Status in cloud-init:
  Fix Released

Bug description:
  cloud-init 0.7.9 on CentOS and Fedora are semi-broken because the sysconfig renderer does not render
  DNS1=...
  GATEWAY=...

  into /etc/sysconfig/network-scripts/ifcfg-eth0. The VM has no default
  gateway or nameservers.

  This is using NoCloud ENI source -> network_config -> network_state ->
  sysconfig renderer

  From this ENI source:
  auto eth0
  iface eth0 inet static
  address 192.168.125.154
  netmask 255.255.255.0
  gateway 192.168.125.1
  dns-nameservers 192.168.125.1 8.8.8.8 8.8.4.4 1.2.3.4
  dns-search example.com foo.biz bar.info foobar.toomany

  
  Actual result:
  # Created by cloud-init on instance boot automatically, do not edit.
  #
  BOOTPROTO=static
  DEVICE=eth0
  IPADDR=192.168.125.154
  NETMASK=255.255.255.0
  ONBOOT=yes
  TYPE=Ethernet
  USERCTL=no

  Expected result:
  # Created by cloud-init on instance boot automatically, do not edit.
  #
  BOOTPROTO=static
  DEVICE=eth0
  DNS1=192.168.125.1
  DNS2=8.8.8.8
  DNS3=8.8.4.4
  GATEWAY=192.168.125.1
  HELLO=world
  IPADDR=192.168.125.154
  NETMASK=255.255.255.0
  ONBOOT=yes
  SEARCH="example.com foo.biz info.bar"
  TYPE=Ethernet
  USERCTL=no

  
  The network_config object:
  {'version': 1, 'config': [{'type': 'physical', 'name': 'eth0', 'subnets': [{'_orig_eni_name': 'eth0', 'type': 'static', 'control': 'auto', 'address': '192.168.125.154', 'netmask': '255.255.255.0', 'gateway': '192.168.125.1', 'dns_nameservers': ['192.168.125.1', '8.8.8.8', '8.8.4.4', '1.2.3.4'], 'dns_search': ['example.com', 'foo.biz', 'bar.info', 'foobar.toomany']}]}]}

  The network_state object:

  !!python/object:cloudinit.net.network_state.NetworkState
  _network_state:
      dns:
          nameservers: []
          search: []
      interfaces:
          eth0:
              address: null
              gateway: null
              inet: inet
              mac_address: null
              mode: manual
              mtu: null
              name: eth0
              subnets:
              -   _orig_eni_name: eth0
                  address: 192.168.125.154
                  control: auto
                  dns_nameservers:
                  - 192.168.125.1
                  - 8.8.8.8
                  - 8.8.4.4
                  - 1.2.3.4
                  dns_search:
                  - example.com
                  - foo.biz
                  - bar.info
                  - foobar.toomany
                  gateway: 192.168.125.1
                  netmask: 255.255.255.0
                  type: static
              type: physical
      routes: []
  _version: 1

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


References