Jump to: navigation, search

Difference between revisions of "Multinic-libvirt"

m (Text replace - "NovaSpec" to "NovaSpec")
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
* '''Launchpad Entry''': NovaSpec:multinic-libvirt
* '''Launchpad Entry''': [[NovaSpec]]:multinic-libvirt
 
 
* '''Created''': Ilya Alekseyev
 
* '''Created''': Ilya Alekseyev
 
* '''Contributors''': Eldar Nugaev, Ilya Alekseyev
 
* '''Contributors''': Eldar Nugaev, Ilya Alekseyev
Line 9: Line 8:
 
== Release Note ==
 
== Release Note ==
  
Multiple NIC for libvirt allows users to have instances connected to several networks.  
+
This is implementation same functionality as in https://blueprints.launchpad.net/nova/+spec/multi-nic for libvirt.
 +
Multiple NIC for libvirt allows users to have instances connected to several networks.
 +
Implementation of this blueprint is first step in add support multi-nics for libvirt.
  
 
== Rationale ==
 
== Rationale ==
Line 19: Line 20:
 
== Design ==
 
== Design ==
  
Instances should be created with one NIC per network associated with project.
+
https://blueprints.launchpad.net/nova/+spec/multi-nic
 +
GD PoC branches:
 +
https://code.launchpad.net/~ilyaalekseyev/nova/libvirt-multinic-experemental
  
 
== Implementation ==
 
== Implementation ==
Line 26: Line 29:
  
 
=== Code Changes ===
 
=== Code Changes ===
We need to change data model.
+
I. libvirt connection changes
We need to add functionality to nova-manage (network-project association).
+
    changes in libvirt_con.to_xml() propagate NIC data
We need to change libvirt driver and network manager part of nova.
+
I. firewall rules changes
 +
    All firewall drivers would be changed to support multiple networks per instance. iptable rules should be changed.
 +
I. network managers changes
 +
# FlatManager: open question - seems it is not required to be changed, but we need to check it
 +
# FlatDHCPManager should be changed to support multiple networks
 +
# VlanManager should be changed to support multiple networks
 +
I. template changes
 +
  Add support of several NICs to template:
 +
 
 +
<pre><nowiki>#!highlight xml
 +
#for $nic in $nics
 +
        <interface type='bridge'>
 +
            <source bridge='$nic.bridge_name'/>
 +
            <mac address='$nic.mac_address'/>
 +
            <!--  <model type='virtio'/>  CANT RUN virtio network right now -->
 +
            <filterref filter="nova-instance-$nic.name">
 +
                <parameter name="IP" value="$nic.ip_address" />
 +
                <parameter name="DHCPSERVER" value="$nic.dhcp_server" />         
 +
#if $getVar('extra_params', False)
 +
                $nic.extra_params
 +
#end if
 +
#if $getVar('ra_server', False)
 +
                <parameter name="RASERVER" value="$nic.ra_server" />
 +
#end if
 +
            </filterref>
 +
        </interface>
 +
#end for
 +
</nowiki></pre>
 +
 
  
 
=== Migration ===
 
=== Migration ===
Line 34: Line 65:
 
== Test/Demo Plan ==
 
== Test/Demo Plan ==
  
We need both unit and integration tests. Second is most important.
+
We need both unit and integration tests. Second is more important.
  
 
== Unresolved issues ==
 
== Unresolved issues ==

Latest revision as of 23:31, 17 February 2013

  • Launchpad Entry: NovaSpec:multinic-libvirt
  • Created: Ilya Alekseyev
  • Contributors: Eldar Nugaev, Ilya Alekseyev

Summary

We need support for multiple network interfaces per instance for libvirt. Our vision based on http://wiki.openstack.org/multi-nic specification. with some additions.

Release Note

This is implementation same functionality as in https://blueprints.launchpad.net/nova/+spec/multi-nic for libvirt. Multiple NIC for libvirt allows users to have instances connected to several networks. Implementation of this blueprint is first step in add support multi-nics for libvirt.

Rationale

User stories

Assumptions

Design

https://blueprints.launchpad.net/nova/+spec/multi-nic GD PoC branches: https://code.launchpad.net/~ilyaalekseyev/nova/libvirt-multinic-experemental

Implementation

UI Changes

Code Changes

I. libvirt connection changes
   changes in libvirt_con.to_xml() propagate NIC data
I. firewall rules changes
   All firewall drivers would be changed to support multiple networks per instance. iptable rules should be changed.
I. network managers changes
  1. FlatManager: open question - seems it is not required to be changed, but we need to check it
  2. FlatDHCPManager should be changed to support multiple networks
  3. VlanManager should be changed to support multiple networks
I. template changes
  Add support of several NICs to template:
  
#!highlight xml
#for $nic in $nics
        <interface type='bridge'>
            <source bridge='$nic.bridge_name'/>
            <mac address='$nic.mac_address'/>
            <!--   <model type='virtio'/>  CANT RUN virtio network right now -->
            <filterref filter="nova-instance-$nic.name">
                <parameter name="IP" value="$nic.ip_address" />
                <parameter name="DHCPSERVER" value="$nic.dhcp_server" />           
#if $getVar('extra_params', False)
                $nic.extra_params
#end if
#if $getVar('ra_server', False)
                <parameter name="RASERVER" value="$nic.ra_server" />
#end if
            </filterref>
        </interface>
#end for


Migration

Test/Demo Plan

We need both unit and integration tests. Second is more important.

Unresolved issues

BoF agenda and discussion

http://ietherpad.com/arRVMd2Lwl