diff options
Diffstat (limited to 'manifests/profile')
37 files changed, 85 insertions, 18 deletions
diff --git a/manifests/profile/base/ceph.pp b/manifests/profile/base/ceph.pp index 6ffd4ef..f4404e0 100644 --- a/manifests/profile/base/ceph.pp +++ b/manifests/profile/base/ceph.pp @@ -20,7 +20,7 @@ # # [*ceph_mon_initial_members*] # (Optional) List of IP addresses to use as mon_initial_members -# Defaults to hiera('ceph_mon_node_names') +# Defaults to hiera('ceph_mon_short_node_names') # # [*ceph_mon_host*] # (Optional) List of IP addresses to use as mon_host @@ -36,18 +36,23 @@ # Defaults to hiera('step') # class tripleo::profile::base::ceph ( - $ceph_mon_initial_members = hiera('ceph_mon_node_names', undef), + $ceph_mon_initial_members = hiera('ceph_mon_short_node_names', undef), $ceph_mon_host = hiera('ceph_mon_node_ips', '127.0.0.1'), $enable_ceph_storage = false, $step = hiera('step'), ) { + if ! $ceph_mon_initial_members { + $ceph_mon_initial_members_real = hiera('ceph_mon_node_names', undef) + } else { + $ceph_mon_initial_members_real = $ceph_mon_initial_members + } if $step >= 2 { - if $ceph_mon_initial_members { - if is_array($ceph_mon_initial_members) { - $mon_initial_members = downcase(join($ceph_mon_initial_members, ',')) + if $ceph_mon_initial_members_real { + if is_array($ceph_mon_initial_members_real) { + $mon_initial_members = downcase(join($ceph_mon_initial_members_real, ',')) } else { - $mon_initial_members = downcase($ceph_mon_initial_members) + $mon_initial_members = downcase($ceph_mon_initial_members_real) } } else { $mon_initial_members = undef diff --git a/manifests/profile/base/cinder/volume/iscsi.pp b/manifests/profile/base/cinder/volume/iscsi.pp index 8baaf1c..4d333c8 100644 --- a/manifests/profile/base/cinder/volume/iscsi.pp +++ b/manifests/profile/base/cinder/volume/iscsi.pp @@ -29,6 +29,10 @@ # (Optional) The iscsi helper to use # Defaults to 'tgtadm' # +# [*cinder_iscsi_protocol*] +# (Optional) The iscsi protocol to use +# Defaults to 'iscsi' +# # [*cinder_lvm_loop_device_size*] # (Optional) The size (in MB) of the LVM loopback volume # Defaults to '10280' @@ -42,6 +46,7 @@ class tripleo::profile::base::cinder::volume::iscsi ( $cinder_iscsi_address, $backend_name = hiera('cinder::backend::iscsi::volume_backend_name', 'tripleo_iscsi'), $cinder_iscsi_helper = 'tgtadm', + $cinder_iscsi_protocol = 'iscsi', $cinder_lvm_loop_device_size = '10280', $step = hiera('step'), ) { @@ -58,6 +63,7 @@ class tripleo::profile::base::cinder::volume::iscsi ( cinder::backend::iscsi { $backend_name : iscsi_ip_address => normalize_ip_for_uri($cinder_iscsi_address), iscsi_helper => $cinder_iscsi_helper, + iscsi_protocol => $cinder_iscsi_protocol, } } diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp index 0d628b5..43edfaf 100644 --- a/manifests/profile/base/pacemaker.pp +++ b/manifests/profile/base/pacemaker.pp @@ -69,13 +69,6 @@ class tripleo::profile::base::pacemaker ( Class['tripleo::fencing'] -> Class['pacemaker::stonith'] } - # FIXME(gfidente): sets 200secs as default start timeout op - # param; until we can use pcmk global defaults we'll still - # need to add it to every resource which redefines op params - Pacemaker::Resource::Service { - op_params => 'start timeout=200s stop timeout=200s', - } - file { '/var/lib/tripleo/pacemaker-restarts': ensure => directory, } ~> Tripleo::Pacemaker::Resource_restart_flag<||> diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp index 9d50462..fc9fe11 100644 --- a/manifests/profile/base/swift/proxy.pp +++ b/manifests/profile/base/swift/proxy.pp @@ -52,5 +52,6 @@ class tripleo::profile::base::swift::proxy ( include ::swift::proxy::tempurl include ::swift::proxy::formpost include ::swift::proxy::bulk + include ::swift::proxy::ceilometer } } diff --git a/manifests/profile/pacemaker/apache.pp b/manifests/profile/pacemaker/apache.pp index 980b3a4..c8aeac5 100644 --- a/manifests/profile/pacemaker/apache.pp +++ b/manifests/profile/pacemaker/apache.pp @@ -40,6 +40,7 @@ class tripleo::profile::pacemaker::apache ( if $step >= 5 and $pacemaker_master { include ::apache::params pacemaker::resource::service { $::apache::params::service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', verify_on_create => true, } diff --git a/manifests/profile/pacemaker/ceilometer/agent/central.pp b/manifests/profile/pacemaker/ceilometer/agent/central.pp index 90266be..b9655c3 100644 --- a/manifests/profile/pacemaker/ceilometer/agent/central.pp +++ b/manifests/profile/pacemaker/ceilometer/agent/central.pp @@ -40,12 +40,14 @@ class tripleo::profile::pacemaker::ceilometer::agent::central ( case downcase(hiera('ceilometer_backend')) { /mysql/: { pacemaker::resource::service { $::ceilometer::params::agent_central_service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', require => Pacemaker::Resource::Ocf['openstack-core'], } } default: { pacemaker::resource::service { $::ceilometer::params::agent_central_service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', require => [Pacemaker::Resource::Ocf['openstack-core'], Pacemaker::Resource::Service[$::mongodb::params::service_name]], diff --git a/manifests/profile/pacemaker/ceilometer/agent/notification.pp b/manifests/profile/pacemaker/ceilometer/agent/notification.pp index e419356..394cc36 100644 --- a/manifests/profile/pacemaker/ceilometer/agent/notification.pp +++ b/manifests/profile/pacemaker/ceilometer/agent/notification.pp @@ -37,6 +37,7 @@ class tripleo::profile::pacemaker::ceilometer::agent::notification ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::ceilometer::params::agent_notification_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/ceilometer/collector.pp b/manifests/profile/pacemaker/ceilometer/collector.pp index d0f7217..350125f 100644 --- a/manifests/profile/pacemaker/ceilometer/collector.pp +++ b/manifests/profile/pacemaker/ceilometer/collector.pp @@ -41,6 +41,7 @@ class tripleo::profile::pacemaker::ceilometer::collector ( Exec<| title == 'galera-ready'|> -> Class['ceilometer::db::mysql'] } pacemaker::resource::service { $::ceilometer::params::collector_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/cinder/api.pp b/manifests/profile/pacemaker/cinder/api.pp index d18942d..f25a050 100644 --- a/manifests/profile/pacemaker/cinder/api.pp +++ b/manifests/profile/pacemaker/cinder/api.pp @@ -48,6 +48,7 @@ class tripleo::profile::pacemaker::cinder::api ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::cinder::params::api_service : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', require => Pacemaker::Resource::Ocf['openstack-core'], } diff --git a/manifests/profile/pacemaker/cinder/backup.pp b/manifests/profile/pacemaker/cinder/backup.pp index 72ec456..63988d6 100644 --- a/manifests/profile/pacemaker/cinder/backup.pp +++ b/manifests/profile/pacemaker/cinder/backup.pp @@ -54,7 +54,9 @@ class tripleo::profile::pacemaker::cinder::backup ( } if $step >= 5 and $pacemaker_master { - pacemaker::resource::service { $::cinder::params::backup_service : } + pacemaker::resource::service { $::cinder::params::backup_service : + op_params => 'start timeout=200s stop timeout=200s', + } } } diff --git a/manifests/profile/pacemaker/cinder/scheduler.pp b/manifests/profile/pacemaker/cinder/scheduler.pp index e25ef54..4bfb89a 100644 --- a/manifests/profile/pacemaker/cinder/scheduler.pp +++ b/manifests/profile/pacemaker/cinder/scheduler.pp @@ -48,6 +48,7 @@ class tripleo::profile::pacemaker::cinder::scheduler ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::cinder::params::scheduler_service : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint': diff --git a/manifests/profile/pacemaker/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp index 82e2522..46e8b79 100644 --- a/manifests/profile/pacemaker/cinder/volume.pp +++ b/manifests/profile/pacemaker/cinder/volume.pp @@ -53,7 +53,9 @@ class tripleo::profile::pacemaker::cinder::volume ( } if $step >= 5 and $pacemaker_master { - pacemaker::resource::service { $::cinder::params::volume_service : } + pacemaker::resource::service { $::cinder::params::volume_service : + op_params => 'start timeout=200s stop timeout=200s', + } } } diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp index 0169e16..7464854 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -45,7 +45,12 @@ class tripleo::profile::pacemaker::database::mysql ( # use only mysql_node_names when we land a patch in t-h-t that # switches to autogenerating these values from composable services - $galera_node_names_lookup = hiera('mysql_node_names', hiera('galera_node_names', $::hostname)) + # The galera node names need to match the pacemaker node names... so if we + # want to use FQDNs for this, the cluster will not finish bootstrapping, + # since all the nodes will be marked as slaves. For now, we'll stick to the + # short name which is already registered in pacemaker until we get around + # this issue. + $galera_node_names_lookup = hiera('mysql_short_node_names', hiera('mysql_node_names', $::hostname)) if is_array($galera_node_names_lookup) { $galera_nodes = downcase(join($galera_node_names_lookup, ',')) } else { diff --git a/manifests/profile/pacemaker/glance.pp b/manifests/profile/pacemaker/glance.pp index 664b91f..cace5ae 100644 --- a/manifests/profile/pacemaker/glance.pp +++ b/manifests/profile/pacemaker/glance.pp @@ -92,10 +92,12 @@ class tripleo::profile::pacemaker::glance ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::glance::params::registry_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::glance::params::api_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } diff --git a/manifests/profile/pacemaker/gnocchi/metricd.pp b/manifests/profile/pacemaker/gnocchi/metricd.pp index c9dc2d9..aacec01 100644 --- a/manifests/profile/pacemaker/gnocchi/metricd.pp +++ b/manifests/profile/pacemaker/gnocchi/metricd.pp @@ -39,6 +39,7 @@ class tripleo::profile::pacemaker::gnocchi::metricd ( include ::gnocchi::metricd pacemaker::resource::service { $::gnocchi::params::metricd_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/gnocchi/statsd.pp b/manifests/profile/pacemaker/gnocchi/statsd.pp index 42d30b9..1058010 100644 --- a/manifests/profile/pacemaker/gnocchi/statsd.pp +++ b/manifests/profile/pacemaker/gnocchi/statsd.pp @@ -39,6 +39,7 @@ class tripleo::profile::pacemaker::gnocchi::statsd ( include ::gnocchi::statsd pacemaker::resource::service { $::gnocchi::params::statsd_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp index b2e127b..21d8ab1 100644 --- a/manifests/profile/pacemaker/haproxy.pp +++ b/manifests/profile/pacemaker/haproxy.pp @@ -56,6 +56,7 @@ class tripleo::profile::pacemaker::haproxy ( # of pacemaker VIPs could move into puppet-tripleo or we should # make use of less specific hiera parameters here for the settings. pacemaker::resource::service { 'haproxy': + op_params => 'start timeout=200s stop timeout=200s', clone_params => true, } diff --git a/manifests/profile/pacemaker/heat/api.pp b/manifests/profile/pacemaker/heat/api.pp index 0fc4f8a..7b0987f 100644 --- a/manifests/profile/pacemaker/heat/api.pp +++ b/manifests/profile/pacemaker/heat/api.pp @@ -42,6 +42,7 @@ class tripleo::profile::pacemaker::heat::api ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::heat::params::api_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/heat/api_cfn.pp b/manifests/profile/pacemaker/heat/api_cfn.pp index 1230c6b..6e40dba 100644 --- a/manifests/profile/pacemaker/heat/api_cfn.pp +++ b/manifests/profile/pacemaker/heat/api_cfn.pp @@ -42,6 +42,7 @@ class tripleo::profile::pacemaker::heat::api_cfn ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::heat::params::api_cfn_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/heat/api_cloudwatch.pp b/manifests/profile/pacemaker/heat/api_cloudwatch.pp index 6110a0c..9403812 100644 --- a/manifests/profile/pacemaker/heat/api_cloudwatch.pp +++ b/manifests/profile/pacemaker/heat/api_cloudwatch.pp @@ -43,6 +43,7 @@ class tripleo::profile::pacemaker::heat::api_cloudwatch ( if $step >= 5 and $pacemaker_master { # Heat pacemaker::resource::service { $::heat::params::api_cloudwatch_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/heat/engine.pp b/manifests/profile/pacemaker/heat/engine.pp index 88744ad..bd50dc0 100644 --- a/manifests/profile/pacemaker/heat/engine.pp +++ b/manifests/profile/pacemaker/heat/engine.pp @@ -42,6 +42,7 @@ class tripleo::profile::pacemaker::heat::engine ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::heat::params::engine_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp index a1ff5ca..5cbeb7f 100644 --- a/manifests/profile/pacemaker/manila.pp +++ b/manifests/profile/pacemaker/manila.pp @@ -139,7 +139,9 @@ class tripleo::profile::pacemaker::manila ( if $step >= 5 and $pacemaker_master { # only manila-share is pacemaker managed, and in a/p - pacemaker::resource::service { $::manila::params::share_service : } + pacemaker::resource::service { $::manila::params::share_service : + op_params => 'start timeout=200s stop timeout=200s', + } } } diff --git a/manifests/profile/pacemaker/memcached.pp b/manifests/profile/pacemaker/memcached.pp index 2a6bd4d..9c6a1a3 100644 --- a/manifests/profile/pacemaker/memcached.pp +++ b/manifests/profile/pacemaker/memcached.pp @@ -41,6 +41,7 @@ class tripleo::profile::pacemaker::memcached ( if $step >= 2 and $pacemaker_master { pacemaker::resource::service { $::memcached::params::service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', require => Class['::memcached'], } diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp index 6525126..ccc1401 100644 --- a/manifests/profile/pacemaker/neutron.pp +++ b/manifests/profile/pacemaker/neutron.pp @@ -91,11 +91,13 @@ class tripleo::profile::pacemaker::neutron ( unless => '/sbin/pcs resource show neutron-server', } -> pacemaker::resource::service { $::neutron::params::server_service: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', require => Pacemaker::Resource::Ocf['openstack-core'] } } else { pacemaker::resource::service { $::neutron::params::server_service: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', require => Pacemaker::Resource::Ocf['openstack-core'] } diff --git a/manifests/profile/pacemaker/neutron/dhcp.pp b/manifests/profile/pacemaker/neutron/dhcp.pp index e76012f..2081357 100644 --- a/manifests/profile/pacemaker/neutron/dhcp.pp +++ b/manifests/profile/pacemaker/neutron/dhcp.pp @@ -37,6 +37,7 @@ class tripleo::profile::pacemaker::neutron::dhcp ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::neutron::params::dhcp_agent_service: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/neutron/l3.pp b/manifests/profile/pacemaker/neutron/l3.pp index c3ae3b8..b59edc1 100644 --- a/manifests/profile/pacemaker/neutron/l3.pp +++ b/manifests/profile/pacemaker/neutron/l3.pp @@ -37,6 +37,7 @@ class tripleo::profile::pacemaker::neutron::l3 ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::neutron::params::l3_agent_service: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/neutron/metadata.pp b/manifests/profile/pacemaker/neutron/metadata.pp index f09edba..6b0e537 100644 --- a/manifests/profile/pacemaker/neutron/metadata.pp +++ b/manifests/profile/pacemaker/neutron/metadata.pp @@ -37,6 +37,7 @@ class tripleo::profile::pacemaker::neutron::metadata ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::neutron::params::metadata_agent_service: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/neutron/midonet.pp b/manifests/profile/pacemaker/neutron/midonet.pp index 453641a..33aed64 100644 --- a/manifests/profile/pacemaker/neutron/midonet.pp +++ b/manifests/profile/pacemaker/neutron/midonet.pp @@ -38,6 +38,7 @@ class tripleo::profile::pacemaker::neutron::midonet ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service {'tomcat': + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } diff --git a/manifests/profile/pacemaker/neutron/ovs.pp b/manifests/profile/pacemaker/neutron/ovs.pp index 7e3b15c..c97cd65 100644 --- a/manifests/profile/pacemaker/neutron/ovs.pp +++ b/manifests/profile/pacemaker/neutron/ovs.pp @@ -38,6 +38,7 @@ class tripleo::profile::pacemaker::neutron::ovs ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::neutron::params::ovs_agent_service: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } diff --git a/manifests/profile/pacemaker/nova/api.pp b/manifests/profile/pacemaker/nova/api.pp index 188beda..6724b4d 100644 --- a/manifests/profile/pacemaker/nova/api.pp +++ b/manifests/profile/pacemaker/nova/api.pp @@ -46,6 +46,7 @@ class tripleo::profile::pacemaker::nova::api ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::nova::params::api_service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } diff --git a/manifests/profile/pacemaker/nova/conductor.pp b/manifests/profile/pacemaker/nova/conductor.pp index f2605cb..b7ffe0c 100644 --- a/manifests/profile/pacemaker/nova/conductor.pp +++ b/manifests/profile/pacemaker/nova/conductor.pp @@ -45,6 +45,7 @@ class tripleo::profile::pacemaker::nova::conductor ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::nova::params::conductor_service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } diff --git a/manifests/profile/pacemaker/nova/consoleauth.pp b/manifests/profile/pacemaker/nova/consoleauth.pp index 6cd8c15..aeec6b4 100644 --- a/manifests/profile/pacemaker/nova/consoleauth.pp +++ b/manifests/profile/pacemaker/nova/consoleauth.pp @@ -45,6 +45,7 @@ class tripleo::profile::pacemaker::nova::consoleauth ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::nova::params::consoleauth_service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } diff --git a/manifests/profile/pacemaker/nova/scheduler.pp b/manifests/profile/pacemaker/nova/scheduler.pp index 8c387d2..d4d3dab 100644 --- a/manifests/profile/pacemaker/nova/scheduler.pp +++ b/manifests/profile/pacemaker/nova/scheduler.pp @@ -44,6 +44,7 @@ class tripleo::profile::pacemaker::nova::scheduler ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::nova::params::scheduler_service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/nova/vncproxy.pp b/manifests/profile/pacemaker/nova/vncproxy.pp index 3652daa..e9a1124 100644 --- a/manifests/profile/pacemaker/nova/vncproxy.pp +++ b/manifests/profile/pacemaker/nova/vncproxy.pp @@ -44,6 +44,7 @@ class tripleo::profile::pacemaker::nova::vncproxy ( if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::nova::params::vncproxy_service_name: + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/rabbitmq.pp b/manifests/profile/pacemaker/rabbitmq.pp index 1f25e8b..8d5f9d0 100644 --- a/manifests/profile/pacemaker/rabbitmq.pp +++ b/manifests/profile/pacemaker/rabbitmq.pp @@ -26,6 +26,16 @@ # (Optional) Content of erlang cookie. # Defaults to hiera('rabbitmq::erlang_cookie'). # +# [*user_ha_queues*] +# (Optional) The number of HA queues in to be configured in rabbitmq +# Defaults to hiera('rabbitmq::nr_ha_queues'), which is usually 0 meaning +# that the queues number will be CEIL(N/2) where N is the number of rabbitmq +# nodes. +# +# [*rabbit_nodes*] +# (Optional) The list of rabbitmq nodes names +# Defaults to hiera('rabbitmq_node_names') +# # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. @@ -34,6 +44,8 @@ class tripleo::profile::pacemaker::rabbitmq ( $bootstrap_node = hiera('bootstrap_nodeid'), $erlang_cookie = hiera('rabbitmq::erlang_cookie'), + $user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0), + $rabbit_nodes = hiera('rabbitmq_node_names'), $step = hiera('step'), ) { if $::hostname == downcase($bootstrap_node) { @@ -61,9 +73,17 @@ class tripleo::profile::pacemaker::rabbitmq ( } if $step >= 2 and $pacemaker_master { + include ::stdlib + # The default nr of ha queues is ceiling(N/2) + if $user_ha_queues == 0 { + $nr_rabbit_nodes = size($rabbit_nodes) + $nr_ha_queues = $nr_rabbit_nodes / 2 + ($nr_rabbit_nodes % 2) + } else { + $nr_ha_queues = $user_ha_queues + } pacemaker::resource::ocf { 'rabbitmq': ocf_agent_name => 'heartbeat:rabbitmq-cluster', - resource_params => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'', + resource_params => "set_policy='ha-all ^(?!amq\\.).* {\"ha-mode\":\"exactly\",\"ha-params\":${nr_ha_queues}}'", clone_params => 'ordered=true interleave=true', meta_params => 'notify=true', require => Class['::rabbitmq'], diff --git a/manifests/profile/pacemaker/sahara/api.pp b/manifests/profile/pacemaker/sahara/api.pp index 0e3d97a..70632d1 100644 --- a/manifests/profile/pacemaker/sahara/api.pp +++ b/manifests/profile/pacemaker/sahara/api.pp @@ -43,6 +43,7 @@ class tripleo::profile::pacemaker::sahara::api ( if $step >= 5 and $pacemaker_master { # Sahara pacemaker::resource::service { $::sahara::params::api_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } diff --git a/manifests/profile/pacemaker/sahara/engine.pp b/manifests/profile/pacemaker/sahara/engine.pp index ada6c06..640acc0 100644 --- a/manifests/profile/pacemaker/sahara/engine.pp +++ b/manifests/profile/pacemaker/sahara/engine.pp @@ -42,6 +42,7 @@ class tripleo::profile::pacemaker::sahara::engine ( if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::sahara::params::engine_service_name : + op_params => 'start timeout=200s stop timeout=200s', clone_params => 'interleave=true', } } |