summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2015-10-26 10:37:39 +0200
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2015-11-03 06:59:23 +0000
commite4ac0fcb9d705aae112145b52e19cf7d0266c7f4 (patch)
tree7225ef3b3cafbabb9fa4b3b6d75f8e8c3e4895ed
parent04327663a90fdb2caa963b21072e599a66e61d05 (diff)
Fix dependency for Ceilometer agent when using MySQL
In HA, when using MySQL as a backend for Ceilometer, the dependencies set for the Ceilometer central agent depended always on MongoDB; Which should only be the case if MongoDB is set as a backend. Change-Id: I6fecfe0564b13e9352313c5a3492505b44d12eaa
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp25
1 files changed, 17 insertions, 8 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index 38ee9c39..9c610dc2 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -814,12 +814,11 @@ if hiera('step') >= 3 {
}
# Ceilometer
- $ceilometer_backend = downcase(hiera('ceilometer_backend'))
- case $ceilometer_backend {
- /mysql/ : {
+ case downcase(hiera('ceilometer_backend')) {
+ /mysql/: {
$ceilometer_database_connection = hiera('ceilometer_mysql_conn_string')
}
- default : {
+ default: {
$mongo_node_string = join($mongo_node_ips_with_port, ',')
$ceilometer_database_connection = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
}
@@ -1279,10 +1278,20 @@ if hiera('step') >= 4 {
}
# Ceilometer
- pacemaker::resource::service { $::ceilometer::params::agent_central_service_name :
- clone_params => 'interleave=true',
- require => [Pacemaker::Resource::Service[$::keystone::params::service_name],
- Pacemaker::Resource::Service[$::mongodb::params::service_name]],
+ case downcase(hiera('ceilometer_backend')) {
+ /mysql/: {
+ pacemaker::resource::service { $::ceilometer::params::agent_central_service_name :
+ clone_params => 'interleave=true',
+ require => Pacemaker::Resource::Service[$::keystone::params::service_name],
+ }
+ }
+ default: {
+ pacemaker::resource::service { $::ceilometer::params::agent_central_service_name :
+ clone_params => 'interleave=true',
+ require => [Pacemaker::Resource::Service[$::keystone::params::service_name],
+ Pacemaker::Resource::Service[$::mongodb::params::service_name]],
+ }
+ }
}
pacemaker::resource::service { $::ceilometer::params::collector_service_name :
clone_params => 'interleave=true',