[DOCS-2672] db.runCommand and the admin database Created: 05/Feb/14  Updated: 28/Feb/14  Resolved: 28/Feb/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.1

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

Issue Links:
Related
related to SERVER-12632 Misleading error Closed
related to SERVER-4021 Running "addshard" outside admin db p... Closed
Participants:
Days since reply: 9 years, 50 weeks, 5 days ago

 Description   

The runCommand doesn't mention if "use admin" is always required (in a sharded environment?).
use admin to successfully execute is certainly required a lot, so I believe this page should mention it.
http://docs.mongodb.org/manual/reference/method/db.runCommand/

Further more, this page doesn't mention that "use admin" is required:
http://docs.mongodb.org/manual/reference/command/addShard/#dbcmd.addShard
It is, and the error message with ZERO shards is:
mongos> db.runCommand(

{addShard:"rs1/addShard:charlie-VirtualBox:27012", name:"shard01"}

)
Wed Feb 5 15:15:37.422 error: {
"$err" : "error creating initial database config information :: caused by :: can't find a shard to put new db on",
"code" : 10185
} at src/mongo/shell/query.js:128

Which is very hard to figure out.

Further shards require "use admin" but they kindly tell.



 Comments   
Comment by Githook User [ 28/Feb/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2672: modifying text to clarify admin database commands
Branch: master
https://github.com/mongodb/docs/commit/3434a4b5d2ec3233991ecee2cfd13b2167a29ac1

Comment by Githook User [ 28/Feb/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2672: modifying text to clarify admin database commands
Branch: v2.4
https://github.com/mongodb/docs/commit/048d8ecec46372f84d86515a5fb7dabed2b1a210

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