[SERVER-13563] Upgrading from 2.4.x to 2.6.0 via yum clobbers configuration file Created: 11/Apr/14  Updated: 11/Mar/15  Resolved: 18/Apr/14

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.6.0
Fix Version/s: 2.6.1, 2.7.0

Type: Bug Priority: Critical - P2
Reporter: James Wahlin Assignee: Ernie Hershey
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-13862 Unable to install mongodb-org-server ... Closed
is related to SERVER-13691 yum and apt "stable" repositories con... Closed
is related to DOCS-3202 Reflect new yum options required for ... Closed
is related to DOCS-3129 Improve MongoDB 2.6 yum upgrade instr... Closed
Backwards Compatibility: Major Change
Operating System: Linux
Backport Completed:
Steps To Reproduce:

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
Participants:

 Description   
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



 Comments   
Comment by Githook User [ 18/Apr/14 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-13563 Add old package names to RPM Provides and Conflicts

This is two changes for every package and sub-package of both
community and enterprise:
1) Add the equivalent old package name to each package's Provides
field
2) Add the equivalent old package name to each apckage's Conflicts
field.

Tested scenarios that should work:

  • Upgrading from 2.4.10 (Vs. uninstalling then installing)
  • Installing sub-packages with new name
  • Installing sub-packages with old name
  • Installing metapackage with new name
  • Installing metapackage with old name
  • Installing old versions of packages using new --exclude
    mongodb-org,mongodb-org-server syntax
  • Installing third party package that depends on old package name
    (new packages were automatically installed)

(cherry picked from commit 019c401589b34b46bf7bec801e23bd3dd7796151)
Branch: v2.6
https://github.com/mongodb/mongo/commit/7303d9b39af069dd530ca59233dae2831585c7af

Comment by Githook User [ 18/Apr/14 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-13563 Add old package names to RPM Provides and Conflicts

This is two changes for every package and sub-package of both
community and enterprise:
1) Add the equivalent old package name to each package's Provides
field
2) Add the equivalent old package name to each apckage's Conflicts
field.

Tested scenarios that should work:

  • Upgrading from 2.4.10 (Vs. uninstalling then installing)
  • Installing sub-packages with new name
  • Installing sub-packages with old name
  • Installing metapackage with new name
  • Installing metapackage with old name
  • Installing old versions of packages using new --exclude
    mongodb-org,mongodb-org-server syntax
  • Installing third party package that depends on old package name
    (new packages were automatically installed)

(cherry picked from commit 5337c7e3f43a9c25347b18442d83aea6fe608ed7)
Branch: master
https://github.com/mongodb/mongo/commit/019c401589b34b46bf7bec801e23bd3dd7796151

Comment by Githook User [ 16/Apr/14 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-13563 Add old package names to RPM Obsoletes

(cherry picked from commit 8bbe304cde912c0e2f96ff6b8f6e4badd90d60f0)
Branch: v2.6
https://github.com/mongodb/mongo/commit/644f64524848bc0e41660ee13feeaf0620071cfb

Comment by Githook User [ 16/Apr/14 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-13563 Add old package names to RPM Obsoletes
Branch: master
https://github.com/mongodb/mongo/commit/8bbe304cde912c0e2f96ff6b8f6e4badd90d60f0

Generated at Thu Feb 08 03:32:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.