summaryrefslogtreecommitdiffstats
path: root/puppet/manifests
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2015-05-15 11:49:16 +0200
committerYanis Guenane <yanis.guenane@enovance.com>2015-05-18 04:34:07 +0200
commit0a6c852795bf59b938a6354493b3b02f385bf1e2 (patch)
tree9ae6e9a6d33a1e034921abf191dd63b7e074d6d9 /puppet/manifests
parent9ce06559bc32c279e0905472f29def58abf5eda0 (diff)
Fix RabbitMQ startup race
The Pacemaker resource agent might have attempted to start the service when the rabbitmq-env.conf file wasn't written yet, making it attempt to bind on 0.0.0.0 Co-Authored-By: Jason Guiditta <jguiditt@redhat.com> Co-Authored-By: Jiri Stransky <jistr@redhat.com> Change-Id: I081a0bfc6fc3943b8ade71799357022d29317d79
Diffstat (limited to 'puppet/manifests')
-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