[DOCS-631] Sharding management doc page incorrectly implies mongos automatically can tell if shard is single host or replica set Created: 21/Oct/12  Updated: 30/Oct/23  Resolved: 22/Oct/12

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: mongodb-2.2
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 17 weeks, 2 days ago

 Description   

Page: http://docs.mongodb.org/manual/administration/sharding/#cluster-management
in Note 5. says:
"For example:
sh.addShard( "mongodb0.example.net:27027" )
If mongodb0.example.net:27027 is a member of a replica set, MongoDB will discover all other members of the replica set."

This is wrong. The automatic discovery will only happen if you use the syntax: "rsName/hostname:port".

Later there is this note:

"Note Changed in version 2.0.3.
Before version 2.0.3, you must specify the shard in the following form:
replicaSetName/<seed1>,<seed2>,<seed3>
For example, if the name of the replica set is repl0, then your sh.addShard() command would be:
sh.addShard( "repl0/mongodb0.example.net:27027,mongodb1.example.net:27017,mongodb2.example.net:27017" )"

I think there should be clarification about what changed - you don't have to specify all the seeds but you still must give replicaSetName if it's a replica set. This reads like you don't have to give replSetName/ anymore...



 Comments   
Comment by auto [ 22/Oct/12 ]

Author:

{u'date': u'2012-10-22T06:57:30-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-631: correting sh.addShard() syntax and use
Branch: master
https://github.com/mongodb/docs/commit/6d7008bf072a46cf19c5605b66d9c86376f0f7cf

Generated at Thu Feb 08 07:39:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.