Failed to upgrade from 3.0.0 to 4.0.0

Self hosted installation on Ubuntu 16.04
Upgrade using the upgrade script

cd /opt/redash/current
sudo bin/upgrade

Script is stuck on migration step, and will not continue.

Tried :

Stopping all redash processes via supervisor and run upgrade script again

Is there any log to the upgrade script to try and look for an answer?
is this a known issue?

Technical details:

  • Existing Redash Version: 3.0.0.b3134
  • upgraded Redash Version: 4.0.0.b3948

The most common causes I can think of for stuck migrations are:

  1. 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.
  2. 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.

Hi,
Thanks for the prompt response; that seems to solve the issue

I.

Hi,

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.