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

Creating a user requires auth schema upgrade when no old schema was defined

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Security
    • Labels:
    • ALL
    • Hide

      All of these were run on the vagrant ldap vm:

      mongodb/bin/mongod --conf shard.conf
      mongodb/bin/mongod --conf config.conf
      mongodb/bin/mongos --conf mongos.conf

      shard.conf
      dbpath=./shard
      logpath=./shard.log
      fork=true
      auth=true
      port=3000
      nojournal=true
      keyFile=keyfile
      logappend=true
      setParameter=saslauthdPath=/var/run/saslauthd/mux
      setParameter=authenticationMechanisms=PLAIN,MONGODB-CR
      
      config.conf
      dbpath=./config
      logpath=./config.log
      fork=true
      auth=true
      nojournal=true
      logappend=true
      port=3001
      keyFile=keyfile
      setParameter=saslauthdPath=/var/run/saslauthd/mux
      setParameter=authenticationMechanisms=PLAIN,MONGODB-CR
      
      mongos.conf
      logpath=./mongos.log
      logappend=true
      fork=true
      configdb=localhost:3001
      setParameter=saslauthdPath=/var/run/saslauthd/mux
      setParameter=authenticationMechanisms=PLAIN,MONGODB-CR
      keyFile=keyfile
      port=3002
      
      Show
      All of these were run on the vagrant ldap vm: mongodb/bin/mongod --conf shard.conf mongodb/bin/mongod --conf config.conf mongodb/bin/mongos --conf mongos.conf shard.conf dbpath=./shard logpath=./shard.log fork= true auth= true port=3000 nojournal= true keyFile=keyfile logappend= true setParameter=saslauthdPath=/ var /run/saslauthd/mux setParameter=authenticationMechanisms=PLAIN,MONGODB-CR config.conf dbpath=./config logpath=./config.log fork= true auth= true nojournal= true logappend= true port=3001 keyFile=keyfile setParameter=saslauthdPath=/ var /run/saslauthd/mux setParameter=authenticationMechanisms=PLAIN,MONGODB-CR mongos.conf logpath=./mongos.log logappend= true fork= true configdb=localhost:3001 setParameter=saslauthdPath=/ var /run/saslauthd/mux setParameter=authenticationMechanisms=PLAIN,MONGODB-CR keyFile=keyfile port=3002

      I setup a 2.6.0-rc0 cluster as defined below, no older binaries were ever used. When I create a user it complains that there is an old auth schema but how could that be if I never had any old users, its a brand new database, config server, shards, etc and this is 2.6.0-rc0? After I run the upgrade schema step it works fine but the usability of this is not great.

      mongos> use whatever
      mongos> db.createUser({
        user: "tbrock",
        pwd: "sekret",
        roles: [ {role: "readWrite", db: "whatever" } ]
      })
      2014-02-25T20:37:18.315+0000 Error: couldn't add user: User and role management commands require auth data to have schema version 3 but found 1 at src/mongo/shell/db.js:1007
      

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: