-
Notifications
You must be signed in to change notification settings - Fork 46
Help! I'm Trying to Deploy and Something's Going Wrong!
This page is not yet finished.
This Wiki page will be updated whenever a deploy operation may require special attention from a system administrator. New directions will be placed at the top, all entries will be given a date. If you are coming to this page and your deployment is seriously out of date you will have to work out all the steps that apply to you. If there is an issue with the directions please post an issue. All actions and directions written here have been debugged on my own deployments.
(This is a small part of a major update to data processing that will require you to redeploy worker and manager servers anyway.)
Due to a bug there may be duplicate files in the ChunkRegistry database. This causes errors in data processing that are not resolvable without cleaning up the database table and enforcing a uniqueness constraint. You will likely not be able to deploy Beiwe code until your database is cleaned up, and even then it is possible that the database schema update takes so long that Elastic Beanstalk thinks it has failed.
-
Terminate all manager and worker servers for your cluster, then use the cluster management launch script to create a new manager. This manager will be set up with the most recent version of the codebase, but it will not attempt to run schema migrations.
-
ssh
onto the manager server. -
Run the
processing-stop
command to stop Beiwe from processing active jobs. -
cd
into thebeiwe-backend
folder in the home directory of the ubuntu user. -
The deduplication script can take a while to run, the following command creates a background task that will not be terminated if you exit the ssh session. The time command will simply provide some (poorly formatted) information about how long the operation took to run:
nohup time python3 -u scripts/dedupe_chunks_script.py > dedupe.log &
You can watch the script execute withtail -f dedupe.log
, the task is finished when you see output from the time command. -
After the script finishes you will be able to run the schema migration. Again, this operation takes an amount of time related to the size of your database. Like the previous script I recommend you run it using nohup.
nohup time python3 -u manage.py migrate > migrate.log &
. (Note that this operation will appear to stall and do nothing, this is because the compute load is in the database enforces uniqueness.) -
run
processing-start
. You can watch the celery logs with thelogc
and confirm that the system is processing data. Note that the system adds items to the processing queue every 6 minutes.
The Beiwe backend codebase is now officially written in Python 3. There is no further support for Python 2, it is deprecated. There is a legacy branch, python2-legacy
, that you can use if you want to stay on the old version. The Python 2 version of the codebase will not receive updates and the project will not accept pull requests for that branch. Please follow the Python 3 conversion wiki page.