← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1722288] [NEW] (Network) Config Version 2 is not working on CentOS 7.4

 

Public bug reported:

We're using CentOS 7.4.1708.
My config (using NoCloud ISO):

#### meta-data
#cloud-config
instance-id: iid-<hostname>
local-hostname: <fqdn>

#### user-data
#cloud-config
write_files:
  - content: |
      # This file is automatically generated by cloud-init!
      172.29.6.61 <fqdn> <hostname>
      127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
      ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    path: /etc/hosts

#### network-config:
version: 1
config:
  - type: physical
    name: eth0
    subnets:
      - type: static
        address: <ip>/16
        dns_nameservers:
          - <DNS1>
          - <DNS2>
        dns_search:
          - <DNS_DOMAIN>
  - type: route
    destination: 0.0.0.0/0
    gateway: <GATEWAY>

I've disabled NetworkManager, and enabled the 'old' network daemon with
chkconfig.

Things that do not work:
gateway is not set (either in the network-scripts/ifcfg-eth0 file or in the routes table). I've also tried to set the default gateway inside the subnet block, doesn't work either.

resolv.conf is empty, except for a comment that cloud-init visited the
file.... :(

I've tried using Config Version 2, but that fails horribly (not even the
IP is set). Even when enabling NetworkManager things go hay-wire real
soon (things like dhclient interfering, having a DHCP address as well as
a static address...)

I only want 3 things:
- simple network configuration with IP, GW, DNS and DNS Lookup Domain
- hostname
- hosts file

I don't care if i have to use the Legacy ENI, Config Version 1 or Config
Version 2, i just want it to work...

Can anyone provide a working example?

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


** Tags: centos cloud-config cloud-init network-config networkmanager

** Description changed:

  We're using CentOS 7.4.1708.
  My config (using NoCloud ISO):
  
  #### meta-data
  #cloud-config
  instance-id: iid-<hostname>
  local-hostname: <fqdn>
  
  #### user-data
  #cloud-config
  write_files:
-   - content: |
-       # This file is automatically generated by cloud-init!
-       172.29.6.61 <fqdn> <hostname>
-       127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
-       ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
-     path: /etc/hosts
+   - content: |
+       # This file is automatically generated by cloud-init!
+       172.29.6.61 <fqdn> <hostname>
+       127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
+       ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
+     path: /etc/hosts
  
  #### network-config:
  version: 1
  config:
-   - type: physical
-     name: eth0
-     subnets:
-       - type: static
-         address: <ip>/16
-         dns_nameservers:
-           - <DNS1>
-           - <DNS2>
-         dns_search:
-           - <DNS_DOMAIN>
-   - type: route
-     destination: 0.0.0.0/0
-     gateway: <GATEWAY>
+   - type: physical
+     name: eth0
+     subnets:
+       - type: static
+         address: <ip>/16
+         dns_nameservers:
+           - <DNS1>
+           - <DNS2>
+         dns_search:
+           - <DNS_DOMAIN>
+   - type: route
+     destination: 0.0.0.0/0
+     gateway: <GATEWAY>
  
- 
- I've disabled NetworkManager, and enabled the 'old' network daemon with chkconfig.
+ I've disabled NetworkManager, and enabled the 'old' network daemon with
+ chkconfig.
  
  Things that do not work:
- gateway is not set (either in the network-scripts/ifcfg-eth0 file or in the routes table).
- resolv.conf is empty, except for a comment that cloud-init visited the file.... :(
+ gateway is not set (either in the network-scripts/ifcfg-eth0 file or in the routes table). I've also tried to set the default gateway inside the subnet block, doesn't work either.
+ 
+ resolv.conf is empty, except for a comment that cloud-init visited the
+ file.... :(
  
  I've tried using Config Version 2, but that fails horribly (not even the
  IP is set). Even when enabling NetworkManager things go hay-wire real
  soon (things like dhclient interfering, having a DHCP address as well as
  a static address...)
  
  I only want 3 things:
  - simple network configuration with IP, GW, DNS and DNS Lookup Domain
  - hostname
  - hosts file
  
  I don't care if i have to use the Legacy ENI, Config Version 1 or Config
  Version 2, i just want it to work...
  
  Can anyone provide a working example?

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

Title:
  (Network) Config Version 2 is not working on CentOS 7.4

Status in cloud-init:
  New

Bug description:
  We're using CentOS 7.4.1708.
  My config (using NoCloud ISO):

  #### meta-data
  #cloud-config
  instance-id: iid-<hostname>
  local-hostname: <fqdn>

  #### user-data
  #cloud-config
  write_files:
    - content: |
        # This file is automatically generated by cloud-init!
        172.29.6.61 <fqdn> <hostname>
        127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
        ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
      path: /etc/hosts

  #### network-config:
  version: 1
  config:
    - type: physical
      name: eth0
      subnets:
        - type: static
          address: <ip>/16
          dns_nameservers:
            - <DNS1>
            - <DNS2>
          dns_search:
            - <DNS_DOMAIN>
    - type: route
      destination: 0.0.0.0/0
      gateway: <GATEWAY>

  I've disabled NetworkManager, and enabled the 'old' network daemon
  with chkconfig.

  Things that do not work:
  gateway is not set (either in the network-scripts/ifcfg-eth0 file or in the routes table). I've also tried to set the default gateway inside the subnet block, doesn't work either.

  resolv.conf is empty, except for a comment that cloud-init visited the
  file.... :(

  I've tried using Config Version 2, but that fails horribly (not even
  the IP is set). Even when enabling NetworkManager things go hay-wire
  real soon (things like dhclient interfering, having a DHCP address as
  well as a static address...)

  I only want 3 things:
  - simple network configuration with IP, GW, DNS and DNS Lookup Domain
  - hostname
  - hosts file

  I don't care if i have to use the Legacy ENI, Config Version 1 or
  Config Version 2, i just want it to work...

  Can anyone provide a working example?

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


Follow ups