Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
camgian opened this issue Oct 9, 2023 · 3 comments
Open

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

camgian opened this issue Oct 9, 2023 · 3 comments

Comments

@camgian
Copy link

camgian commented Oct 9, 2023

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'

@linuxoid69
Copy link

Did you resolve problem ?

@sergius02
Copy link

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
Copy link

@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.rb
  • db/post_migrate/20211026070408_backfill_issue_search_data.rb
  • db/schema_migrations/20211007090229
  • db/schema_migrations/20211026070408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants