← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1156844] Re: NIC ordering not respected in network_config metadata

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-2

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

Title:
  NIC ordering not respected in network_config metadata

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When booting a VM with multiple NICs (in different quantum networks)

  and using

  1. quantum linuxbridge plugin
  2. network injection
  3. config drive

  The NIC ordering is not respected in the network_config metadata file
  located on the config drive.  Sometimes the first quantum network will
  be eth0 and the second network eth1, sometimes the other way around
  (50% of the time, it works all the time!)

  Basically, here are my observations:

  1. quantum respects the ordering from the nova boot command (--nic net-id=<net1> --nic net-id=<net2>), meaning that the first port is in net1, second port in net2.
  2. nova respects the ordering because it passes both networks in order to libvirt
  3. libvirt respects the ordering because it presents the first interface to the VM in the first network with the right MAC and the second interface in the second network with the second MAC.
  4. the config drive metadata DOES NOT RESPECT THE ORDERING, as half of the time eth0 will contain information for the first network and half the time, it will contains the information for the second network.

  Basically, if I have this simple "RHEL-style" interfaces template:

  #for $ifc in $interfaces
  [${ifc.name}]
  IPADDR=${ifc.address}
  NETMASK=${ifc.netmask}
  GATEWAY=${ifc.gateway}
  #end for

  And instantiate 6 identical VMs with "--nic net-id=<net1> --nic net-
  id=<net2>"

  3 will have an injected network config with eth0 containing net1 information and eth1 containing net2 information
  3 will have an injected network config with eth0 containing net2 information and eth1 containing net1 information

  Since I'm using a config drive the injected network information is
  located on /config-2/openstack/content/0000 but it is basically the
  same network information that would be injected on a root FS if you
  were not using config drive.

  My guess is the get_network_injected_template function of
  nova/virt/netutils.py does not get the network infromation in an
  ordered fashion, although parts of quantum and nova take care to store
  it in a particular order (the order that is used on the command-line
  in the case of the CLI).

  thank you very much for your help

  Boris

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