Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enceladus to run with new, supported version of MongoDB #2219

Closed
4 tasks
benedeki opened this issue Jul 8, 2024 · 3 comments · Fixed by #2225
Closed
4 tasks

Enceladus to run with new, supported version of MongoDB #2219

benedeki opened this issue Jul 8, 2024 · 3 comments · Fixed by #2225
Assignees
Labels
DB Database affected spike Proof of concept, research and investigation tasks

Comments

@benedeki
Copy link
Collaborator

benedeki commented Jul 8, 2024

Background

The MongoDb Enceladus relies on has finished support cycle. There's a need to upgrade.

Questions To Answer

  1. Which version of MongoDB migrate to
  2. Is driver change needed
  3. Is code change needed

Desired Outcome

Enceladus able to run with a fresh version of MongoDB

Tasks

Preview Give feedback
@benedeki benedeki added feature New feature spike Proof of concept, research and investigation tasks DB Database affected and removed feature New feature labels Jul 8, 2024
@benedeki benedeki self-assigned this Jul 8, 2024
ABMC831 added a commit that referenced this issue Nov 12, 2024
new version of embeded mongo db gadget
@ABMC831
Copy link

ABMC831 commented Nov 15, 2024

little discrepancy of behavior after passing v4.4 (unit test is kinda testing that functionality available since this version is ignored)

no update to driver

seems to work with version 8.0 - just upgrading of database itself needs to be done in steps

unit tests / integration tests (apart from 4.4 discrepancy on report during DELETE as what is still using the item) / light manual testing seemed to work in 8.0 as well as in 4.0

benedeki added a commit that referenced this issue Dec 17, 2024
benedeki added a commit that referenced this issue Dec 23, 2024
…#2225)

* actually use version 8.0 of mongo in integration test

---------

Co-authored-by: David Benedeki <14905969+benedeki@users.noreply.github.com>
@benedeki
Copy link
Collaborator Author

Each step:

  1. Switch of compatibility with old driver
  2. "correctly" switch off using command
  3. upload new driver
  4. switch on compatibility with new driver
    iterate for each version, perhaps restart in between

Migration guide:
as per mongo's (well hidden) upgrade guid

  • upgrad mongo to 4.2.25
  • upgrad mongo to 4.4.29
  • upgrad mongo to 5.0.30
  • upgrad mongo to 6.0.19
    ( since 6.0.x there is tiny error in their docs... there is one extra parameter in upgrading command, aslo console is no longer shipped, issued command from intelliJ)
  • upgrad mongo to 7.0.15
  • upgraded mongo to 8.0.3

@ABMC831
Copy link

ABMC831 commented Jan 24, 2025

These are for stand-alone, for replica set: there are similar pages (so maybe follow these instead)

upgrade mongo to 4.2.25
https://www.mongodb.com/docs/v6.2/release-notes/4.2-upgrade-standalone/

  • storage engine must be wired tiger before update
  • Check v4.0
    db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
  • Must be v4.0
    "featureCompatibilityVersion" : { "version" : "4.0" }
  • Correctly terminate Mongo v4.0
    db.adminCommand( { shutdown: 1 } )
  • Replace binaries and start Mongo v4.2
  • Set v4.2
    db.adminCommand( { setFeatureCompatibilityVersion: "4.2" } )

upgrade mongo to 4.4.29
https://www.mongodb.com/docs/v6.2/release-notes/4.4-upgrade-standalone/

  • Check v4.2
    db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
  • Must be v4.2
    "featureCompatibilityVersion" : { "version" : "4.2" }
  • Correctly terminate Mongo v4.2
    db.adminCommand( { shutdown: 1 } )
  • Replace binaries and start Mongo v4.4
  • Set v4.4
    db.adminCommand( { setFeatureCompatibilityVersion: "4.4" } )

upgrade mongo to 5.0.30
https://www.mongodb.com/docs/v6.2/release-notes/5.0-upgrade-standalone/

  • Check v4.4
    db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
  • Must be v4.4
    "featureCompatibilityVersion" : { "version" : "4.4" }
  • Correctly terminate Mongo v4.4
    db.adminCommand( { shutdown: 1 } )
  • Replace binaries and start Mongo v5.0
  • Set v5.0
    db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } )

upgrade mongo to 6.0.19
since this version mongo consoles are no longer shipped: issue commands from IntelliJ or similar
since this version, confirmation un compatibility version change might be necessary
https://www.mongodb.com/docs/v6.2/release-notes/5.0-upgrade-standalone/

  • Check v5.0
    db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
  • Must be v5.0
    "featureCompatibilityVersion" : { "version" : "5.0" }
  • Correctly terminate Mongo v5.0
    db.adminCommand( { shutdown: 1 } )
  • Replace binaries and start Mongo v6.0
  • Set v6.0
    db.adminCommand( { setFeatureCompatibilityVersion: "6.0" } )
    note: if this does not work, read error message and something like this might be necessary
    db.adminCommand({ setFeatureCompatibilityVersion: "6.0", confirm: true })

upgrade mongo to 7.0.15
https://www.mongodb.com/docs/v7.0/release-notes/7.0-upgrade-standalone/#std-label-7.0-upgrade-standalone

  • Check v6.0
    db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
  • Must be v6.0
    "featureCompatibilityVersion" : { "version" : "6.0" }
  • Correctly terminate Mongo v6.0
    db.adminCommand( { shutdown: 1 } )
  • Replace binaries and start Mongo v7.0
  • Set v7.0
    db.adminCommand( { setFeatureCompatibilityVersion: "7.0", confirm: true } )

upgrade mongo to 8.0.3
https://www.mongodb.com/docs/manual/release-notes/8.0-upgrade-standalone/

  • Check v7.0
    db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
  • Must be v7.0
    "featureCompatibilityVersion" : { "version" : "7.0" }
  • Correctly terminate Mongo v7.0
    db.adminCommand( { shutdown: 1 } )
  • Replace binaries and start Mongo v8.0
  • Set v8.0
    db.adminCommand( { setFeatureCompatibilityVersion: "8.0" } )
    note: if this does not work, read error message and something like this might be necessary
    db.adminCommand({ setFeatureCompatibilityVersion: "8.0", confirm: true })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB Database affected spike Proof of concept, research and investigation tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants