Heads up for 12.1 which will remove support for mysql.
Anyone has migrated from mysql to postgresql successfully?
This is official docs https://docs.gitlab.com/ee/update/mysql_to_postgresql.html, but I have not tryied yet
I did yesterday and it was a bit tricky. Mainly because pgloader 3.5.2, wich was distributed by apt inside the gitlab and postgresql containers, was bugged. I finally ended up using the latest pgloader docker image (dimitri/pgloader).
Some more tips:
I'm on 12.0.4.
I completed the migration and now the GitLab won't start:
2019-08-23 09:33:54,144 INFO success: gitaly entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:33:54,145 INFO success: gitlab-workhorse entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:33:54,145 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:33:54,145 INFO success: sidekiq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:33:54,145 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:33:54,146 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:33:54,146 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:35:05,159 INFO exited: unicorn (exit status 1; not expected)
2019-08-23 09:35:05,183 INFO spawned: 'unicorn' with pid 3092
2019-08-23 09:35:05,206 INFO exited: sidekiq (exit status 1; not expected)
2019-08-23 09:35:05,614 INFO spawned: 'sidekiq' with pid 3093
2019-08-23 09:35:06,197 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:35:07,134 INFO success: sidekiq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:35:38,031 INFO exited: unicorn (exit status 1; not expected)
2019-08-23 09:35:38,203 INFO spawned: 'unicorn' with pid 3104
2019-08-23 09:35:38,892 INFO exited: sidekiq (exit status 1; not expected)
2019-08-23 09:35:39,422 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:35:39,424 INFO spawned: 'sidekiq' with pid 3105
2019-08-23 09:35:40,568 INFO success: sidekiq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-23 09:36:11,940 INFO exited: unicorn (exit status 1; not expected)
2019-08-23 09:36:12,481 INFO spawned: 'unicorn' with pid 3118
I tried recreating the container, but so far nothing has worked.
Any ideas, how to fix it (besides rolling back to mysql)?
@northway you could look at the unicorn log to get a better idea of why it's failing.
Do docker-compose exec gitlab bash to get inside the gitlab container then look at /var/log/gitlab/unicorn.stderr.log (and maybe unicorn.stdout.log).
After a Docker host restart the same thing is happening and I'm still on MySQL.
Here's the unicorn log:
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:205:in `pid=': Already running on PID:2951 (or pid=/home/git/gitlab/tmp/pids/unicorn.pid is stale) (ArgumentError)
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:137:in `start'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/bin/unicorn_rails:209:in `<top (required)>'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/unicorn_rails:23:in `load'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/unicorn_rails:23:in `<main>'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:205:in `pid=': Already running on PID:2951 (or pid=/home/git/gitlab/tmp/pids/unicorn.pid is stale) (ArgumentError)
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:137:in `start'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/bin/unicorn_rails:209:in `<top (required)>'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/unicorn_rails:23:in `load'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/unicorn_rails:23:in `<main>'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:205:in `pid=': Already running on PID:2951 (or pid=/home/git/gitlab/tmp/pids/unicorn.pid is stale) (ArgumentError)
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:137:in `start'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/unicorn-5.4.1/bin/unicorn_rails:209:in `<top (required)>'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/unicorn_rails:23:in `load'
from /home/git/gitlab/vendor/bundle/ruby/2.6.0/bin/unicorn_rails:23:in `<main>'
After recreating egy the container this issue is gone.
Back to migrate in question:
Here's how I did it, mainly following the migration guide. Important: This must be done before any upgrade of Gitlab.
docker-compose run --rm gitlab app:rake db:create db:migrateThis issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.
Most helpful comment
Here's how I did it, mainly following the migration guide. Important: This must be done before any upgrade of Gitlab.
docker-compose run --rm gitlab app:rake db:create db:migrate