sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.9k stars 2.14k forks source link

Upgrade from gitlab:16.2.8 to gitlab:16.3.0 fails #2844

Open camgian opened 1 year ago

camgian commented 1 year ago

Cannot upgrade from 16.2.8 to 16.3.0

Is anyone having a similar issue?

1st error From docker logs

2023-10-09 14:25:16,942 INFO gave up: sshd entered FATAL state, too many start retries too quickly /home/git/gitlab/lib/gitlab/instrumentation/redis.rb:9: warning: already initialized constant Gitlab::Instrumentation::Redis::ActionCable /home/git/gitlab/lib/gitlab/instrumentation/redis.rb:9: warning: previous definition of ActionCable was here rake aborted! StandardError: An error has occurred, all later migrations canceled:

PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "postgres_async_foreign_key_validations_pkey" DETAIL: Key (id)=(9) already exists. /home/git/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:768:in exec_params' /home/git/gitlab/vendor/bundle/ruby/3.0.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:768:inblock (2 levels) in exec_no_cache' /home/git/gitlab/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.6/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'

linuxoid69 commented 10 months ago

Did you resolve problem ?

sergius02 commented 9 months ago

Same problem but diferent log, in my case:

postgresql_1 | 2024-01-26 12:21:47.342 UTC [114] ERROR: relation "issue_search_data" does not exist

claytonsingh commented 8 months ago

@sergius02 I ran into the same issue and my fix was to reapply a missing schema migration. If you get an error saying the migration does not exist you need to add them to the filesystem.

gitlab-rake db:migrate:up VERSION=20211007090229
gitlab-rake db:migrate:up VERSION=20211026070408
gitlab-ctl reconfigure

Migrations are from https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71913/diffs and go in /opt/gitlab/embedded/service/gitlab-rails/ on the non-docker version.