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

Upgrading from 2.4.x to 2.6.0 via yum clobbers configuration file

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.6.1, 2.7.0
    • Affects Version/s: 2.6.0
    • Component/s: Packaging
    • Labels:
      None
    • Major Change
    • Linux
    • Hide

      Reproduced on CentOS 6.4

      1. Install MongoDB 2.4 on CentOS
        • yum install mongo-10gen mongo-10gen-server
      2. Modify /etc/mongod.conf and add options (for my test I added replSet and smallfiles)
      3. Run mongod and confirm config settings
      4. Uninstall MongoDB 2.4.10
        • yum erase mongo-10gen mongo-10gen-server
      5. Install MongoDB 2.6.0
        • yum install mongodb-org
      6. Confirm that your changes to /etc/mongod.conf are no longer present
      Show
      Reproduced on CentOS 6.4 Install MongoDB 2.4 on CentOS yum install mongo-10gen mongo-10gen-server Modify /etc/mongod.conf and add options (for my test I added replSet and smallfiles) Run mongod and confirm config settings Uninstall MongoDB 2.4.10 yum erase mongo-10gen mongo-10gen-server Install MongoDB 2.6.0 yum install mongodb-org Confirm that your changes to /etc/mongod.conf are no longer present

      Issue Status as of April 21, 2014

      ISSUE SUMMARY
      Previously, an update of MongoDB with yum from 2.4.x to 2.6.0 required removing the package, followed by installing the package again. This resets the default mongod.conf file and can overwrite any customizations that were made to the file.

      USER IMPACT
      Users might not be aware of this behavior and restart their instances with the new default config file, which can have serious impact to a production system or prevent the instances from starting at all (for example due to the new bind_ip default, which is set to localhost in 2.6).

      WORKAROUNDS
      Users should make a backup of their mongod.conf file before the upgrade, and restore it before restarting the instances again. We also advise to review the new defaults in the 2.6 config file, and incorporate any desired changes.

      RESOLUTION
      The old package names have been added to the "Provides" and "Obsoletes" fields in the RPM spec, for both the community and enterprise packages. This now allows a direct update (rather than remove/install), as well as other scenarios, like installing sub-packages or meta-packages.

      Note: Upgrading from a previous major release branch (e.g. 2.4.8) will now upgrade to the latest available stable release (e.g. 2.6.1). Additionally, users who want to downgrade to (or install) an older version of MongoDB now require additional flags, as described on our page about RPM Package Installation.

      AFFECTED VERSIONS
      Verson 2.6.0 is affected by this bug.

      PATCHES
      The patch is included in the 2.6.1 production release.

      Original description

      yum upgrade from MongoDB 2.4.10 to 2.6.0 results in loss of user changes to /etc/mongod.conf

            Assignee:
            ernie.hershey@mongodb.com Ernie Hershey (Inactive)
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: