summaryrefslogtreecommitdiffstats
path: root/build/opendaylight.patch
blob: 5376665c187b3641fa9c87225df9a55a863dd3d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
From bdaa77b2b92f470fe0bc6b18bff5f2af1f7b65cf Mon Sep 17 00:00:00 2001
From: Tim Rozet <tdrozet@gmail.com>
Date: Tue, 23 Jun 2015 17:46:00 -0400
Subject: [PATCH] Adds OpenDaylight support

To enable set neturon Mechanism Drivers to opendaylight via ExtraConfig:
 -  EnableOpenDaylight (used to enable ODL, defaults to false)
 -  OpenDaylightPort (used to define ODL REST Port, default 8081)

Change-Id: I2a4c5b69ee0ad70d2372cad23b9af0890715c85f
Signed-off-by: Dan Radez <dradez@redhat.com>
---
 environments/opendaylight.yaml                     |   4 +
 puppet/compute.yaml                                |   6 +
 puppet/controller.yaml                             |   8 +
 puppet/manifests/overcloud_compute.pp              |  31 +++-
 puppet/manifests/overcloud_controller.pp           |  49 +++++-
 puppet/manifests/overcloud_controller_pacemaker.pp | 183 +++++++++++++--------
 6 files changed, 201 insertions(+), 80 deletions(-)
 create mode 100644 environments/opendaylight.yaml

diff --git a/environments/opendaylight.yaml b/environments/opendaylight.yaml
new file mode 100644
index 0000000..39e4aa3
--- /dev/null
+++ b/environments/opendaylight.yaml
@@ -0,0 +1,4 @@
+parameters:
+    ExtraConfig:
+      neutron_mechanism_drivers: ['opendaylight']
+      neutron_tenant_network_type: vxlan
diff --git a/puppet/compute.yaml b/puppet/compute.yaml
index 2b63535..3f20d48 100644
--- a/puppet/compute.yaml
+++ b/puppet/compute.yaml
@@ -221,6 +221,10 @@ parameters:
   NtpServer:
     type: string
     default: ''
+  OpenDaylightPort:
+    default: 8081
+    description: Set opendaylight service port
+    type: number
   RabbitHost:
     type: string
     default: ''  # Has to be here because of the ignored empty value bug
@@ -409,6 +413,7 @@ resources:
                 neutron::rabbit_user: {get_input: rabbit_user}
                 neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
                 neutron::rabbit_port: {get_input: rabbit_client_port}
+                opendaylight_port: {get_input: opendaylight_port}
                 neutron_flat_networks: {get_input: neutron_flat_networks}
                 neutron_host: {get_input: neutron_host}
                 neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
@@ -474,6 +479,7 @@ resources:
               - {get_param: GlanceHost}
               - ':'
               - {get_param: GlancePort}
+        opendaylight_port: {get_param: OpenDaylightPort}
         neutron_flat_networks: {get_param: NeutronFlatNetworks}
         neutron_host: {get_param: NeutronHost}
         neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
diff --git a/puppet/controller.yaml b/puppet/controller.yaml
index 0bb8035..fa0dc3e 100644
--- a/puppet/controller.yaml
+++ b/puppet/controller.yaml
@@ -427,6 +427,10 @@ parameters:
   NtpServer:
     type: string
     default: ''
+  OpenDaylightPort:
+    default: 8081
+    description: Set opendaylight service port
+    type: number
   PcsdPassword:
     type: string
     description: The password for the 'pcsd' user.
@@ -794,6 +798,7 @@ resources:
             template: tripleo-CLUSTER
             params:
               CLUSTER: {get_param: MysqlClusterUniquePart}
+        opendaylight_port: {get_param: OpenDaylightPort}
         neutron_flat_networks: {get_param: NeutronFlatNetworks}
         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
         neutron_agent_mode: {get_param: NeutronAgentMode}
@@ -1136,6 +1141,9 @@ resources:
                 mysql_bind_host: {get_input: mysql_network}
                 mysql_virtual_ip: {get_input: mysql_virtual_ip}
 
+                # OpenDaylight
+                opendaylight_port: {get_input: opendaylight_port}
+
                 # Neutron
                 neutron::bind_host: {get_input: neutron_api_network}
                 neutron::rabbit_password: {get_input: rabbit_password}
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
index 2150bab..9846636 100644
--- a/puppet/manifests/overcloud_compute.pp
+++ b/puppet/manifests/overcloud_compute.pp
@@ -21,6 +21,8 @@ if count(hiera('ntp::servers')) > 0 {
   include ::ntp
 }
 
