MongoDB and Meteor upgrades#3745
Conversation
|
Can this migrate WeKan MongoDB also to MongoDB 7 ? |
|
@xet7 It's likely a similar sort of script could be built for apps, but this might actually be a bad idea. MongoDB apparently has a minimum opLog file size of 990 MB now, which would make each Wekan grain enormous. (Our MongoDB 2.6 install had a 16 MB opLog file.) Sandstorm servers taking an extra gigabyte of space wouldn't be a huge blocker, but I think individual grains taking an extra gigabyte of space would be a big problem. |
- Upgrade Meteor from 2.3.5 to 2.16 - Add findAndModify polyfill for MongoDB driver 4.x (replaces fongandrew:find-and-modify) - Update aggregate() calls to use cursor API (no callback) - Replace bignum package with native BigInt for IPv6 handling - Add skipLibCheck to tsconfig.json - Update meteor-testapp to Meteor 2.16
Add infrastructure to migrate Sandstorm from MongoDB 2.6 to MongoDB 7.0: - Bundle MongoDB 7.0, mongosh, and database tools alongside MongoDB 2.6 - Add version detection via /var/mongo/version file - Add 'sandstorm migrate-mongo' command to migrate database - Add 'sandstorm rollback-mongo' command to revert if issues occur - Migration exports data with mongodump, reinitializes with MongoDB 7, imports with mongorestore, and sets up replica set for oplog tailing
- Upgrade Nightwatch from 0.9 to 2.6 with native ChromeDriver support - Replace selenium-standalone with chromedriver npm package - Update nightwatch.json for WebDriver protocol and headless Chrome - Configure tests to use MongoDB 7 for fresh installs - Fix async test patterns (Meteor.logout, file uploads, download handling) - Improve loginDevAccount reliability with Meteor connection checks - Update unit tests to use async/await
- Update Chrome version from 114 to 142 for test compatibility - update lint problem count
411cc97 to
0ecacee
Compare
|
@troyjfarrell @orblivion Tag for review, note that run-bundle.c++ gets minimized in diff view, but it's where most of the magic is. |
|
mongo-migration.log Edit: I don't think my mongo-migration.log has anything security-related, so I've attached it. |
Shouldn't this be 308? |
|
d00d487 adds what I think may be a bit better way to wait until mongo is ready. If that doesn't work reliably I think we should consider just adding some timed wait. |
|
@Michael-S Are you in a position to see if the latest commit resolves your issue? |
I'll try it, I should be able to report back within a few days. |
troyjfarrell
left a comment
There was a problem hiding this comment.
I'm really pleased that you've taken on this task. The code looks good, insofar as I'm qualified to review it.
| KJ_SYSCALL(execl(binary.cStr(), binary.cStr(), | ||
| "--bind_ip", "127.0.0.1", "--port", portStr.cStr(), | ||
| "--dbpath", dbpath.cStr(), | ||
| "--replSet", "ssrs", "--oplogSize", "16", |
There was a problem hiding this comment.
Assuming that "ssrs" is Sandstorm Replication Set? (I don't think that it matters.)
There was a problem hiding this comment.
I assume so, I was following
sandstorm/src/sandstorm/run-bundle.c++
Line 2258 in 231077a
|
Are any licensing implications since this change entails packaging MongoDB 7? Have we discussed that? |
|
@troyjfarrell We arguably need to update the about page to indicate the license for MongoDB is SSPL, but SSPL has no serious implications for us, as Sandstorm's use of MongoDB does not provide MongoDB as a service and therefore it effectively functions as GPL3 for us. (There is technically a purity-test fact we are no longer using OSI-approved licensed software there, but between the fact it is effectively GPL3 for us, and it puts our otherwise legacy software in a maintainable state... I am not super worried about it.) |
|
I agree that in practical terms, it's basically GPLv3. We should disclose the SSPL license of the included binaries on the downloads page in the event that someone does not want to run it because it's not OSI approved. Because we aren't exposing MongoDB to apps or end-users, it seems that it doesn't affect the license of our code as I understand it. |
Handle versions we don't know about yet, so that we don't treat them like old versions. Be more strict about not migrating or launching with versions we don't understand.
troyjfarrell
left a comment
There was a problem hiding this comment.
@mnutt I appreciate the refactoring. It looks good.
@ocdtrekkie Thanks for this licensing note.

This has a ways to go to get ready for any sort of release, but I wanted to put it out there for discussion.
For anyone looking at the code, the interesting parts are:
bignumlibrary didn't work and had to be replaced with nativeBigInt.I wouldn't throw it straight into production before more testing. But if you would like to try it yourself:
If you later feel like rolling back: