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

Run db migration step before starting worker? #24

Open
maxnoe opened this issue Sep 22, 2021 · 3 comments
Open

Run db migration step before starting worker? #24

maxnoe opened this issue Sep 22, 2021 · 3 comments

Comments

@maxnoe
Copy link

maxnoe commented Sep 22, 2021

It is a common goal to make updating docker services as easy as possible – e.g. just by pulling a new version of the docker image and starting it without any additional steps.

Reading the indico update documentation, the only thing that seems missing for this to work with the docker images here would be calling

indico db upgrade
indico db --all-plugins upgrade

before starting the uwsgi service, correct?

@pferreir
Copy link
Member

Yeah, that sounds about right.

@ThiefMaster
Copy link
Member

Yes. Just keep in mind that this only works if you run a single instance. If you scale horizontally, then executing in multiple times in parallel will likely lead to errors (not a problem, since those changes are transactional) or deadlocked queries (things get stuck and may require manual intervention).

Running the db upgrade in the celery container (which must be single-instance anyway) may be safer.

@maxnoe
Copy link
Author

maxnoe commented Sep 22, 2021

@ThiefMaster thanks, we are running a rather small deployment with a single worker, but I'll keep that in mind.

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

No branches or pull requests

3 participants