+$controller_node_ips = split(hiera('controller_node_ips'), ',')
+
 file { ['/etc/libvirt/qemu/networks/autostart/default.xml',
         '/etc/libvirt/qemu/networks/default.xml']:
   ensure => absent,
@@ -74,9 +76,32 @@ class { 'neutron::plugins::ml2':
   tenant_network_types => [hiera('neutron_tenant_network_type')],
 }
 
-class { 'neutron::agents::ml2::ovs':
-  bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
-  tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
+if 'opendaylight' in hiera('neutron_mechanism_drivers') {
+  $opendaylight_port = hiera('opendaylight_port')
+  $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
+
+  exec { 'Wait for NetVirt OVS to come up':
+    command   => "/bin/curl -o /dev/null --fail --silent --head -u admin:admin \
+                  http://${controller_node_ips[0]}:${opendaylight_port}/restconf/operational/network-topology:network-topology",
+    tries     => 20,
+    try_sleep => 60,
+  } ->
+  # OVS manager
+  exec { 'Set OVS Manager to OpenDaylight':
+    command => "/usr/bin/ovs-vsctl set-manager tcp:${controller_node_ips[0]}:6640",
+    unless  => "/usr/bin/ovs-vsctl show | /usr/bin/grep 'Manager \"tcp:${controller_node_ips[0]}:6640\"'",
+  } ->
+  # local ip
+  exec { 'Set local_ip Other Option':
+    command => "/usr/bin/ovs-vsctl set Open_vSwitch $(ovs-vsctl get Open_vSwitch . _uuid) other_config:local_ip=$private_ip",
+    unless  => "/usr/bin/ovs-vsctl list Open_vSwitch | /usr/bin/grep 'local_ip=\"$private_ip\"'",
+  }
+
+} else {
+  class { 'neutron::agents::ml2::ovs':
+    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
+    tunnel_types    => split(hiera('neutron_tunnel_types'), ','),
+  }
 }
 
 if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index c330236..68739a6 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -30,6 +30,13 @@ if hiera('step') >= 1 {
 
 if hiera('step') >= 2 {
 
+  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
+    class {"opendaylight":
+      extra_features => ['odl-ovsdb-openstack', 'odl-dlux-core', 'odl-sfc-core', 'odl-sfc-ui', 'odl-sfc-sb-rest', 'odl-sfc-ovs', 'odl-sfc-netconf', 'odl-sfclisp', 'odl-sfcofl2'],
+      odl_rest_port  => hiera('opendaylight_port'),
+    }
+  }
+
   if count(hiera('ntp::servers')) > 0 {
     include ::ntp
   }
@@ -242,10 +249,45 @@ if hiera('step') >= 3 {
     tenant_network_types => [hiera('neutron_tenant_network_type')],
     mechanism_drivers   => [hiera('neutron_mechanism_drivers')],
   }
-  class { 'neutron::agents::ml2::ovs':
-    bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
-    tunnel_types => split(hiera('neutron_tunnel_types'), ','),
+
+  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
+
+    $opendaylight_port = hiera('opendaylight_port')
+    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
+
+    neutron_plugin_ml2 {
+      'ml2_odl/username':         value => 'admin';
+      'ml2_odl/password':         value => 'admin';
+      'ml2_odl/url':              value => "http://${controller_node_ips[0]}:${opendaylight_port}/controller/nb/v2/neutron";
+    }
+
+    exec { 'Wait for NetVirt OVSDB to come up':
+      command   => "/bin/curl -o /dev/null --fail --silent --head -u admin:admin \
+                    http://${controller_node_ips[0]}:${opendaylight_port}/restconf/operational/network-topology:network-topology",
+      tries     => 20,
+      try_sleep => 60,
+    } ->
+    # OVS manager
+    exec { 'Set OVS Manager to OpenDaylight':
+      command => "/usr/bin/ovs-vsctl set-manager tcp:${controller_node_ips[0]}:6640",
+      unless  => "/usr/bin/ovs-vsctl show | /usr/bin/grep 'Manager \"tcp:${controller_node_ips[0]}:6640\"'",
+    } ->
+    # local ip
+    exec { 'Set local_ip Other Option':
+      command => "/usr/bin/ovs-vsctl set Open_vSwitch $(ovs-vsctl get Open_vSwitch . _uuid) other_config:local_ip=$private_ip",
+      unless  => "/usr/bin/ovs-vsctl list Open_vSwitch | /usr/bin/grep 'local_ip=\"$private_ip\"'",
+    }
+
+  } else {
+
+    class { 'neutron::agents::ml2::ovs':
+      bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
+      tunnel_types => split(hiera('neutron_tunnel_types'), ','),
+    }
+
+    Service['neutron-server'] -> Service['neutron-ovs-agent-service']
   }
+
   if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
     include neutron::plugins::ml2::cisco::nexus1000v
 
@@ -281,7 +323,6 @@ if hiera('step') >= 3 {
 
   Service['neutron-server'] -> Service['neutron-dhcp-service']
   Service['neutron-server'] -> Service['neutron-l3']
-  Service['neutron-server'] -> Service['neutron-ovs-agent-service']
   Service['neutron-server'] -> Service['neutron-metadata']
 
   include ::cinder
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index b8fa89f..9911285 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -380,6 +380,13 @@ if hiera('step') >= 2 {
 
   }
 
+  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
+    class {"opendaylight":
+      extra_features => ['odl-ovsdb-openstack', 'odl-dlux-core', 'odl-sfc-core', 'odl-sfc-ui', 'odl-sfc-sb-rest', 'odl-sfc-ovs', 'odl-sfc-netconf', 'odl-sfclisp', 'odl-sfcofl2'],
+      odl_rest_port  => hiera('opendaylight_port'),
+    }
+  }
+
   exec { 'galera-ready' :
     command     => '/usr/bin/clustercheck >/dev/null',
     timeout     => 30,
@@ -604,13 +611,42 @@ if hiera('step') >= 3 {
     tenant_network_types => [hiera('neutron_tenant_network_type')],
     mechanism_drivers   => [hiera('neutron_mechanism_drivers')],
   }
-  class { 'neutron::agents::ml2::ovs':
-    manage_service   => false,
-    enabled          => false,
-    bridge_mappings  => split(hiera('neutron_bridge_mappings'), ','),
-    tunnel_types     => split(hiera('neutron_tunnel_types'), ','),
-  }
+  if 'opendaylight' in hiera('neutron_mechanism_drivers') {
+
+    $opendaylight_port = hiera('opendaylight_port')
+    $private_ip = hiera('neutron::agents::ml2::ovs::local_ip')
+
+    neutron_plugin_ml2 {
+      'ml2_odl/username':         value => 'admin';
+      'ml2_odl/password':         value => 'admin';
+      'ml2_odl/url':              value => "http://${controller_node_ips[0]}:${opendaylight_port}/controller/nb/v2/neutron";
+    }
 
+    exec { 'Wait for NetVirt OVSDB to come up':
+      command   => "/bin/curl -o /dev/null --fail --silent --head -u admin:admin \
+                    http://${controller_node_ips[0]}:${opendaylight_port}/restconf/operational/network-topology:network-topology",
+      tries     => 20,
+      try_sleep => 60,
+    } ->
+    # OVS manager
+    exec { 'Set OVS Manager to OpenDaylight':
+      command => "/usr/bin/ovs-vsctl set-manager tcp:${controller_node_ips[0]}:6640",
+      unless  => "/usr/bin/ovs-vsctl show | /usr/bin/grep 'Manager \"tcp:${controller_node_ips[0]}:6640\"'",
+    } ->
+    # local ip
+    exec { 'Set local_ip Other Option':
+      command => "/usr/bin/ovs-vsctl set Open_vSwitch $(ovs-vsctl get Open_vSwitch . _uuid) other_config:local_ip=$private_ip",
+      unless  => "/usr/bin/ovs-vsctl list Open_vSwitch | /usr/bin/grep 'local_ip=\"$private_ip\"'",
+    }
+
+  } else {
+    class { 'neutron::agents::ml2::ovs':
+      manage_service   => false,
+      enabled          => false,
+      bridge_mappings  => split(hiera('neutron_bridge_mappings'), ','),
+      tunnel_types     => split(hiera('neutron_tunnel_types'), ','),
+    }
+  }
   if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
     include ::neutron::plugins::ml2::cisco::ucsm
   }
@@ -1059,56 +1095,13 @@ if hiera('step') >= 4 {
     pacemaker::resource::service { $::neutron::params::dhcp_agent_service:
       clone_params   => "interleave=true",
     }
-    pacemaker::resource::service { $::neutron::params::ovs_agent_service:
-      clone_params => "interleave=true",
-    }
     pacemaker::resource::service { $::neutron::params::metadata_agent_service:
       clone_params => "interleave=true",
     }
-    pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service:
-      ocf_agent_name => "neutron:OVSCleanup",
-      clone_params => "interleave=true",
-    }
     pacemaker::resource::ocf { 'neutron-netns-cleanup':
       ocf_agent_name => "neutron:NetnsCleanup",
       clone_params => "interleave=true",
     }
-
-    # neutron - one chain ovs-cleanup-->netns-cleanup-->ovs-agent
-    pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint':
-      constraint_type => "order",
-      first_resource => "${::neutron::params::ovs_cleanup_service}-clone",
-      second_resource => "neutron-netns-cleanup-clone",
-      first_action => "start",
-      second_action => "start",
-      require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
-                  Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
-    }
-    pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation':
-      source => "neutron-netns-cleanup-clone",
-      target => "${::neutron::params::ovs_cleanup_service}-clone",
-      score => "INFINITY",
-      require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
-                  Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
-    }
-    pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint':
-      constraint_type => "order",
-      first_resource => "neutron-netns-cleanup-clone",
-      second_resource => "${::neutron::params::ovs_agent_service}-clone",
-      first_action => "start",
-      second_action => "start",
-      require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
-                  Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
-    }
-    pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation':
-      source => "${::neutron::params::ovs_agent_service}-clone",
-      target => "neutron-netns-cleanup-clone",
-      score => "INFINITY",
-      require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
-                  Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
-    }
-
-    #another chain keystone-->neutron-server-->ovs-agent-->dhcp-->l3
     pacemaker::constraint::base { 'keystone-to-neutron-server-constraint':
       constraint_type => "order",
       first_resource => "${::keystone::params::service_name}-clone",
@@ -1118,31 +1111,75 @@ if hiera('step') >= 4 {
       require => [Pacemaker::Resource::Service[$::keystone::params::service_name],
                   Pacemaker::Resource::Service[$::neutron::params::server_service]],
     }
-    pacemaker::constraint::base { 'neutron-server-to-openvswitch-agent-constraint':
-      constraint_type => "order",
-      first_resource => "${::neutron::params::server_service}-clone",
-      second_resource => "${::neutron::params::ovs_agent_service}-clone",
-      first_action => "start",
-      second_action => "start",
-      require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
-                  Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
-    }
-    pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint':
-      constraint_type => "order",
-      first_resource => "${::neutron::params::ovs_agent_service}-clone",
-      second_resource => "${::neutron::params::dhcp_agent_service}-clone",
-      first_action => "start",
-      second_action => "start",
-      require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
-                  Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
+    if 'openvswitch' in hiera('neutron_mechanism_drivers') {
+      pacemaker::resource::service { $::neutron::params::ovs_agent_service:
+        clone_params => "interleave=true",
+      }
+      pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service:
+        ocf_agent_name => "neutron:OVSCleanup",
+        clone_params => "interleave=true",
+      }
+      # neutron - one chain ovs-cleanup-->netns-cleanup-->ovs-agent
+      pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint':
+        constraint_type => "order",
+        first_resource => "${::neutron::params::ovs_cleanup_service}-clone",
+        second_resource => "neutron-netns-cleanup-clone",
+        first_action => "start",
+        second_action => "start",
+        require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
+                    Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
+      }
+      pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation':
+        source => "neutron-netns-cleanup-clone",
+        target => "${::neutron::params::ovs_cleanup_service}-clone",
+        score => "INFINITY",
+        require => [Pacemaker::Resource::Ocf["${::neutron::params::ovs_cleanup_service}"],
+                    Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
+      }
+      pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint':
+        constraint_type => "order",
+        first_resource => "neutron-netns-cleanup-clone",
+        second_resource => "${::neutron::params::ovs_agent_service}-clone",
+        first_action => "start",
+        second_action => "start",
+        require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
+                    Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
+      }
+      pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation':
+        source => "${::neutron::params::ovs_agent_service}-clone",
+        target => "neutron-netns-cleanup-clone",
+        score => "INFINITY",
+        require => [Pacemaker::Resource::Ocf["neutron-netns-cleanup"],
+                    Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"]],
+      }
 
