The most common causes I can think of for stuck migrations are:
The migration can’t acquite a lock on the table, because there is a Redash process still running. After running the supervisor stop commands, make sure that in fact everything was stopped properly with ps.
There is some query that’s locking the table. Check Postgre’s pg_stat_activity table.
You can also use pg_stat_activity to get a sense of what the migrations are stuck on.
Having the same problem with the script, upgrading from 2.0.1+b3080. The script got stuck so I canceled it, then I stopped all redash services by: sudo supervisorctl stop all. Got feedback that the server, celery, and redash_celery_scheduled were stopped. Then I run the script again and it is still stuck on Running migrations (if needed)...
The pg_stat_activity is not available for some reason, so I couldn’t use it to debug activities of the DB.
UPDATE:
I’ve killed all celery workers processes and re-run the upgrade script. this time I got the Done! Enjoy. message, and indeed saw some UI changes, but both the UI and the bin/run ./manage.py version script are prompting that I’m still on version 2.0.1+b3080.
Here is the full output of the upgrade script: Downloading release tarball... Unpacking to: redash.4.0.1.b4038... Changing ownership to redash... Linking .env file... Installing new Python packages (if needed)... Running migrations (if needed)... Linking to current version... Restarting... Done! Enjoy.
What can be the issue?
UPDATE:
After another restart of all services (sudo supervisorctl restart all) everything seems to work as expected, version was updated. I’m not sure wether the upgrade process reported finishing too early or was it something else.
Login or sign up disabled while the site is in read only mode