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

Profiling in admin DB can stick entries in other DBs (listDatabases command)

    • OS X

      Not quite sure how to accurately characterize the problem. But clearly with a DB that started in auth mode with no bowtiesarecool database it seems like a problem that without anyone with credentials mentioning the database it got created and populated with data.

      Certainly related to SERVER-2080. It's not clear to me if fixing that is the only thing that needs to happen or if the profiling behavior is an issue in its own right.

      % mongo localhost/admin -u *** -p ***
      MongoDB shell version: 1.8.2
      connecting to: localhost/admin
      > show dbs
      admin 5GB
      local 5GB
      > exit
      bye
      % mongo localhost/bowtiesarecool
      MongoDB shell version: 1.8.2
      connecting to: localhost/bowtiesarecool
      > db.setProfilingLevel(2)

      { "assertion" : "unauthorized db:bowtiesarecool lock type:1 client:127.0.0.1", "assertionCode" : 10057, "errmsg" : "db assertion failure", "ok" : 0 } > exit bye % mongo localhost/admin -u *** -p *** MongoDB shell version: 1.8.2 connecting to: localhost/admin > show dbs admin 5GB bowtiesarecool (empty) local 5GB > db.setProfilingLevel(2) { "was" : 0, "slowms" : 100, "ok" : 1 }

      > show dbs
      admin 5GB
      bowtiesarecool (empty)
      local 5GB
      > show dbs
      admin 5GB
      bowtiesarecool 5GB
      local 5GB
      > use bowtiesarecool
      switched to db bowtiesarecool
      > show collections
      system.profile
      > db.system.profile.find()
      { "ts" : ISODate("2011-09-14T01:37:04.458Z"), "info" : "query admin.$cmd ntoreturn:1 command:

      { listDatabases: 1.0 }

      reslen:308 bytes:292", "millis" : 0 }
      > exit
      bye

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            jared Jared D. Cottrell
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: