aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-17 01:08:34 +0000
committerGerrit Code Review <review@openstack.org>2016-09-17 01:08:34 +0000
commitb8bb4597f6d8d5472bdee4054a79439c2afa752e (patch)
tree5b2fa4070284b8ae49e3768b22b764a87c73b479
parent28855f3f279eb5d415e0cd5b1aaecad725ea10fe (diff)
parenteeb4d5f3b1c192e69e92c312652217e606ca8ecb (diff)
Merge "Wait for MongoDB connections before creating replset"
-rw-r--r--manifests/profile/base/database/mongodb.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/manifests/profile/base/database/mongodb.pp b/manifests/profile/base/database/mongodb.pp
index 1a19bb6..8967f5b 100644
--- a/manifests/profile/base/database/mongodb.pp
+++ b/manifests/profile/base/database/mongodb.pp
@@ -44,6 +44,13 @@ class tripleo::profile::base::database::mongodb (
include ::tripleo::profile::base::database::mongodbcommon
if $bootstrap_node == $::hostname {
+ # make sure we can connect to all servers before forming the replset
+ tripleo::profile::pacemaker::database::mongodbvalidator {
+ $tripleo::profile::base::database::mongodbcommon::mongodb_node_ips :
+ port => $tripleo::profile::base::database::mongodbcommon::port,
+ require => Service['mongodb'],
+ before => Mongodb_replset[$mongodb_replset],
+ }
mongodb_replset { $mongodb_replset :
members => $tripleo::profile::base::database::mongodbcommon::mongo_node_ips_with_port_nobr,
}