Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-223

mongodump(2.6) --dumpDbUsersAndRoles should not dump the old <db>.system.users collection if the authorization model is upgraded to 2.6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: Legacy C++ Implementation
    • Fix Version/s: None
    • Component/s: mongodump
    • Labels:
      None

      Description

      Pre-steps:

      1. Start a mongod instance with auth using 2.4.
      2. Upgrade this node to 2.6, and upgrade the user authorization model to v2.6 using authSchemaUpgrade. Now users in all the databases are in the admin database, and the old system.users collections in the non-admin databases are left untouched.

      When we use mongodump -d to dump a specific database, there are different behaviour with/without --dumpDbUsersAndRoles:

      • mongodump without --dumpDbUsersAndRoles will not dump the old system.users collection. This is expected based on the code here.
      • However, mongodump with --dumpDbUsersAndRoles will dump the old system.users collection. Since the user authorization model is already upgraded to v2.6 and users are now in the admin databases, it will dump the users for the specific database from the admin database, we should not dump system.users collection from this database any more.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kyle.erf Kyle Erf
              Reporter:
              linda.qin Linda Qin
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: