Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mongodb.rb #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dave-leblanc
Copy link

when adding a replicaset as a shard you have to use the replicaset name as the prefix

this recipe was computing a name based on rs_#{n['mongodb']['shard_name']} which results in mongos not wanting to add the shard with the following error:

mongo addshard couldn't connect to new shard socket exception

at first I thought there to be an issue with hosts/ips but after trying the commands manually and verifying ipaddresses and services running the only way to make mongo add the shards was to change the prefix to the replicaset_name

when adding a replicaset as a shard you have to use the replicaset name as the prefix

this recipe was computing a name based on rs_#{n['mongodb']['shard_name']} which results in mongos not wanting to add the shard with the following error:

mongo addshard couldn't connect to new shard socket exception

at first I thought there to be an issue with hosts/ips but after trying the commands manually and verifying ipaddresses and services running the only way to make mongo add the shards was to change the prefix to the replicaset_name
@josephholsten
Copy link

I totally support us being more flexible with the shard name. This is backwards incompatible, so I'm adding it to #308.

This code does what it says on the box, but you don't need the string interpolation. Instead of:

key = "#{n['mongodb']['replicaset_name']}"

We may simply:

key = n['mongodb']['replicaset_name']

@josephholsten
Copy link

Oh, looks like this is a dupe of #6

@jamesonjlee this seems safe to close

@jamesonjlee
Copy link

noting as to close with #215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants