From b77316f8b69b22b62d3c0bf24ceae3073b4359b6 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 16 Dec 2013 14:13:22 +0100 Subject: [PATCH] Add ML2 support and configure OVS correctly with VXLAN Part of https://dev.ring.enovance.com/redmine/issues/4382 Signed-off-by: Emilien Macchi --- roles/network/network_common.pp | 17 ++++++++++++++++- roles/network/network_compute.pp | 6 ------ site-ref.pp | 1 + 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/roles/network/network_common.pp b/roles/network/network_common.pp index eed5695a..40a9044d 100644 --- a/roles/network/network_common.pp +++ b/roles/network/network_common.pp @@ -24,6 +24,7 @@ class os_network_common( $debug = $os_params::debug, $rabbit_hosts = $os_params::rabbit_hosts, $rabbit_password = $os_params::rabbit_password, + $local_ip = $os_params::tunnel_int ) { $encoded_user = uriescape($neutron_db_user) @@ -40,10 +41,24 @@ class os_network_common( dhcp_agents_per_network => 2 } + # While https://review.openstack.org/#/c/55578 got merged: class { 'neutron::plugins::ovs': connection => "mysql://${encoded_user}:${encoded_password}@${neutron_db_host}/neutron?charset=utf8", - tenant_network_type => 'gre', + tenant_network_type => 'vxlan', network_vlan_ranges => false } + class { 'neutron::plugins::ml2': + type_drivers => ['vxlan'], + tenant_network_types => ['vxlan'], + vxlan_group => '239.1.1.1', + mechanism_drivers => ['openvswitch'], + vni_ranges => ['0:10000000'] + } + + class { 'neutron::agents::ovs': + enable_tunneling => true, + local_ip => $local_ip + } + } diff --git a/roles/network/network_compute.pp b/roles/network/network_compute.pp index 65b4b9a2..c139ed81 100644 --- a/roles/network/network_compute.pp +++ b/roles/network/network_compute.pp @@ -20,7 +20,6 @@ class os_network_compute( $neutron_endpoint = $os_params::ks_neutron_admin_host, $neutron_protocol = $os_params::ks_neutron_public_proto, $neutron_password = $os_params::ks_neutron_password, - $local_ip = $os_params::tunnel_int ) { class { 'nova::network::neutron': @@ -29,9 +28,4 @@ class os_network_compute( neutron_url => "${neutron_protocol}://${neutron_endpoint}:9696" } - class { 'neutron::agents::ovs': - enable_tunneling => true, - local_ip => $local_ip - } - } diff --git a/site-ref.pp b/site-ref.pp index 54aa476e..d64212e6 100644 --- a/site-ref.pp +++ b/site-ref.pp @@ -125,6 +125,7 @@ node '3-object-storage-nodes' inherits common{ # Compute nodes node 'compute-node' inherits common { + class { 'os_network_common': } class { 'os_network_compute': } class { 'os_compute_hypervisor':