Open major opened 1 year ago
Did the -db-migrate
job finish successfully?
I'm facing this exact issue on a Mastodon deployment with docker-compose.
How would I check if the -db-migrate
job finished successfully?
Is the pod or the job from the migration job still around? Do you have access to the logs from the migration job?
I'm facing the same issue.
These are the logs of the dbmigrate pod and the job: https://gist.github.com/dictvm/0d8200f323b2d8aeaf9638a1521d20b0
I'm getting this same error on a fresh setup. I noticed in my web container I also have the error:
/opt/mastodon/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in `exec': ERROR: relation "accounts" does not exist (PG::UndefinedTable)
LINE 8: WHERE a.attrelid = '"accounts"'::regclass
This issue still exist...
The solution is in https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Docker-Guide.md I did "docker-compose run --rm web rake mastodon:setup" and build a correct database.
@waldemarschroeder thanks, but this doesn't help when using the Helm Chart. For some reason the db-migrate
is not being created when installing the chart.
@dictvm I did a successful Mastodon Installation with docker. With Docker you can use "docker-compose run --rm web rake db:migrate" to do a db migration. In Kubernetes you should be able to do the same with kubectl. Source: https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Docker-Guide.md
Hey there, thanks! We fixed the issue by moving the db-migrate job to an initContainer in the mastodon-web Deployment.
We'll probably provide a PR some time next week, in case anyone else is interested in that approach.
Each time I try to deploy this helm chart with the included postgres, the deployment fails and the postgres container has this in the logs: