Merge "Restore the NtpServer parameter name"
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_controller_pacemaker.pp
index d042bda..a0a7bb2 100644 (file)
@@ -22,9 +22,7 @@ Pcmk_resource <| |> {
 Service <|
   tag == 'aodh-service' or
   tag == 'ceilometer-service' or
-  tag == 'gnocchi-service' or
-  tag == 'neutron-service' or
-  tag == 'nova-service'
+  tag == 'gnocchi-service'
 |> {
   hasrestart => true,
   restart    => '/bin/true',
@@ -53,16 +51,6 @@ $non_pcmk_start = hiera('step') >= 5
 
 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
-
-  if count(hiera('ntp::servers')) > 0 {
-    include ::ntp
-  }
-
   $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G'))
   $corosync_ipv6 = str2bool(hiera('corosync_ipv6', false))
   if $corosync_ipv6 {
@@ -251,13 +239,6 @@ if hiera('step') >= 2 {
 
   # Create all the database schemas
   if $sync_db {
-    class { '::nova::db::mysql':
-      require => Exec['galera-ready'],
-    }
-    class { '::nova::db::mysql_api':
-      require => Exec['galera-ready'],
-    }
-
     if downcase(hiera('ceilometer_backend')) == 'mysql' {
       class { '::ceilometer::db::mysql':
         require => Exec['galera-ready'],
@@ -269,59 +250,12 @@ if hiera('step') >= 2 {
         require => Exec['galera-ready'],
       }
     }
-  }
-
-  # Ceph
-  $enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
 
-  if $enable_ceph {
-    $mon_initial_members = downcase(hiera('ceph_mon_initial_members'))
-    if str2bool(hiera('ceph_ipv6', false)) {
-      $mon_host = hiera('ceph_mon_host_v6')
-    } else {
-      $mon_host = hiera('ceph_mon_host')
-    }
-    class { '::ceph::profile::params':
-      mon_initial_members => $mon_initial_members,
-      mon_host            => $mon_host,
-    }
-    include ::ceph::conf
-    include ::ceph::profile::mon
-  }
-
-  if str2bool(hiera('enable_ceph_storage', false)) {
-    if str2bool(hiera('ceph_osd_selinux_permissive', true)) {
-      exec { 'set selinux to permissive on boot':
-        command => "sed -ie 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config",
-        onlyif  => "test -f /etc/selinux/config && ! grep '^SELINUX=permissive' /etc/selinux/config",
-        path    => ['/usr/bin', '/usr/sbin'],
+    class { '::aodh::db::mysql':
+        require => Exec['galera-ready'],
       }
-
-      exec { 'set selinux to permissive':
-        command => 'setenforce 0',
-        onlyif  => "which setenforce && getenforce | grep -i 'enforcing'",
-        path    => ['/usr/bin', '/usr/sbin'],
-      } -> Class['ceph::profile::osd']
-    }
-
-    include ::ceph::conf
-    include ::ceph::profile::osd
   }
 
-  if str2bool(hiera('enable_external_ceph', false)) {
-    if str2bool(hiera('ceph_ipv6', false)) {
-      $mon_host = hiera('ceph_mon_host_v6')
-    } else {
-      $mon_host = hiera('ceph_mon_host')
-    }
-    class { '::ceph::profile::params':
-      mon_host            => $mon_host,
-    }
-    include ::ceph::conf
-    include ::ceph::profile::client
-  }
-
-
 } #END STEP 2
 
 if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
@@ -350,27 +284,6 @@ MYSQL_HOST=localhost\n",
 
   include ::nova::config
 
-  class { '::nova::api' :
-    sync_db        => $sync_db,
-    sync_db_api    => $sync_db,
-    manage_service => false,
-    enabled        => false,
-  }
-  class { '::nova::consoleauth' :
-    manage_service => false,
-    enabled        => false,
-  }
-  class { '::nova::vncproxy' :
-    manage_service => false,
-    enabled        => false,
-  }
-  include ::nova::scheduler::filter
-  class { '::nova::scheduler' :
-    manage_service => false,
-    enabled        => false,
-  }
-  include ::nova::network::neutron
-
   if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
 
     # TODO(devvesa) provide non-controller ips for these services
@@ -420,12 +333,6 @@ MYSQL_HOST=localhost\n",
 
   }
 
-  if  hiera('neutron::core_plugin') == 'neutron.plugins.nuage.plugin.NuagePlugin' {
-    include ::neutron::plugins::nuage
-  }
-  if  hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2' {
-    include ::neutron::plugins::opencontrail
-  }
   if hiera('neutron::core_plugin') == 'midonet.neutron.plugin_v1.MidonetPluginV2' {
     class {'::neutron::plugins::midonet':
       midonet_api_ip    => hiera('public_virtual_ip'),
@@ -433,53 +340,6 @@ MYSQL_HOST=localhost\n",
       keystone_password => hiera('neutron::server::password')
     }
   }
-  if hiera('neutron::core_plugin') == 'networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2' {
-    class { '::neutron::plugins::plumgrid' :
-      connection                   => hiera('neutron::server::database_connection'),
-      controller_priv_host         => hiera('keystone_admin_api_vip'),
-      admin_password               => hiera('admin_password'),
-      metadata_proxy_shared_secret => hiera('nova::api::neutron_metadata_proxy_shared_secret'),
-    }
-  }
-
-  if $enable_ceph {
-    $ceph_pools = hiera('ceph_pools')
-    ceph::pool { $ceph_pools :
-      pg_num  => hiera('ceph::profile::params::osd_pool_default_pg_num'),
-      pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'),
-      size    => hiera('ceph::profile::params::osd_pool_default_size'),
-    }
-  }
-
-  # swift storage
-  if str2bool(hiera('enable_swift_storage', true)) {
-    class {'::swift::storage::all':
-      mount_check => str2bool(hiera('swift_mount_check')),
-    }
-    class {'::swift::storage::account':
-      manage_service => $non_pcmk_start,
-      enabled        => $non_pcmk_start,
-    }
-    class {'::swift::storage::container':
-      manage_service => $non_pcmk_start,
-      enabled        => $non_pcmk_start,
-    }
-    class {'::swift::storage::object':
-      manage_service => $non_pcmk_start,
-      enabled        => $non_pcmk_start,
-    }
-    if(!defined(File['/srv/node'])) {
-      file { '/srv/node':
-        ensure  => directory,
-        owner   => 'swift',
-        group   => 'swift',
-        require => Package['openstack-swift'],
-      }
-    }
-    $swift_components = ['account', 'container', 'object']
-    swift::storage::filter::recon { $swift_components : }
-    swift::storage::filter::healthcheck { $swift_components : }
-  }
 
   # Ceilometer
   case downcase(hiera('ceilometer_backend')) {
@@ -532,7 +392,7 @@ MYSQL_HOST=localhost\n",
   } else {
     $_profile_support = 'None'
   }
-  $neutron_options   = {'profile_support' => $_profile_support }
+  $neutron_options   = merge({'profile_support' => $_profile_support },hiera('horizon::neutron_options',undef))
 
   $memcached_ipv6 = hiera('memcached_ipv6', false)
   if $memcached_ipv6 {
@@ -548,7 +408,7 @@ MYSQL_HOST=localhost\n",
 
   # Aodh
   class { '::aodh' :
-    database_connection => $ceilometer_database_connection,
+    database_connection => hiera('aodh_mysql_conn_string'),
   }
   include ::aodh::config
   include ::aodh::auth
@@ -606,16 +466,6 @@ MYSQL_HOST=localhost\n",
     enabled        => false,
   }
 
-  $snmpd_user = hiera('snmpd_readonly_user_name')
-  snmp::snmpv3_user { $snmpd_user:
-    authtype => 'MD5',
-    authpass => hiera('snmpd_readonly_user_password'),
-  }
-  class { '::snmp':
-    agentaddress => ['udp:161','udp6:[::1]:161'],
-    snmpd_config => [ join(['createUser ', hiera('snmpd_readonly_user_name'), ' MD5 "', hiera('snmpd_readonly_user_password'), '"']), join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc  cron', 'includeAllDisks  10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
-  }
-
   hiera_include('controller_classes')
 
 } #END STEP 4
@@ -715,20 +565,6 @@ password=\"${mysql_root_password}\"",
     }
 
     # Nova
-    pacemaker::resource::service { $::nova::params::api_service_name :
-      clone_params => 'interleave=true',
-    }
-    pacemaker::resource::service { $::nova::params::consoleauth_service_name :
-      clone_params => 'interleave=true',
-      require      => Pacemaker::Resource::Ocf['openstack-core'],
-    }
-    pacemaker::resource::service { $::nova::params::vncproxy_service_name :
-      clone_params => 'interleave=true',
-    }
-    pacemaker::resource::service { $::nova::params::scheduler_service_name :
-      clone_params => 'interleave=true',
-    }
-
     pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint':
       constraint_type => 'order',
       first_resource  => 'openstack-core-clone',
@@ -738,6 +574,13 @@ password=\"${mysql_root_password}\"",
       require         => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name],
                           Pacemaker::Resource::Ocf['openstack-core']],
     }
+    pacemaker::constraint::colocation { 'nova-consoleauth-with-openstack-core':
+      source  => "${::nova::params::consoleauth_service_name}-clone",
+      target  => 'openstack-core-clone',
+      score   => 'INFINITY',
+      require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name],
+                  Pacemaker::Resource::Ocf['openstack-core']],
+    }
     pacemaker::constraint::base { 'nova-consoleauth-then-nova-vncproxy-constraint':
       constraint_type => 'order',
       first_resource  => "${::nova::params::consoleauth_service_name}-clone",