summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-05-19 15:53:33 +0000
committerGerrit Code Review <review@openstack.org>2015-05-19 15:53:33 +0000
commit9d536b5ea065b2bc27f82104564332d4805bfeaf (patch)
tree8f4e1ca7f87e493d9fab817dda574bc2ca155c9c /puppet
parent0e1f4815bebff3fb1a9ec7df8c95a9c7afe07577 (diff)
parent0a6c852795bf59b938a6354493b3b02f385bf1e2 (diff)
Merge "Fix RabbitMQ startup race"
Diffstat (limited to 'puppet')
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp38
1 files changed, 22 insertions, 16 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index f476f348..e312f853 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -71,6 +71,25 @@ if hiera('step') >= 1 {
Class['::pacemaker::corosync'] -> Pacemaker::Resource::Service <| |>
+ # Only configure RabbitMQ in this step, don't start it yet to
+ # avoid races where non-master nodes attempt to start without
+ # config (eg. binding on 0.0.0.0)
+ # The module ignores erlang_cookie if cluster_config is false
+ class { '::rabbitmq':
+ service_manage => false,
+ tcp_keepalive => false,
+ config_kernel_variables => hiera('rabbitmq_kernel_variables'),
+ config_variables => hiera('rabbitmq_config_variables'),
+ environment_variables => hiera('rabbitmq_environment'),
+ } ->
+ file { '/var/lib/rabbitmq/.erlang.cookie':
+ ensure => 'present',
+ owner => 'rabbitmq',
+ group => 'rabbitmq',
+ mode => '0400',
+ content => hiera('rabbitmq::erlang_cookie'),
+ replace => true,
+ }
}
if hiera('step') >= 2 {
@@ -137,6 +156,7 @@ if hiera('step') >= 2 {
}
}
+ # Galera
if str2bool(hiera('enable_galera', 'true')) {
$mysql_config_file = '/etc/my.cnf.d/galera.cnf'
} else {
@@ -304,22 +324,7 @@ MYSQL_HOST=localhost\n",
}
}
- # the module ignores erlang_cookie if cluster_config is false
- file { '/var/lib/rabbitmq/.erlang.cookie':
- ensure => 'present',
- owner => 'rabbitmq',
- group => 'rabbitmq',
- mode => '0400',
- content => hiera('rabbitmq::erlang_cookie'),
- replace => true,
- } ->
- class { '::rabbitmq':
- service_manage => false,
- tcp_keepalive => false,
- config_kernel_variables => hiera('rabbitmq_kernel_variables'),
- config_variables => hiera('rabbitmq_config_variables'),
- environment_variables => hiera('rabbitmq_environment'),
- }
+ # RabbitMQ
if $pacemaker_master {
pacemaker::resource::ocf { 'rabbitmq':
resource_name => 'heartbeat:rabbitmq-cluster',
@@ -332,6 +337,7 @@ MYSQL_HOST=localhost\n",
# pre-install swift here so we can build rings
include ::swift
+ # Ceph
$cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false)
$enable_ceph = $cinder_enable_rbd_backend