← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1355171] [NEW] Injected /etc/network/interfaces misses line feed and IP existence checks

 

Public bug reported:

When I use nova's /etc/network/interfaces file injection via configdisk and set up by cloud-init, I end up with a not working /etc/network/interfaces like this one (notice the missing line feed and the "address None") : 
----
# Injected by Nova on instance boot
#
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 10.1.0.14
        netmask 255.255.0.0
        broadcast 10.1.255.255
        gateway 10.1.0.1

iface eth0 inet6 static
    address None
    netmask Noneauto eth1
iface eth1 inet static
        address None
        netmask None
        broadcast None

iface eth1 inet6 static
    address XXXX:XXXX:XXXX:XXXX::c
    netmask 64

----

I use two interfaces for two different networks one v4 only on eth0 and
one v6 only on eth1.

I also attached a patch that corrects both issues.

About the second issue, since the patched version checks for IPv6
address existence, it might be possible to delete the use_ipv6 check.

** Affects: nova
     Importance: Undecided
         Status: New

** Patch added: "interfaces.template.patch"
   https://bugs.launchpad.net/bugs/1355171/+attachment/4174463/+files/interfaces.template.patch

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1355171

Title:
  Injected /etc/network/interfaces misses line feed and IP existence
  checks

Status in OpenStack Compute (Nova):
  New

Bug description:
  When I use nova's /etc/network/interfaces file injection via configdisk and set up by cloud-init, I end up with a not working /etc/network/interfaces like this one (notice the missing line feed and the "address None") : 
  ----
  # Injected by Nova on instance boot
  #
  # This file describes the network interfaces available on your system
  # and how to activate them. For more information, see interfaces(5).

  # The loopback network interface
  auto lo
  iface lo inet loopback

  auto eth0
  iface eth0 inet static
          address 10.1.0.14
          netmask 255.255.0.0
          broadcast 10.1.255.255
          gateway 10.1.0.1

  iface eth0 inet6 static
      address None
      netmask Noneauto eth1
  iface eth1 inet static
          address None
          netmask None
          broadcast None

  iface eth1 inet6 static
      address XXXX:XXXX:XXXX:XXXX::c
      netmask 64

  ----

  I use two interfaces for two different networks one v4 only on eth0
  and one v6 only on eth1.

  I also attached a patch that corrects both issues.

  About the second issue, since the patched version checks for IPv6
  address existence, it might be possible to delete the use_ipv6 check.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1355171/+subscriptions


Follow ups

References