Browse Source

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
Igor Gajsin 2 years ago
parent
commit
0e54ab7b1b

+ 0
- 14
deployment_scripts/puppet/modules/vmware_dvs/manifests/agent.pp View File

@@ -101,20 +101,6 @@ define vmware_dvs::agent(
101 101
     $fw_driver = 'networking_vsphere.agent.firewalls.noop_firewall.NoopvCenterFirewallDriver'
102 102
   }
103 103
 
104
-  if ! defined(File["${py_root}/nova.patch"]) {
105
-    file {"${py_root}/nova.patch":
106
-      source => 'puppet:///modules/vmware_dvs/nova.patch',
107
-      notify => Exec['apply-nova-patch'],
108
-    }
109
-  }
110
-  if ! defined(Exec['apply-nova-patch']) {
111
-    exec {'apply-nova-patch':
112
-      path        => '/usr/bin:/usr/sbin:/bin:/sbin',
113
-      command     => "patch -d ${py_root} -N -p1 < ${py_root}/nova.patch",
114
-      refreshonly => true,
115
-    }
116
-  }
117
-
118 104
   if ! empty($vcenter_ca_content) and ! $vsphere_insecure {
119 105
     $agent_vcenter_ca_filepath   = $vcenter_ca_filepath
120 106
     $agent_vcenter_insecure_real = false

+ 25
- 35
deployment_scripts/puppet/modules/vmware_dvs/manifests/l2.pp View File

@@ -2,26 +2,17 @@ class vmware_dvs::l2 {
2 2
 
3 3
   $use_neutron = hiera('use_neutron', false)
4 4
 
5
-  if $use_neutron {
6
-    # override neutron options
7
-    $override_configuration = hiera_hash('configuration', {})
8
-    override_resources { 'neutron_agent_ovs':
9
-      data => $override_configuration['neutron_agent_ovs']
10
-    } ~> Service['neutron-ovs-agent-service']
11
-  }
12
-
13 5
   if $use_neutron {
14 6
     include ::neutron::params
15 7
 
16 8
     $node_name = hiera('node_name')
17
-    $neutron_primary_controller_roles = hiera('neutron_primary_controller_roles', ['primary-controller'])
18 9
     $neutron_compute_roles            = hiera('neutron_compute_nodes', ['compute'])
19
-    $primary_controller               = roles_include($neutron_primary_controller_roles)
10
+    $primary_neutron                  = has_primary_role(intersection(hiera('neutron_roles'), hiera('roles')))
20 11
     $compute                          = roles_include($neutron_compute_roles)
21 12
 
22
-    $neutron_config        = hiera_hash('neutron_config')
13
+    $neutron_config = hiera_hash('neutron_config')
23 14
     $neutron_server_enable = pick($neutron_config['neutron_server_enable'], true)
24
-    $neutron_nodes         = hiera_hash('neutron_nodes')
15
+    $neutron_nodes = hiera_hash('neutron_nodes')
25 16
 
26 17
     $dpdk_config = hiera_hash('dpdk', {})
27 18
     $enable_dpdk = pick($dpdk_config['enabled'], false)
@@ -45,10 +36,10 @@ class vmware_dvs::l2 {
45 36
     prepare_network_config($network_scheme)
46 37
 
47 38
     $neutron_advanced_config = hiera_hash('neutron_advanced_configuration', { })
48
-    $l2_population           = try_get_value($neutron_advanced_config, 'neutron_l2_pop', false)
49
-    $dvr                     = try_get_value($neutron_advanced_config, 'neutron_dvr', false)
50
-    $enable_qos              = pick($neutron_advanced_config['neutron_qos'], false)
51
-    $segmentation_type       = try_get_value($neutron_config, 'L2/segmentation_type')
39
+    $l2_population     = try_get_value($neutron_advanced_config, 'neutron_l2_pop', false)
40
+    $dvr               = try_get_value($neutron_advanced_config, 'neutron_dvr', false)
41
+    $enable_qos        = pick($neutron_advanced_config['neutron_qos'], false)
42
+    $segmentation_type = try_get_value($neutron_config, 'L2/segmentation_type')
52 43
 
53 44
     if $compute and ! $dvr {
54 45
       $do_floating = false
@@ -69,11 +60,11 @@ class vmware_dvs::l2 {
69 60
     })
70 61
 
71 62
     if $segmentation_type == 'vlan' {
72
-      $net_role_property = 'neutron/private'
73
-      $iface             = get_network_role_property($net_role_property, 'phys_dev')
74
-      $enable_tunneling  = false
75
-      $network_type      = 'vlan'
76
-      $tunnel_types      = []
63
+      $net_role_property    = 'neutron/private'
64
+      $iface                = get_network_role_property($net_role_property, 'phys_dev')
65
+      $enable_tunneling = false
66
+      $network_type = 'vlan'
67
+      $tunnel_types = []
77 68
     } else {
78 69
       $net_role_property = 'neutron/mesh'
79 70
       $tunneling_ip      = get_network_role_property($net_role_property, 'ipaddr')
@@ -81,11 +72,11 @@ class vmware_dvs::l2 {
81 72
       $physical_net_mtu  = pick(get_transformation_property('mtu', $iface[0]), '1500')
82 73
 
83 74
       if $segmentation_type == 'gre' {
84
-        $mtu_offset   = '42'
75
+        $mtu_offset = '42'
85 76
         $network_type = 'gre'
86 77
       } else {
87 78
         # vxlan is the default segmentation type for non-vlan cases
88
-        $mtu_offset   = '50'
79
+        $mtu_offset = '50'
89 80
         $network_type = 'vxlan'
90 81
       }
91 82
       $tunnel_types = [$network_type]
@@ -93,23 +84,22 @@ class vmware_dvs::l2 {
93 84
       $enable_tunneling = true
94 85
     }
95 86
 
87
+    # DPDK settings on compute node
96 88
     if $enable_dpdk and $compute {
97
-      neutron_agent_ovs {
98
-        'securitygroup/enable_security_group': value => false;
99
-      }
100
-      $firewall_driver          = 'neutron.agent.firewall.NoopFirewallDriver'
89
+      $firewall_driver          = 'openvswitch'
101 90
       $ovs_datapath_type        = 'netdev'
102 91
       $ovs_vhostuser_socket_dir = '/var/run/openvswitch'
103 92
     } else {
104
-      neutron_agent_ovs {
105
-        'securitygroup/enable_security_group': value  => true;
106
-      }
107
-      $firewall_driver          = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
93
+      $firewall_driver          = hiera('security_groups', 'iptables_hybrid')
108 94
       # Leave default values when passed to the class
109 95
       $ovs_datapath_type        = undef
110 96
       $ovs_vhostuser_socket_dir = undef
111 97
     }
112 98
 
99
+    neutron_agent_ovs {
100
+      'securitygroup/enable_security_group': value => true;
101
+    }
102
+
113 103
     Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service']
114 104
 
115 105
     class { '::neutron::agents::ml2::ovs':
@@ -129,7 +119,7 @@ class vmware_dvs::l2 {
129 119
       enabled                    => true,
130 120
     }
131 121
 
132
-    if str2bool(inline_template('<%= @neutron_nodes.values.keep_if {|h| h["name"] == @node_name}.length > 0%>')) {
122
+    if $node_name in keys($neutron_nodes) {
133 123
       if $neutron_server_enable {
134 124
         $service_ensure = 'running'
135 125
       } else {
@@ -137,9 +127,9 @@ class vmware_dvs::l2 {
137 127
       }
138 128
 
139 129
       service { 'neutron-server':
140
-        ensure     => $service_ensure,
141 130
         name       => $::neutron::params::server_service,
142 131
         enable     => $neutron_server_enable,
132
+        ensure     => $service_ensure,
143 133
         hasstatus  => true,
144 134
         hasrestart => true,
145 135
         tag        => 'neutron-service',
@@ -167,15 +157,15 @@ class vmware_dvs::l2 {
167 157
       if $ha_agent {
168 158
         #Exec<| title == 'waiting-for-neutron-api' |> ->
169 159
         class { '::cluster::neutron::ovs' :
170
-          primary => $primary_controller,
160
+          primary => $primary_neutron,
171 161
         }
172 162
       }
173 163
     }
174 164
 
175 165
     # Stub for upstream neutron manifests
176 166
     package { 'neutron':
177
-      ensure => 'installed',
178 167
       name   => 'binutils',
168
+      ensure => 'installed',
179 169
     }
180 170
 
181 171
   }

+ 1
- 1
deployment_tasks.yaml View File

@@ -24,7 +24,7 @@
24 24
   version: 2.1.0
25 25
   groups: ['primary-controller','controller','compute-vmware']
26 26
   required_for: [openstack-network-networks,vmware-vcenter]
27
-  requires: [vmware-dvs-network-common-config]
27
+  requires: [vmware-dvs-network-common-config, vmware-dvs-setup-neutron-plugin]
28 28
   type: puppet
29 29
   parameters:
30 30
     puppet_manifest: puppet/manifests/agents.pp

+ 1
- 1
metadata.yaml View File

@@ -3,7 +3,7 @@ name: fuel-plugin-vmware-dvs
3 3
 # Human-readable name for your plugin
4 4
 title: Neutron VMware DVS ML2 plugin
5 5
 # Plugin version
6
-version: '3.1.0'
6
+version: '3.2.0'
7 7
 # Description
8 8
 description: Enable to use plugin vmware_dvs for Neutron
9 9
 # Required fuel version

Loading…
Cancel
Save