Running "addshard" outside admin db produces cryptic error message

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Trivial - P5
    • None
    • Affects Version/s: 2.0.0
    • Component/s: Sharding
    • Sharding 10 (02/19/16), Sharding 2018-12-17, Sharding 2018-12-31, Sharding 2019-01-14
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, adding a shard without the admin db selected produces a cryptic error:

      mongos> db.runCommand(

      { 'addshard': "shard-1/localhost:30000,localhost:30001,localhost:30002" }

      )
      Wed Oct 5 11:22:46 uncaught exception: error

      { "$err" : "can't find a shard to put new db on", "code" : 10185 }

      A google search reveals that a number of people have asked questions about this error. A message advising the use of "admin" ought to be implemented.

            Assignee:
            Kim Tao
            Reporter:
            Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: