[SERVER-12632] Misleading error Created: 05/Feb/14  Updated: 10/Dec/14  Resolved: 05/Feb/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Charlie Page Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-4021 Running "addshard" outside admin db p... Closed
Related
is related to DOCS-2672 db.runCommand and the admin database Closed
Operating System: ALL
Participants:

 Description   

Create zero shard sharded setup, attempt to add the first shard without first doing "use admin".
The error message for subsequent shards tell use the user to "use admin" which makes sense. The first shard to be added does the following:

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

Having the first error message tell the user to use admin is the desired behavior.


Generated at Thu Feb 08 03:29:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.