aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/manifests/overcloud_controller_pacemaker.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/manifests/overcloud_controller_pacemaker.pp')
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp162
1 files changed, 133 insertions, 29 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index 6c8530ff..d0d46e2d 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -592,8 +592,54 @@ if hiera('step') >= 3 {
}
include ::nova::network::neutron
- # Neutron class definitions
- include ::neutron
+ if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
+
+ # TODO(devvesa) provide non-controller ips for these services
+ $zookeeper_node_ips = hiera('neutron_api_node_ips')
+ $cassandra_node_ips = hiera('neutron_api_node_ips')
+
+ # Run zookeeper in the controller if configured
+ if hiera('enable_zookeeper_on_controller') {
+ class {'::tripleo::cluster::zookeeper':
+ zookeeper_server_ips => $zookeeper_node_ips,
+ zookeeper_client_ip => $ipaddress,
+ zookeeper_hostnames => hiera('controller_node_names')
+ }
+ }
+
+ # Run cassandra in the controller if configured
+ if hiera('enable_cassandra_on_controller') {
+ class {'::tripleo::cluster::cassandra':
+ cassandra_servers => $cassandra_node_ips,
+ cassandra_ip => $ipaddress
+ }
+ }
+
+ class {'::tripleo::network::midonet::agent':
+ zookeeper_servers => $zookeeper_node_ips,
+ cassandra_seeds => $cassandra_node_ips
+ }
+
+ class {'::tripleo::network::midonet::api':
+ zookeeper_servers => hiera('neutron_api_node_ips'),
+ vip => $public_vip,
+ keystone_ip => $public_vip,
+ keystone_admin_token => hiera('keystone::admin_token'),
+ bind_address => $ipaddress,
+ admin_password => hiera('admin_password')
+ }
+
+ # Configure Neutron
+ class {'::neutron':
+ service_plugins => []
+ }
+
+ }
+ else {
+ # Neutron class definitions
+ include ::neutron
+ }
+
class { '::neutron::server' :
sync_db => $sync_db,
manage_service => false,
@@ -603,6 +649,13 @@ if hiera('step') >= 3 {
if hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' {
include ::neutron::plugins::nuage
}
+ if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
+ class {'::neutron::plugins::midonet':
+ midonet_api_ip => $public_vip,
+ keystone_tenant => hiera('neutron::server::auth_tenant'),
+ keystone_password => hiera('neutron::server::auth_password')
+ }
+ }
if hiera('neutron::enable_dhcp_agent',true) {
class { '::neutron::agents::dhcp' :
manage_service => false,
@@ -628,27 +681,20 @@ if hiera('step') >= 3 {
enabled => false,
}
}
- if hiera('neutron::core_plugin') == 'ml2' {
- class { '::neutron::plugins::ml2':
- flat_networks => split(hiera('neutron_flat_networks'), ','),
- 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'), ','),
- }
+ include ::neutron::plugins::ml2
+ class { '::neutron::agents::ml2::ovs':
+ manage_service => false,
+ enabled => false,
}
- if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') {
+
+ if 'cisco_ucsm' in hiera('neutron::plugins::ml2::mechanism_drivers') {
include ::neutron::plugins::ml2::cisco::ucsm
}
- if 'cisco_nexus' in hiera('neutron_mechanism_drivers') {
+ if 'cisco_nexus' in hiera('neutron::plugins::ml2::mechanism_drivers') {
include ::neutron::plugins::ml2::cisco::nexus
include ::neutron::plugins::ml2::cisco::type_nexus_vxlan
}
- if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
+ if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
include ::neutron::plugins::ml2::cisco::nexus1000v
class { '::neutron::agents::n1kv_vem':
@@ -896,7 +942,7 @@ if hiera('step') >= 3 {
# service_manage => false, # <-- not supported with horizon&apache mod_wsgi?
}
include ::apache::mod::status
- if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
+ if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
$_profile_support = 'cisco'
} else {
$_profile_support = 'None'
@@ -1060,15 +1106,32 @@ if hiera('step') >= 4 {
Pacemaker::Resource::Service[$::glance::params::api_service_name]],
}
- # Neutron
- # NOTE(gfidente): Neutron will try to populate the database with some data
- # as soon as neutron-server is started; to avoid races we want to make this
- # happen only on one node, before normal Pacemaker initialization
- # https://bugzilla.redhat.com/show_bug.cgi?id=1233061
- exec { '/usr/bin/systemctl start neutron-server && /usr/bin/sleep 5' : } ->
- pacemaker::resource::service { $::neutron::params::server_service:
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Service[$::keystone::params::service_name],
+ if hiera('step') == 4 {
+ # Neutron
+ # NOTE(gfidente): Neutron will try to populate the database with some data
+ # as soon as neutron-server is started; to avoid races we want to make this
+ # happen only on one node, before normal Pacemaker initialization
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1233061
+ # NOTE(emilien): we need to run this Exec only at Step 4 otherwise this exec
+ # will try to start the service while it's already started by Pacemaker
+ # It would result to a deployment failure since systemd would return 1 to Puppet
+ # and the overcloud would fail to deploy (6 would be returned).
+ # This conditional prevents from a race condition during the deployment.
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1290582
+ exec { 'neutron-server-systemd-start-sleep' :
+ command => 'systemctl start neutron-server && /usr/bin/sleep 5',
+ path => '/usr/bin',
+ unless => '/sbin/pcs resource show neutron-server',
+ } ->
+ pacemaker::resource::service { $::neutron::params::server_service:
+ clone_params => 'interleave=true',
+ require => Pacemaker::Resource::Service[$::keystone::params::service_name]
+ }
+ } else {
+ pacemaker::resource::service { $::neutron::params::server_service:
+ clone_params => 'interleave=true',
+ require => Pacemaker::Resource::Service[$::keystone::params::service_name]
+ }
}
if hiera('neutron::enable_l3_agent', true) {
pacemaker::resource::service { $::neutron::params::l3_agent_service:
@@ -1085,6 +1148,11 @@ if hiera('step') >= 4 {
clone_params => 'interleave=true',
}
}
+ if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
+ pacemaker::resource::service {'tomcat':
+ clone_params => 'interleave=true',
+ }
+ }
if hiera('neutron::enable_metadata_agent', true) {
pacemaker::resource::service { $::neutron::params::metadata_agent_service:
clone_params => 'interleave=true',
@@ -1135,7 +1203,6 @@ if hiera('step') >= 4 {
}
}
- #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",
@@ -1211,6 +1278,43 @@ if hiera('step') >= 4 {
Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]]
}
}
+ if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
+ #midonet-chain chain keystone-->neutron-server-->dhcp-->metadata->tomcat
+ pacemaker::constraint::base { 'neutron-server-to-dhcp-agent-constraint':
+ constraint_type => 'order',
+ first_resource => "${::neutron::params::server_service}-clone",
+ second_resource => "${::neutron::params::dhcp_agent_service}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
+ Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
+ }
+ pacemaker::constraint::base { 'neutron-dhcp-agent-to-metadata-agent-constraint':
+ constraint_type => 'order',
+ first_resource => "${::neutron::params::dhcp_agent_service}-clone",
+ second_resource => "${::neutron::params::metadata_agent_service}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
+ Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
+ }
+ pacemaker::constraint::base { 'neutron-metadata-agent-to-tomcat-constraint':
+ constraint_type => 'order',
+ first_resource => "${::neutron::params::metadata_agent_service}-clone",
+ second_resource => 'tomcat-clone',
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service],
+ Pacemaker::Resource::Service['tomcat']],
+ }
+ pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-metadata-agent-colocation':
+ source => "${::neutron::params::metadata_agent_service}-clone",
+ target => "${::neutron::params::dhcp_agent_service}-clone",
+ score => 'INFINITY',
+ require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
+ Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
+ }
+ }
# Nova
pacemaker::resource::service { $::nova::params::api_service_name :
@@ -1503,7 +1607,7 @@ if hiera('step') >= 4 {
}
#VSM
- if 'cisco_n1kv' in hiera('neutron_mechanism_drivers') {
+ if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
pacemaker::resource::ocf { 'vsm-p' :
ocf_agent_name => 'heartbeat:VirtualDomain',
resource_params => 'force_stop=true config=/var/spool/cisco/vsm/vsm_primary_deploy.xml',