Skip to content

Commit d03357d

Browse files
authored
Merge pull request #535 from radupantiru/develop
Fix for MongoDB v4 Replica Set initialization
2 parents 4e8b866 + e435bea commit d03357d

File tree

1 file changed

+5
-0
lines changed
  • lib/puppet/provider/mongodb_replset

1 file changed

+5
-0
lines changed

lib/puppet/provider/mongodb_replset/mongo.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ def get_hosts_status(members)
162162
alive.push(member)
163163
end
164164

165+
if status.key?('errmsg') && status['errmsg'].include?('no replset config has been received')
166+
Puppet.debug 'Mongo v4 rs.status() RS not initialized output'
167+
alive.push(member)
168+
end
169+
165170
if status.key?('set')
166171
if status['set'] != name
167172
raise Puppet::Error, "Can't configure replicaset #{name}, host #{host} is already part of another replicaset."

0 commit comments

Comments
 (0)