aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2015-06-18 17:38:29 +0200
committerGiulio Fidente <gfidente@redhat.com>2015-06-22 09:18:23 +0000
commit7cb3329a54a02d22c15433f5e1fd38642a2037e8 (patch)
treea9390b88e9990f51232e919e62681afa841ad7e6
parentd29411849004603a98cd45aba843eabe538a18c0 (diff)
Fix MongoDB connection url configuration in Ceilometer
Change-Id: I8a56e7b067044bace5def63ea6170ed817f48acd Closes-Bug: 1467437 Closes-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1233283
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp13
1 files changed, 7 insertions, 6 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index 4ef395f2..f3449798 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -163,6 +163,11 @@ if hiera('step') >= 1 {
if hiera('step') >= 2 {
+ # NOTE(gfidente): the following vars are needed on all nodes so they
+ # need to stay out of pacemaker_master conditional
+ $mongo_node_ips_with_port = suffix(hiera('mongo_node_ips'), ':27017')
+ $mongodb_replset = hiera('mongodb::server::replset')
+
if $pacemaker_master {
# FIXME: we should not have to access tripleo::loadbalancer class
@@ -222,11 +227,6 @@ if hiera('step') >= 2 {
}
# NOTE (spredzy) : The replset can only be run
# once all the nodes have joined the cluster.
- $mongo_node_ips = hiera('mongo_node_ips')
- $mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017')
- $mongo_node_string = join($mongo_node_ips_with_port, ',')
- $mongodb_pacemaker_resource = Pacemaker::Resource::Service[$::mongodb::params::service_name]
- $mongodb_replset = hiera('mongodb::server::replset')
mongodb_conn_validator { $mongo_node_ips_with_port :
require => Pacemaker::Resource::Service[$::mongodb::params::service_name],
before => Mongodb_replset[$mongodb_replset],
@@ -659,6 +659,7 @@ if hiera('step') >= 3 {
$ceilometer_database_connection = hiera('ceilometer_mysql_conn_string')
}
default : {
+ $mongo_node_string = join($mongo_node_ips_with_port, ',')
$ceilometer_database_connection = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
}
}
@@ -1085,7 +1086,7 @@ if hiera('step') >= 4 {
pacemaker::resource::service { $::ceilometer::params::agent_central_service_name :
clone_params => 'interleave=true',
require => [Pacemaker::Resource::Service[$::keystone::params::service_name],
- $mongodb_pacemaker_resource],
+ Pacemaker::Resource::Service[$::mongodb::params::service_name]],
}
pacemaker::resource::service { $::ceilometer::params::collector_service_name :
clone_params => 'interleave=true',