-    }
-    pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation':
-      source => "${::neutron::params::dhcp_agent_service}-clone",
-      target => "${::neutron::params::ovs_agent_service}-clone",
-      score => "INFINITY",
-      require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
-                  Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
+      #another chain keystone-->neutron-server-->ovs-agent-->dhcp-->l3
+      pacemaker::constraint::base { 'neutron-server-to-openvswitch-agent-constraint':
+        constraint_type => "order",
+        first_resource => "${::neutron::params::server_service}-clone",
+        second_resource => "${::neutron::params::ovs_agent_service}-clone",
+        first_action => "start",
+        second_action => "start",
+        require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
+                    Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
+      }
+      pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint':
+        constraint_type => "order",
+        first_resource => "${::neutron::params::ovs_agent_service}-clone",
+        second_resource => "${::neutron::params::dhcp_agent_service}-clone",
+        first_action => "start",
+        second_action => "start",
+        require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
+                    Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
+
+      }
+      pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation':
+        source => "${::neutron::params::dhcp_agent_service}-clone",
+        target => "${::neutron::params::ovs_agent_service}-clone",
+        score => "INFINITY",
+        require => [Pacemaker::Resource::Service["${::neutron::params::ovs_agent_service}"],
+                    Pacemaker::Resource::Service["${::neutron::params::dhcp_agent_service}"]],
+      }
     }
     pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
       constraint_type => "order",
-- 
2.5.0