indico-containers icon indicating copy to clipboard operation
indico-containers copied to clipboard

Run db migration step before starting worker?

Open maxnoe opened this issue 4 years ago • 3 comments

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?

maxnoe avatar Sep 22 '21 07:09 maxnoe

Yeah, that sounds about right.

pferreir avatar Sep 22 '21 08:09 pferreir

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.

ThiefMaster avatar Sep 22 '21 08:09 ThiefMaster

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

maxnoe avatar Sep 22 '21 08:09 maxnoe