Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit d4526e1

Browse files
committed
Retry 6 times with 30 second sleep time when adding replicaset members
If someone attempts to deploy all three replicaset members at once tolerate up to three minutes for primary replicaset initialization. Any longer than that just handle it manually.
1 parent bead518 commit d4526e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manifests/datastore.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
path => ['/bin/', '/usr/bin/', '/usr/sbin/'],
128128
command => "mongo admin --host ${openshift_origin::mongodb_replica_primary_ip_addr} -u ${openshift_origin::mongodb_admin_user} -p ${openshift_origin::mongodb_admin_password} --quiet --eval \"printjson(rs.add(\'${::ipaddress}:${port}\'))\"",
129129
unless => "mongo admin --host ${openshift_origin::mongodb_replica_primary_ip_addr} -u ${openshift_origin::mongodb_admin_user} -p ${openshift_origin::mongodb_admin_password} --quiet --eval \"printjson(rs.status())\" | grep '\"name\" : \"${::ipaddress}:${port}\"'",
130-
tries => 3,
131-
try_sleep => 5,
130+
tries => 6,
131+
try_sleep => 30,
132132
require => [
133133
Service['mongod'],
134134
Exec['keyfile-mongo-conf', 'replset-mongo-conf']

0 commit comments

Comments
 (0)