[DOCS-634] Cannot specify a shard name with the sh.addShard function Created: 23/Oct/12  Updated: 30/Oct/23  Resolved: 23/Oct/12

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Participants:
Days since reply: 11 years, 15 weeks, 4 days ago

 Description   

http://docs.mongodb.org/manual/administration/sharding/#add-a-shard-to-a-cluster mentions specifying the name of a shard with:

sh.addShard( mongodb0.example.net, name: "mongodb0" )

That looks like a syntax error, and I don't believe the sh.addShard function actually supports a name at all, according to the console definition in 2.2:

> sh.addShard
function (url) {
    return sh._adminCommand({addShard:url}, true);
}



 Comments   
Comment by Asya Kamsky [ 04/Nov/12 ]

Also see DOCS-631 (almost a dup).

Comment by auto [ 23/Oct/12 ]

Author:

{u'date': u'2012-10-23T07:20:17-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-634: correcting sh.addShard syntax use in procedures
Branch: master
https://github.com/mongodb/docs/commit/08272bd4b08c3b1eabd704ad9b30dd26f69db4bb

Comment by Scott Hernandez (Inactive) [ 23/Oct/12 ]

Jeremy, you are correct, you must use the command, not the js helper to do that.

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