docker-gitlab
docker-gitlab copied to clipboard
Upgrade from gitlab:16.2.8 to gitlab:16.3.0 fails
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:in block (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'
Did you resolve problem ?
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
@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.
db/migrate/20211007090229_create_issue_search_table.rbdb/post_migrate/20211026070408_backfill_issue_search_data.rbdb/schema_migrations/20211007090229db/schema_migrations/20211026070408