diff options
author | 2015-05-26 16:38:59 +0200 | |
---|---|---|
committer | 2015-06-05 23:58:49 +0200 | |
commit | b00bae6c5a48ef9ac59b292f7bc67cf48395fb5e (patch) | |
tree | 98452b8b6f4872a7211005f5d4f670b3bc3aecc9 /puppet/manifests/overcloud_controller_pacemaker.pp | |
parent | 698e65274ed8e9bb31f0d101bade1bd5ee14e0b6 (diff) |
Update mongodb implementation to reflect master
Two PR have been merged upstream that let use improve our current
implementation :
* service_manage[1]
* conn string has namevar[2]
[1] https://github.com/puppetlabs/puppetlabs-mongodb/pull/198
[2] https://github.com/puppetlabs/puppetlabs-mongodb/pull/200
Change-Id: Ia2247348a9e0292b5fcbc65ea1e41e6bc7c477fa
Diffstat (limited to 'puppet/manifests/overcloud_controller_pacemaker.pp')
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 695724b8..70223258 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -96,11 +96,8 @@ if hiera('step') >= 1 { if downcase(hiera('ceilometer_backend')) == 'mongodb' { include ::mongodb::globals - # FIXME: replace with service_manage => false on ::mongodb::server - # when this is merged: https://github.com/puppetlabs/pupp etlabs-mongodb/pull/198 class { '::mongodb::server' : - service_ensure => undef, - service_enable => false, + service_manage => false, } } @@ -215,25 +212,20 @@ if hiera('step') >= 2 { op_params => 'start timeout=120s', clone_params => true, require => Class['::mongodb::server'], - before => Exec['mongodb-ready'], } # 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_replset = hiera('mongodb::server::replset') - $mongodb_cluster_ready_command = join(suffix(prefix($mongo_node_ips, '/bin/nc -w1 '), ' 27017 < /dev/null'), ' && ') $mongodb_pacemaker_resource = Pacemaker::Resource::Service[$::mongodb::params::service_name] - exec { 'mongodb-ready' : - command => $mongodb_cluster_ready_command, - timeout => 30, - tries => 180, - try_sleep => 10, + $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], } mongodb_replset { $mongodb_replset : members => $mongo_node_ips_with_port, - require => Exec['mongodb-ready'], } } |