File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
lib/puppet/provider/mongodb_replset Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -284,14 +284,14 @@ def create_replica_set(alive_hosts)
284284 retry_sleep = 3
285285
286286 retry_limit . times do |n |
287- if db_ismaster ( alive_hosts [ 0 ] [ 'host' ] ) [ 'ismaster' ]
288- Puppet . debug 'Replica set initialization has successfully ended'
289- return true
290- else
291- Puppet . debug "Waiting for replica initialization. Retry: #{ n } "
292- sleep retry_sleep
293- next
287+ alive_hosts . each do |alive_host |
288+ if db_ismaster ( alive_host [ 'host' ] ) [ 'ismaster' ]
289+ Puppet . debug 'Replica set initialization has successfully ended'
290+ return true
291+ end
294292 end
293+ Puppet . debug "Waiting for replica initialization. Retry: #{ n } "
294+ sleep retry_sleep
295295 end
296296 raise Puppet ::Error , "rs.initiate() failed for replicaset #{ name } "
297297 end
You can’t perform that action at this time.
0 commit comments