Enable notifications on the overcloud
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_controller_pacemaker.pp
index 0060c0d..89052e5 100644 (file)
@@ -39,7 +39,9 @@ $non_pcmk_start = hiera('step') >= 4
 
 if hiera('step') >= 1 {
 
+  create_resources(kmod::load, hiera('kernel_modules'), {})
   create_resources(sysctl::value, hiera('sysctl_settings'), {})
+  Exec <| tag == 'kmod::load' |>  -> Sysctl <| |>
 
   include ::timezone
 
@@ -134,6 +136,11 @@ if hiera('step') >= 1 {
   $galera_nodes = downcase(hiera('galera_node_names', $::hostname))
   $galera_nodes_count = count(split($galera_nodes, ','))
 
+  # FIXME: due to https://bugzilla.redhat.com/show_bug.cgi?id=1298671 we
+  # set bind-address to a hostname instead of an ip address; to move Mysql
+  # from internal_api on another network we'll have to customize both
+  # MysqlNetwork and ControllerHostnameResolveNetwork in ServiceNetMap
+  $mysql_bind_host = hiera('mysql_bind_host')
   $mysqld_options = {
     'mysqld' => {
       'skip-name-resolve'             => '1',
@@ -143,7 +150,7 @@ if hiera('step') >= 1 {
       'innodb_locks_unsafe_for_binlog'=> '1',
       'query_cache_size'              => '0',
       'query_cache_type'              => '0',
-      'bind-address'                  => hiera('mysql_bind_host'),
+      'bind-address'                  => $::hostname,
       'max_connections'               => hiera('mysql_max_connections'),
       'open_files_limit'              => '-1',
       'wsrep_provider'                => '/usr/lib64/galera/libgalera_smm.so',
@@ -159,6 +166,7 @@ if hiera('step') >= 1 {
       'wsrep_drupal_282555_workaround'=> '0',
       'wsrep_causal_reads'            => '0',
       'wsrep_sst_method'              => 'rsync',
+      'wsrep_provider_options'        => "gmcast.listen_addr=tcp://[${mysql_bind_host}]:4567;",
     },
   }
 
@@ -429,6 +437,9 @@ MYSQL_HOST=localhost\n",
     class { '::nova::db::mysql':
       require => Exec['galera-ready'],
     }
+    class { '::nova::db::mysql_api':
+      require => Exec['galera-ready'],
+    }
     class { '::neutron::db::mysql':
       require => Exec['galera-ready'],
     }
@@ -565,6 +576,10 @@ if hiera('step') >= 3 {
     enabled        => false,
   }
   include join(['::glance::backend::', $glance_backend])
+  $rabbit_port = hiera('rabbitmq::port')
+  class { '::glance::notify::rabbitmq':
+    rabbit_hosts => suffix(hiera('rabbit_node_ips'), ":${rabbit_port}"),
+  }
 
   class { '::nova' :
     memcached_servers => suffix(hiera('memcache_node_ips'), ':11211'),
@@ -574,6 +589,7 @@ if hiera('step') >= 3 {
 
   class { '::nova::api' :
     sync_db        => $sync_db,
+    sync_db_api    => $sync_db,
     manage_service => false,
     enabled        => false,
   }
@@ -610,8 +626,9 @@ if hiera('step') >= 3 {
     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')
+        # TODO: create a 'bind' hiera key for zookeeper
+        zookeeper_client_ip  => hiera('neutron::bind_host'),
+        zookeeper_hostnames  => split(hiera('controller_node_names'), ',')
       }
     }
 
@@ -619,7 +636,8 @@ if hiera('step') >= 3 {
     if hiera('enable_cassandra_on_controller') {
       class {'::tripleo::cluster::cassandra':
         cassandra_servers => $cassandra_node_ips,
-        cassandra_ip      => $ipaddress
+        # TODO: create a 'bind' hiera key for cassandra
+        cassandra_ip      => hiera('neutron::bind_host'),
       }
     }
 
@@ -629,11 +647,12 @@ if hiera('step') >= 3 {
     }
 
     class {'::tripleo::network::midonet::api':
-      zookeeper_servers    => hiera('neutron_api_node_ips'),
-      vip                  => $public_vip,
-      keystone_ip          => $public_vip,
+      zookeeper_servers    => $zookeeper_node_ips,
+      vip                  => hiera('tripleo::loadbalancer::public_virtual_ip'),
+      keystone_ip          => hiera('tripleo::loadbalancer::public_virtual_ip'),
       keystone_admin_token => hiera('keystone::admin_token'),
-      bind_address         => $ipaddress,
+      # TODO: create a 'bind' hiera key for api
+      bind_address         => hiera('neutron::bind_host'),
       admin_password       => hiera('admin_password')
     }
 
@@ -660,7 +679,7 @@ if hiera('step') >= 3 {
   }
   if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
     class {'::neutron::plugins::midonet':
-      midonet_api_ip    => $public_vip,
+      midonet_api_ip    => hiera('tripleo::loadbalancer::public_virtual_ip'),
       keystone_tenant   => hiera('neutron::server::auth_tenant'),
       keystone_password => hiera('neutron::server::auth_password')
     }
@@ -717,8 +736,9 @@ if hiera('step') >= 3 {
     }
   }
 
-  if hiera('neutron_enable_bigswitch_ml2', false) {
+  if 'bsn_ml2' in hiera('neutron::plugins::ml2::mechanism_drivers') {
     include ::neutron::plugins::ml2::bigswitch::restproxy
+    include ::neutron::agents::bigswitch
   }
   neutron_l3_agent_config {
     'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
@@ -726,9 +746,13 @@ if hiera('step') >= 3 {
   neutron_dhcp_agent_config {
     'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false);
   }
+  neutron_config {
+    'DEFAULT/notification_driver': value => 'messaging';
+  }
 
   include ::cinder
   include ::cinder::config
+  include ::tripleo::ssl::cinder_config
   class { '::cinder::api':
     sync_db        => $sync_db,
     manage_service => false,
@@ -743,6 +767,7 @@ if hiera('step') >= 3 {
     enabled        => false,
   }
   include ::cinder::glance
+  include ::cinder::ceilometer
   class { '::cinder::setup_test_volume':
     size => join([hiera('cinder_lvm_loop_device_size'), 'M']),
   }
@@ -786,10 +811,6 @@ if hiera('step') >= 3 {
   if hiera('cinder_enable_eqlx_backend', false) {
     $cinder_eqlx_backend = hiera('cinder::backend::eqlx::volume_backend_name')
 
-    cinder_config {
-      "${cinder_eqlx_backend}/host": value => 'hostgroup';
-    }
-
     cinder::backend::eqlx { $cinder_eqlx_backend :
       volume_backend_name => hiera('cinder::backend::eqlx::volume_backend_name', undef),
       san_ip              => hiera('cinder::backend::eqlx::san_ip', undef),
@@ -797,7 +818,7 @@ if hiera('step') >= 3 {
       san_password        => hiera('cinder::backend::eqlx::san_password', undef),
       san_thin_provision  => hiera('cinder::backend::eqlx::san_thin_provision', undef),
       eqlx_group_name     => hiera('cinder::backend::eqlx::eqlx_group_name', undef),
-      eqlx_pool           => hiera('cinder::backend::eqlx::eqlx_lpool', undef),
+      eqlx_pool           => hiera('cinder::backend::eqlx::eqlx_pool', undef),
       eqlx_use_chap       => hiera('cinder::backend::eqlx::eqlx_use_chap', undef),
       eqlx_chap_login     => hiera('cinder::backend::eqlx::eqlx_chap_login', undef),
       eqlx_chap_password  => hiera('cinder::backend::eqlx::eqlx_san_password', undef),
@@ -807,10 +828,6 @@ if hiera('step') >= 3 {
   if hiera('cinder_enable_dellsc_backend', false) {
     $cinder_dellsc_backend = hiera('cinder::backend::dellsc_iscsi::volume_backend_name')
 
-    cinder_config {
-      "${cinder_dellsc_backend}/host": value => 'hostgroup';
-    }
-
     cinder::backend::dellsc_iscsi{ $cinder_dellsc_backend :
       volume_backend_name   => hiera('cinder::backend::dellsc_iscsi::volume_backend_name', undef),
       san_ip                => hiera('cinder::backend::dellsc_iscsi::san_ip', undef),
@@ -819,7 +836,7 @@ if hiera('step') >= 3 {
       dell_sc_ssn           => hiera('cinder::backend::dellsc_iscsi::dell_sc_ssn', undef),
       iscsi_ip_address      => hiera('cinder::backend::dellsc_iscsi::iscsi_ip_address', undef),
       iscsi_port            => hiera('cinder::backend::dellsc_iscsi::iscsi_port', undef),
-      dell_sc_port          => hiera('cinder::backend::dellsc_iscsi::dell_sc_port', undef),
+      dell_sc_api_port      => hiera('cinder::backend::dellsc_iscsi::dell_sc_api_port', undef),
       dell_sc_server_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_server_folder', undef),
       dell_sc_volume_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_volume_folder', undef),
     }
@@ -828,10 +845,6 @@ if hiera('step') >= 3 {
   if hiera('cinder_enable_netapp_backend', false) {
     $cinder_netapp_backend = hiera('cinder::backend::netapp::title')
 
-    cinder_config {
-      "${cinder_netapp_backend}/host": value => 'hostgroup';
-    }
-
     if hiera('cinder::backend::netapp::nfs_shares', undef) {
       $cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',')
     }
@@ -981,7 +994,8 @@ if hiera('step') >= 3 {
   # Heat
   include ::heat::config
   class { '::heat' :
-    sync_db => $sync_db,
+    sync_db             => $sync_db,
+    notification_driver => 'messaging',
   }
   class { '::heat::api' :
     manage_service => false,
@@ -1406,24 +1420,19 @@ if hiera('step') >= 4 {
     # Nova
     pacemaker::resource::service { $::nova::params::api_service_name :
       clone_params => 'interleave=true',
-      op_params    => 'start timeout=200s stop timeout=200s monitor start-delay=10s',
     }
     pacemaker::resource::service { $::nova::params::conductor_service_name :
       clone_params => 'interleave=true',
-      op_params    => 'start timeout=200s stop timeout=200s monitor start-delay=10s',
     }
     pacemaker::resource::service { $::nova::params::consoleauth_service_name :
       clone_params => 'interleave=true',
-      op_params    => 'start timeout=200s stop timeout=200s monitor start-delay=10s',
       require      => Pacemaker::Resource::Service[$::apache::params::service_name],
     }
     pacemaker::resource::service { $::nova::params::vncproxy_service_name :
       clone_params => 'interleave=true',
-      op_params    => 'start timeout=200s stop timeout=200s monitor start-delay=10s',
     }
     pacemaker::resource::service { $::nova::params::scheduler_service_name :
       clone_params => 'interleave=true',
-      op_params    => 'start timeout=200s stop timeout=200s monitor start-delay=10s',
     }
 
     pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint':