Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1067906

Summary: Cloud-init DNS settings should go inside the "iface" section
Product: [Retired] oVirt Reporter: Juan Hernández <juan.hernandez>
Component: ovirt-engine-coreAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: bugs <bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3CC: acathrow, blade, gklein, iheim, sbonazzo, s.kieske, yeylon
Target Milestone: ---   
Target Release: 3.3.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.3.4-ga Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-31 12:28:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1078914    

Description Juan Hernández 2014-02-21 10:35:28 UTC
When cloud-init support is used to set the DNS servers and search domains we generate a configuration file with the following content:

  dns-nameservers 1.1.1.1 2.2.2.2
  dns-search example.com
  iface eth0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    gateway 192.168.0.1
  auto eth0

The cloud-init support for Fedora and RHEL translates this to /etc/sysconfig files, but ignores the dns-nameservers and dns-search settings. They need to be inside the "iface" section:

  iface eth0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    gateway 192.168.0.1
    dns-nameservers 1.1.1.1 2.2.2.2
    dns-search example.com
  auto eth0

Cloud-init users the format used by Ubuntu for the /etc/network/interfaces file, and according to the Debian documentation these settings should o inside the "iface" section:

"Place the line indented within an iface stanza, e.g., right after the gateway line. Enter the IP addresses of the nameservers you need to use after dns-nameservers. Put all of them on one line separated by spaces. Don't forget the "s" on the end of dns-nameservers."

See here for details:

https://wiki.debian.org/NetworkConfiguration

Comment 1 Boyan Tabakov 2014-02-21 11:05:35 UTC
In addition the network configuration in the form

  dns-nameservers 1.1.1.1 2.2.2.2
  dns-search example.com
  iface eth0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    gateway 192.168.0.1
  auto eth0

prevents e.g. Ubuntu (tested on 12.04 LTS) network from starting, as it considers this illegal configuration.

Comment 2 Juan Hernández 2014-02-21 11:21:55 UTC
I'm changing the target release to 3.3.4 because I think this is worth changing in 3.4 and 3.3 as well.

Comment 3 Sandro Bonazzola 2014-03-03 14:40:11 UTC
This BZ should be fixed in oVirt 3.4.0 RC

Comment 4 Sandro Bonazzola 2014-03-31 12:28:45 UTC
This is an automated message. Moving to Closed CURRENTRELEASE since oVirt 3.3.4 has been released.