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

Migrations failing on Sandstorm in 0.49.0 #5541

Closed
kentonv opened this issue Jan 13, 2017 · 5 comments
Closed

Migrations failing on Sandstorm in 0.49.0 #5541

kentonv opened this issue Jan 13, 2017 · 5 comments

Comments

@kentonv
Copy link
Contributor

kentonv commented Jan 13, 2017

Your Rocket.Chat version: 0.49.0

The latest Rocket.Chat package is unable to migrate grains that are a few versions old. It looks like migrations from the most-recent version work, but migrations from 0.45.0 do NOT work. Specifically, migrations seem to fail at "version 67".

Here is a grain backup which demonstrates the problem. This backup was taken from a grain running 0.45.0. If you try to restore it with 0.49.0, you'll get the log below. If you restore this grain using 0.48.2 (the previous version), it works fine, even though it covers the same migration. Therefore, it seems this migration has regressed in the latest version.

I think this is bug should block release of 0.49.0 since it could leave some people's grains inoperable.

** SANDSTORM SUPERVISOR: Starting up grain. Sandbox type: userns
+ set -euvo pipefail

export METEOR_SETTINGS='{"public": {"sandstorm": true}}'
+ export 'METEOR_SETTINGS={"public": {"sandstorm": true}}'
+ METEOR_SETTINGS='{"public": {"sandstorm": true}}'
export NODE_ENV=production
+ export NODE_ENV=production
+ NODE_ENV=production
exec node /start.js -p 8000
+ exec node /start.js -p 8000
** Starting Mongo...
2017-01-13T00:24:33.548+0000 I STORAGE  Engine custom option: log=(prealloc=false,file_max=200KB)
about to fork child process, waiting until server is ready for connections.
forked process: 9
child process started successfully, parent exiting
** Starting Meteor...
Will load cache for users
2 records load from users
Will load cache for rocketchat_room
1 records load from rocketchat_room
Will load cache for rocketchat_subscription
1 records load from rocketchat_subscription
Will load cache for rocketchat_settings
410 records load from rocketchat_settings
Updating process.env.MAIL_URL
Will load cache for rocketchat_permissions
60 records load from rocketchat_permissions
ufs: store created at 
ufs: store created at 
{"line":"159","file":"rocketchat_migrations.js","message":"Migrations: Migrating from version 64 -> 79","time":{"$date":1484267096981},"level":"info"}
{"line":"159","file":"rocketchat_migrations.js","message":"Migrations: Running up() on version 65","time":{"$date":1484267096986},"level":"info"}
{"line":"159","file":"rocketchat_migrations.js","message":"Migrations: Running up() on version 66","time":{"$date":1484267098533},"level":"info"}
{"line":"159","file":"rocketchat_migrations.js","message":"Migrations: Running up() on version 67","time":{"$date":1484267098582},"level":"info"}

+----------------------------------------------------------------------+
|                                                                      |
|                         ERROR! SERVER STOPPED                        |
|                                                                      |
|                    Your database migration failed:                   |
|                      [Models._Base: Empty query]                     |
|                                                                      |
|  Please make sure you are running the latest version and try again.  |
|           If the problem persists, please contact support.           |
|                                                                      |
|                   This Rocket.Chat version: 0.49.0                   |
|                    Database locked at version: 64                    |
|                      Database target version: 79                     |
|                                                                      |
|           Commit: b5abb6dd6e38a07dfc6016b65fe6ffc724d2c216           |
|                 Date: Wed Jan 11 20:21:50 2017 -0200                 |
|                            Branch: master                            |
|                              Tag: 0.49.0                             |
|                                                                      |
+----------------------------------------------------------------------+

sandstorm/sandstorm-http-bridge.c++:2250: warning: App isn't listening for TCP connections after 30 seconds. Continuing to attempt to connect; address->toString() = 127.0.0.1:8000
@rodrigok
Copy link
Member

@kentonv can you check the logs to find the exception that was thrown when migration was locked?

@kentonv
Copy link
Contributor Author

kentonv commented Jan 14, 2017

@rodrigok Which logs? I'm only aware of the log I pasted above, which is what is printed to stdout/stderr.

@kentonv
Copy link
Contributor Author

kentonv commented Jan 14, 2017

@rodrigok Maybe e199215 fixes this problem?

@engelgabriel engelgabriel modified the milestones: 0.49.1, 0.49.2 Jan 14, 2017
@kentonv
Copy link
Contributor Author

kentonv commented Jan 14, 2017

Looks like this is still broken in 0.49.1, which includes e199215. :(

@rodrigok
Copy link
Member

@kentonv Yeap, that was a fix for another issue with migrations.
I submitted a new PR with a fix for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants