edelight/chef-mongodb — pull request #253 by dave-leblanc (2014-02-19 21:10:26+00:00)
Title: Update mongodb.rb

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