Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13085

Improve error message when using createUser command with invalid write concern for config servers

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc2
    • Affects Version/s: 2.6.0-rc0, 2.6.0-rc1
    • Component/s: Sharding
    • Labels:
    • Fully Compatible
    • ALL
    • Hide
      use admin
      db.runCommand({ createUser: 'admin3',
        customData: {},
        roles: [ 'root' ],
        digestPassword: false,
        writeConcern: { w: 2, wtimeout: 3000 },
        pwd: '105663aee552e715fc10efb6eed2c8bb' })
      

      returns the following error

      { [MongoError: invalid batch request for config write]
        name: 'MongoError',
        ok: 0,
        errmsg: 'invalid batch request for config write',
        code: 72 }
      
      Show
      use admin db.runCommand({ createUser: 'admin3' , customData: {}, roles: [ 'root' ], digestPassword: false , writeConcern: { w: 2, wtimeout: 3000 }, pwd: '105663aee552e715fc10efb6eed2c8bb' }) returns the following error { [MongoError: invalid batch request for config write] name: 'MongoError' , ok: 0, errmsg: 'invalid batch request for config write' , code: 72 }

      Attempting to create a user using createUser command via mongos gives unexpected error.

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            christkv Christian Amor Kvalheim
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: