Ask Your Question
0

puppetlabs/mongodb not passing replica set config

asked 2016-04-26 09:36:01 -0500

ccovarrubias gravatar image

updated 2016-04-26 12:14:08 -0500

I'm trying to setup a MongoDB replica set using the puppetlabs/mongodb module. My manifests pretty much match the example on the modules page:

class mongodb::server {
  replset        => 'configserver',
  replset_config => { 'configserver' => { ensure  => present, members => ['host1:27017', 'host2:27017'']  } }
}

This is throwing the following error:

Debug: Executing: '/usr/bin/mongo admin --quiet --host 127.0.0.1:27017 --eval printjson(rs.conf())' Debug: Request failed: 'Execution of '/usr/bin/mongo admin --quiet --host 127.0.0.1:27017 --eval printjson(rs.conf())' returned 252: 2016-04-25T15:18:21.132-0600 E QUERY
[thread1] Error: Could not retrieve replica set config: { "info" : "run rs.initiate(...) if not yet done for the set", "ok" : 0, "errmsg" : "no replset config has been received", "code" : 94 } : rs.conf@src/mongo/shell/utils.js:1196:11 @(shell eval):1:11' Retry: '3' Debug: Got an exception: Could not evalute MongoDB shell command: printjson(rs.conf()) Debug: Storing state Debug: Stored state in 0.07 seconds Error: Failed to apply catalog: Could not evalute MongoDB shell command: printjson(rs.conf())

Can anybody provide some insight as to why its happening?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-14 18:46:40 -0500

Looks like this provider uses the mongo client tools.

Add to your manifest: class { '::mongodb::client': }

This will install the required package and solved the issue for me.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-26 09:36:01 -0500

Seen: 190 times

Last updated: Apr 26 '16