Difference between revisions of "Multinic-libvirt"
Line 35: | Line 35: | ||
|| + network_id(FK) || | || + network_id(FK) || | ||
− | + | ||'''Network to project association'''|| | |
− | + | || + network_id (FK, PK)|| | |
− | + | || + project_id (FK, PK)|| | |
− | + | || + order (int) - for interface sorting in libvirt template cycle|| | |
− | + | || + deleted, created_at, deleted_at, ...|| | |
− | + | I.i. DB model changes: | |
− | + | ||'''Instance'''|| | |
− | + | ||- mac_address|| | |
I. nova-manage changes | I. nova-manage changes | ||
nova-manage network associate <project id> <network cidr> [<order>] | nova-manage network associate <project id> <network cidr> [<order>] | ||
order is optional parameter, if not exists will be max(order in project)+1 | order is optional parameter, if not exists will be max(order in project)+1 | ||
Example: nova-manage network associate project1 10.0.0.0/16 | Example: nova-manage network associate project1 10.0.0.0/16 | ||
− | + | I. libvirt connection changes | |
− | + | changes in libvirt_con.to_xml() propagate NIC data | |
− | 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. | |
− | + | Open question: rules for network shared between several projects | |
− | All firewall drivers would be changed to support multiple networks per instance. iptable rules should be changed. | + | I. network managers changes |
− | Open question: rules for network shared between several projects | + | # [[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: | |
− | + | ||
− | |||
− | |||
− | |||
− | Add support of several NICs to template: | ||
− | |||
<pre><nowiki>#!highlight xml | <pre><nowiki>#!highlight xml | ||
#for $nic in $nics | #for $nic in $nics | ||
Line 84: | Line 79: | ||
</nowiki></pre> | </nowiki></pre> | ||
− | + | I. API changes: | |
− | + | we not expecting any changes in EC2 API. we think that we could change [[OpenStack]] API only. | |
=== Migration === | === Migration === |
Revision as of 14:53, 11 March 2011
- 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
Multiple NIC for libvirt allows users to have instances connected to several networks.
Rationale
User stories
Assumptions
Design
Instances should be created with one NIC per network associated with project.
Implementation
UI Changes
Code Changes
I. DB model changes.
- Add to DB model:
||Network Interface Card|| || + id (PK) || || + instance_id (FK - instance.id) || || + mac_address || || + network_id(FK) ||
||Network to project association|| || + network_id (FK, PK)|| || + project_id (FK, PK)|| || + order (int) - for interface sorting in libvirt template cycle|| || + deleted, created_at, deleted_at, ...|| I.i. DB model changes: ||Instance|| ||- mac_address|| I. nova-manage changes nova-manage network associate <project id> <network cidr> [<order>] order is optional parameter, if not exists will be max(order in project)+1 Example: nova-manage network associate project1 10.0.0.0/16 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. Open question: rules for network shared between several projects 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:
#!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
I. API changes: we not expecting any changes in EC2 API. we think that we could change OpenStack API only.
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