Commit 8f724977 authored by Thomas Goirand's avatar Thomas Goirand

* Set Neutron's global_physnet_mtu and ml2's path_mtu if the VM net network

    has mtu != 0, allowing to set (for example) mtu = 9000.
parent 554721f0
......@@ -29,6 +29,8 @@ openstack-cluster-installer (22) UNRELEASED; urgency=medium
- START_DELAY=4
* Add qemu monitor on port 550XX for each VMs in the PoC.
* Copy swift_fstab_dev_list.sh when provisionning.
* Set Neutron's global_physnet_mtu and ml2's path_mtu if the VM net network
has mtu != 0, allowing to set (for example) mtu = 9000.
[ Oliver Chaze ]
* swift: do not log in syslog general logs
......
......@@ -8,6 +8,7 @@ class oci::compute(
$first_master_ip = undef,
$cluster_domain = undef,
$vmnet_ip = undef,
$vmnet_mtu = undef,
$all_masters = undef,
$all_masters_ip = undef,
$vip_hostname = undef,
......@@ -276,6 +277,12 @@ class oci::compute(
###############
### Neutron ###
###############
if $vmnet_mtu == 0 {
$vmnet_mtu_real = 1500
}else{
$vmnet_mtu_real = $vmnet_mtu
}
class { '::neutron':
default_transport_url => os_transport_url({
'transport' => $messaging_default_proto,
......@@ -303,6 +310,7 @@ class oci::compute(
debug => true,
bind_host => $machine_ip,
notification_driver => 'messagingv2',
global_physnet_mtu => $vmnet_mtu_real,
}
neutron_config {
'nova/cafile': value => '/etc/ssl/certs/oci-pki-oci-ca-chain.pem';
......@@ -356,6 +364,7 @@ class oci::compute(
flat_networks => $external_network_list,
network_vlan_ranges => $external_network_list,
vni_ranges => '1000:9999',
path_mtu => $vmnet_mtu,
}
class { '::neutron::agents::dhcp':
interface_driver => 'openvswitch',
......
......@@ -35,6 +35,7 @@ class oci::controller(
$external_network_list = undef,
$machine_iface = undef,
$vmnet_ip = undef,
$vmnet_mtu = undef,
$is_first_master = false,
$first_master = undef,
$first_master_ip = undef,
......@@ -2304,6 +2305,13 @@ test -e \$mon_data/done
# ensure => installed,
# notify => Anchor['neutron::service::begin'],
# }->
if $vmnet_mtu == 0 {
$vmnet_mtu_real = 1500
}else{
$vmnet_mtu_real = $vmnet_mtu
}
class { '::neutron':
default_transport_url => os_transport_url({
'transport' => $messaging_default_proto,
......@@ -2332,6 +2340,7 @@ test -e \$mon_data/done
cert_file => $neutron_crt_file,
key_file => $neutron_key_file,
notification_driver => 'messagingv2',
global_physnet_mtu => $vmnet_mtu_real,
}
class { '::neutron::client': }
class { '::neutron::keystone::authtoken':
......@@ -2386,9 +2395,9 @@ test -e \$mon_data/done
extensions => '',
}
neutron_l3_agent_config {
'DEFAULT/external_network_bridge': value => '';
}
neutron_l3_agent_config {
'DEFAULT/external_network_bridge': value => '';
}
class { '::neutron::plugins::ml2':
type_drivers => ['flat', 'vxlan', 'vlan', ],
......@@ -2399,6 +2408,7 @@ test -e \$mon_data/done
flat_networks => $external_network_list,
network_vlan_ranges => $external_network_list,
vni_ranges => '1000:9999',
path_mtu => $vmnet_mtu,
}
class { '::neutron::services::lbaas::octavia':
......
......@@ -481,7 +481,7 @@ function api_actions($con,$conf){
}
// Get the IP for VM trafic.
$q = "SELECT machines.hostname AS hostname, INET_NTOA(ips.ip) AS ipaddr FROM machines, ips, networks WHERE machines.id='$machine_id' AND machines.cluster='$cluster_id' AND machines.id=ips.machine AND ips.network=networks.id AND networks.is_public='no' AND networks.role='vm-net'";
$q = "SELECT machines.hostname AS hostname, INET_NTOA(ips.ip) AS ipaddr, networks.mtu AS mtu FROM machines, ips, networks WHERE machines.id='$machine_id' AND machines.cluster='$cluster_id' AND machines.id=ips.machine AND ips.network=networks.id AND networks.is_public='no' AND networks.role='vm-net'";
$r = mysqli_query($con, $q);
if($r === FALSE){
$json["status"] = "error";
......@@ -492,10 +492,13 @@ function api_actions($con,$conf){
if($n == 1){
$vmnet_ip_array = mysqli_fetch_array($r);
$vmnet_ip = $vmnet_ip_array["ipaddr"];
$vmnet_mtu = $vmnet_ip_array["mtu"];
$enc_file .= " vmnet_ip: $vmnet_ip\n";
$enc_file .= " vmnet_mtu: $vmnet_mtu\n";
// If we don't find a VMNet IP, then let's use the management network IP instead.
}else{
$enc_file .= " vmnet_ip: $machine_ip\n";
$enc_file .= " vmnet_mtu: 0\n";
}
$enc_file .= " is_first_master: $is_first_master\n";
......@@ -973,7 +976,7 @@ function api_actions($con,$conf){
$enc_file .= " cluster_domain: $cluster_domain\n";
// Get the IP for VM trafic.
$q = "SELECT machines.hostname AS hostname, INET_NTOA(ips.ip) AS ipaddr FROM machines, ips, networks WHERE machines.id='$machine_id' AND machines.cluster='$cluster_id' AND machines.id=ips.machine AND ips.network=networks.id AND networks.is_public='no' AND networks.role='vm-net'";
$q = "SELECT machines.hostname AS hostname, INET_NTOA(ips.ip) AS ipaddr, networks.mtu AS mtu FROM machines, ips, networks WHERE machines.id='$machine_id' AND machines.cluster='$cluster_id' AND machines.id=ips.machine AND ips.network=networks.id AND networks.is_public='no' AND networks.role='vm-net'";
$r = mysqli_query($con, $q);
if($r === FALSE){
$json["status"] = "error";
......@@ -984,10 +987,13 @@ function api_actions($con,$conf){
if($n == 1){
$vmnet_ip_array = mysqli_fetch_array($r);
$vmnet_ip = $vmnet_ip_array["ipaddr"];
$vmnet_mtu = $vmnet_ip_array["mtu"];
$enc_file .= " vmnet_ip: $vmnet_ip\n";
$enc_file .= " vmnet_mtu: $vmnet_mtu\n";
// If we don't find a VMNet IP, then let's use the management network IP instead.
}else{
$enc_file .= " vmnet_ip: $machine_ip\n";
$enc_file .= " vmnet_mtu: 0\n";
}
$enc_file .= $enc_amhn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment