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

Default dbpath for mongod --configsvr changes in 2.6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 2.6.3
    • Fix Version/s: 2.6.4, 2.7.4
    • Component/s: Admin
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      Hide

      1. Deploy sharded cluster using MongoDB 2.4, not specifying dbpath for the mongod --configsvr instance.
      2. Follow upgrade procedure for MongoDB 2.6.

      Show
      1. Deploy sharded cluster using MongoDB 2.4, not specifying dbpath for the mongod --configsvr instance. 2. Follow upgrade procedure for MongoDB 2.6.
    • Sprint:
      Server 2.7.4

      Description

      Issue Status as of Jul 18, 2014

      ISSUE SUMMARY
      When a config server is started with mongod --configsvr and no explicit dbpath is specified with --dbpath, MongoDB should use the default /data/configdb instead of /data/db for regular mongod nodes. A bug in the option parser causes config servers to also use the default /data/db.

      USER IMPACT
      Sharded clusters that do not set an explicit dbpath for their config server mongod processes and rely on the default values are affected by this issue.

      The issue is exacerbated in the case where a config server and a regular mongod are co-located on the same host, and both processes rely on default dbpaths. In that case, the config server might read from the regular mongod dbpath, which can lead to undefined behavior and cluster instability.

      WORKAROUNDS
      Always specify the dbpath explicitly with the --dbpath option for all mongod processes, including config servers.

      AFFECTED VERSIONS
      Production release versions from 2.6.0 to 2.6.3 are affected by this issue.

      FIX VERSION
      The fix is included in the 2.6.4 production release.

      RESOLUTION DETAILS
      The config parser's params.count() did not distinguish between default and non-default options. This has been fixed to restore the default dbpath /data/configdb when using the --configsvr option.

      Original description

      We've discovered an undocumented backward-incompatible change when upgrading our sharded cluster from MongoDB 2.4 to 2.6.

      On 2.4, mongod defaults to `/data/configdb` for the dbpath.

      On 2.6, mongod defaults to `/data/db` for the dbpath.

      This change must be documented in the Upgrade Documentation but is not currently. If the deployment relies on the default path for the configdb, following the upgrade procedure will take down the entire cluster.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: