Change plugin to support 9.2
There is few changes in the MOS 9.2. So plugin should be changed too. Change-Id: I7080934a164c2abf5b71b18d0fbda52f5d46b552 Closes-bug: #1644861
This commit is contained in:
parent
5a936abd65
commit
0e54ab7b1b
|
@ -101,20 +101,6 @@ define vmware_dvs::agent(
|
||||||
$fw_driver = 'networking_vsphere.agent.firewalls.noop_firewall.NoopvCenterFirewallDriver'
|
$fw_driver = 'networking_vsphere.agent.firewalls.noop_firewall.NoopvCenterFirewallDriver'
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! defined(File["${py_root}/nova.patch"]) {
|
|
||||||
file {"${py_root}/nova.patch":
|
|
||||||
source => 'puppet:///modules/vmware_dvs/nova.patch',
|
|
||||||
notify => Exec['apply-nova-patch'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ! defined(Exec['apply-nova-patch']) {
|
|
||||||
exec {'apply-nova-patch':
|
|
||||||
path => '/usr/bin:/usr/sbin:/bin:/sbin',
|
|
||||||
command => "patch -d ${py_root} -N -p1 < ${py_root}/nova.patch",
|
|
||||||
refreshonly => true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! empty($vcenter_ca_content) and ! $vsphere_insecure {
|
if ! empty($vcenter_ca_content) and ! $vsphere_insecure {
|
||||||
$agent_vcenter_ca_filepath = $vcenter_ca_filepath
|
$agent_vcenter_ca_filepath = $vcenter_ca_filepath
|
||||||
$agent_vcenter_insecure_real = false
|
$agent_vcenter_insecure_real = false
|
||||||
|
|
|
@ -2,26 +2,17 @@ class vmware_dvs::l2 {
|
||||||
|
|
||||||
$use_neutron = hiera('use_neutron', false)
|
$use_neutron = hiera('use_neutron', false)
|
||||||
|
|
||||||
if $use_neutron {
|
|
||||||
# override neutron options
|
|
||||||
$override_configuration = hiera_hash('configuration', {})
|
|
||||||
override_resources { 'neutron_agent_ovs':
|
|
||||||
data => $override_configuration['neutron_agent_ovs']
|
|
||||||
} ~> Service['neutron-ovs-agent-service']
|
|
||||||
}
|
|
||||||
|
|
||||||
if $use_neutron {
|
if $use_neutron {
|
||||||
include ::neutron::params
|
include ::neutron::params
|
||||||
|
|
||||||
$node_name = hiera('node_name')
|
$node_name = hiera('node_name')
|
||||||
$neutron_primary_controller_roles = hiera('neutron_primary_controller_roles', ['primary-controller'])
|
|
||||||
$neutron_compute_roles = hiera('neutron_compute_nodes', ['compute'])
|
$neutron_compute_roles = hiera('neutron_compute_nodes', ['compute'])
|
||||||
$primary_controller = roles_include($neutron_primary_controller_roles)
|
$primary_neutron = has_primary_role(intersection(hiera('neutron_roles'), hiera('roles')))
|
||||||
$compute = roles_include($neutron_compute_roles)
|
$compute = roles_include($neutron_compute_roles)
|
||||||
|
|
||||||
$neutron_config = hiera_hash('neutron_config')
|
$neutron_config = hiera_hash('neutron_config')
|
||||||
$neutron_server_enable = pick($neutron_config['neutron_server_enable'], true)
|
$neutron_server_enable = pick($neutron_config['neutron_server_enable'], true)
|
||||||
$neutron_nodes = hiera_hash('neutron_nodes')
|
$neutron_nodes = hiera_hash('neutron_nodes')
|
||||||
|
|
||||||
$dpdk_config = hiera_hash('dpdk', {})
|
$dpdk_config = hiera_hash('dpdk', {})
|
||||||
$enable_dpdk = pick($dpdk_config['enabled'], false)
|
$enable_dpdk = pick($dpdk_config['enabled'], false)
|
||||||
|
@ -45,10 +36,10 @@ class vmware_dvs::l2 {
|
||||||
prepare_network_config($network_scheme)
|
prepare_network_config($network_scheme)
|
||||||
|
|
||||||
$neutron_advanced_config = hiera_hash('neutron_advanced_configuration', { })
|
$neutron_advanced_config = hiera_hash('neutron_advanced_configuration', { })
|
||||||
$l2_population = try_get_value($neutron_advanced_config, 'neutron_l2_pop', false)
|
$l2_population = try_get_value($neutron_advanced_config, 'neutron_l2_pop', false)
|
||||||
$dvr = try_get_value($neutron_advanced_config, 'neutron_dvr', false)
|
$dvr = try_get_value($neutron_advanced_config, 'neutron_dvr', false)
|
||||||
$enable_qos = pick($neutron_advanced_config['neutron_qos'], false)
|
$enable_qos = pick($neutron_advanced_config['neutron_qos'], false)
|
||||||
$segmentation_type = try_get_value($neutron_config, 'L2/segmentation_type')
|
$segmentation_type = try_get_value($neutron_config, 'L2/segmentation_type')
|
||||||
|
|
||||||
if $compute and ! $dvr {
|
if $compute and ! $dvr {
|
||||||
$do_floating = false
|
$do_floating = false
|
||||||
|
@ -69,11 +60,11 @@ class vmware_dvs::l2 {
|
||||||
})
|
})
|
||||||
|
|
||||||
if $segmentation_type == 'vlan' {
|
if $segmentation_type == 'vlan' {
|
||||||
$net_role_property = 'neutron/private'
|
$net_role_property = 'neutron/private'
|
||||||
$iface = get_network_role_property($net_role_property, 'phys_dev')
|
$iface = get_network_role_property($net_role_property, 'phys_dev')
|
||||||
$enable_tunneling = false
|
$enable_tunneling = false
|
||||||
$network_type = 'vlan'
|
$network_type = 'vlan'
|
||||||
$tunnel_types = []
|
$tunnel_types = []
|
||||||
} else {
|
} else {
|
||||||
$net_role_property = 'neutron/mesh'
|
$net_role_property = 'neutron/mesh'
|
||||||
$tunneling_ip = get_network_role_property($net_role_property, 'ipaddr')
|
$tunneling_ip = get_network_role_property($net_role_property, 'ipaddr')
|
||||||
|
@ -81,11 +72,11 @@ class vmware_dvs::l2 {
|
||||||
$physical_net_mtu = pick(get_transformation_property('mtu', $iface[0]), '1500')
|
$physical_net_mtu = pick(get_transformation_property('mtu', $iface[0]), '1500')
|
||||||
|
|
||||||
if $segmentation_type == 'gre' {
|
if $segmentation_type == 'gre' {
|
||||||
$mtu_offset = '42'
|
$mtu_offset = '42'
|
||||||
$network_type = 'gre'
|
$network_type = 'gre'
|
||||||
} else {
|
} else {
|
||||||
# vxlan is the default segmentation type for non-vlan cases
|
# vxlan is the default segmentation type for non-vlan cases
|
||||||
$mtu_offset = '50'
|
$mtu_offset = '50'
|
||||||
$network_type = 'vxlan'
|
$network_type = 'vxlan'
|
||||||
}
|
}
|
||||||
$tunnel_types = [$network_type]
|
$tunnel_types = [$network_type]
|
||||||
|
@ -93,23 +84,22 @@ class vmware_dvs::l2 {
|
||||||
$enable_tunneling = true
|
$enable_tunneling = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# DPDK settings on compute node
|
||||||
if $enable_dpdk and $compute {
|
if $enable_dpdk and $compute {
|
||||||
neutron_agent_ovs {
|
$firewall_driver = 'openvswitch'
|
||||||
'securitygroup/enable_security_group': value => false;
|
|
||||||
}
|
|
||||||
$firewall_driver = 'neutron.agent.firewall.NoopFirewallDriver'
|
|
||||||
$ovs_datapath_type = 'netdev'
|
$ovs_datapath_type = 'netdev'
|
||||||
$ovs_vhostuser_socket_dir = '/var/run/openvswitch'
|
$ovs_vhostuser_socket_dir = '/var/run/openvswitch'
|
||||||
} else {
|
} else {
|
||||||
neutron_agent_ovs {
|
$firewall_driver = hiera('security_groups', 'iptables_hybrid')
|
||||||
'securitygroup/enable_security_group': value => true;
|
|
||||||
}
|
|
||||||
$firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
|
||||||
# Leave default values when passed to the class
|
# Leave default values when passed to the class
|
||||||
$ovs_datapath_type = undef
|
$ovs_datapath_type = undef
|
||||||
$ovs_vhostuser_socket_dir = undef
|
$ovs_vhostuser_socket_dir = undef
|
||||||
}
|
}
|
||||||
|
|
||||||
|
neutron_agent_ovs {
|
||||||
|
'securitygroup/enable_security_group': value => true;
|
||||||
|
}
|
||||||
|
|
||||||
Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service']
|
Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service']
|
||||||
|
|
||||||
class { '::neutron::agents::ml2::ovs':
|
class { '::neutron::agents::ml2::ovs':
|
||||||
|
@ -129,7 +119,7 @@ class vmware_dvs::l2 {
|
||||||
enabled => true,
|
enabled => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
if str2bool(inline_template('<%= @neutron_nodes.values.keep_if {|h| h["name"] == @node_name}.length > 0%>')) {
|
if $node_name in keys($neutron_nodes) {
|
||||||
if $neutron_server_enable {
|
if $neutron_server_enable {
|
||||||
$service_ensure = 'running'
|
$service_ensure = 'running'
|
||||||
} else {
|
} else {
|
||||||
|
@ -137,9 +127,9 @@ class vmware_dvs::l2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'neutron-server':
|
service { 'neutron-server':
|
||||||
ensure => $service_ensure,
|
|
||||||
name => $::neutron::params::server_service,
|
name => $::neutron::params::server_service,
|
||||||
enable => $neutron_server_enable,
|
enable => $neutron_server_enable,
|
||||||
|
ensure => $service_ensure,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
tag => 'neutron-service',
|
tag => 'neutron-service',
|
||||||
|
@ -167,15 +157,15 @@ class vmware_dvs::l2 {
|
||||||
if $ha_agent {
|
if $ha_agent {
|
||||||
#Exec<| title == 'waiting-for-neutron-api' |> ->
|
#Exec<| title == 'waiting-for-neutron-api' |> ->
|
||||||
class { '::cluster::neutron::ovs' :
|
class { '::cluster::neutron::ovs' :
|
||||||
primary => $primary_controller,
|
primary => $primary_neutron,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stub for upstream neutron manifests
|
# Stub for upstream neutron manifests
|
||||||
package { 'neutron':
|
package { 'neutron':
|
||||||
ensure => 'installed',
|
|
||||||
name => 'binutils',
|
name => 'binutils',
|
||||||
|
ensure => 'installed',
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
groups: ['primary-controller','controller','compute-vmware']
|
groups: ['primary-controller','controller','compute-vmware']
|
||||||
required_for: [openstack-network-networks,vmware-vcenter]
|
required_for: [openstack-network-networks,vmware-vcenter]
|
||||||
requires: [vmware-dvs-network-common-config]
|
requires: [vmware-dvs-network-common-config, vmware-dvs-setup-neutron-plugin]
|
||||||
type: puppet
|
type: puppet
|
||||||
parameters:
|
parameters:
|
||||||
puppet_manifest: puppet/manifests/agents.pp
|
puppet_manifest: puppet/manifests/agents.pp
|
||||||
|
|
|
@ -3,7 +3,7 @@ name: fuel-plugin-vmware-dvs
|
||||||
# Human-readable name for your plugin
|
# Human-readable name for your plugin
|
||||||
title: Neutron VMware DVS ML2 plugin
|
title: Neutron VMware DVS ML2 plugin
|
||||||
# Plugin version
|
# Plugin version
|
||||||
version: '3.1.0'
|
version: '3.2.0'
|
||||||
# Description
|
# Description
|
||||||
description: Enable to use plugin vmware_dvs for Neutron
|
description: Enable to use plugin vmware_dvs for Neutron
|
||||||
# Required fuel version
|
# Required fuel version
|
||||||
|
|
Loading…
Reference in New Issue