Hello,
I have a problem with updating from 12.9.2 to 15.X.
I follow the steps from Upgrading GitLab | GitLab but the result always is error on version 13.12.15, no meter how I do it.
Here are all the console commands that I have to make before each new update and the error at the end of 13.12.15.:
#update current to this version
apt install gitlab-ce=12.10.14-ce.0
gitlab-ctl restart
gitlab-ctl restart unicorn
#if you get timeout: run: unicorn: (pid 6860) 736s
kill -9 6860 #pid from parent result row
gitlab-ctl restart unicorn
#wait and test
#update to this version
apt install gitlab-ce=13.0.14-ce.0
gitlab-ctl restart unicorn
#if you get timeout: run: unicorn: (pid 6860) 736s
kill -9 6860 #pid from parent result row
gitlab-ctl restart unicorn
#wait and test
#update to this version
apt install gitlab-ce=13.1.11-ce.0
gitlab-ctl restart
#wait and test
#update to this version
apt install gitlab-ce=13.8.8-ce.0
gitlab-ctl restart
#wait and test
#update to this version
apt install gitlab-ce=13.9.2-ce.0
gitlab-ctl restart
#wait and test
#update to this version
apt install gitlab-ce=13.10.2-ce.0
gitlab-ctl restart postgresql
gitlab-ctl reconfigure
gitlab-rails dbconsole
ALTER TABLE terraform_states ADD CONSTRAINT fk_rails_558901b030 FOREIGN KEY (locked_by_user_id) REFERENCES users (id) ON DELETE CASCADE;
gitlab-ctl restart
#wait and test
#update to this version
apt install gitlab-ce=13.12.15-ce.0
gitlab-ctl reconfigure
There was an error running gitlab-ctl reconfigure:
rails_migration[gitlab-rails] (gitlab::database_migrations line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20220725-24312-7beuat” ----
STDOUT: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::InvalidColumnReference: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:1274:in `create_or_update_plan_limit’
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20210423164702_insert_runner_registration_plan_limits.rb:7:in `up’
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:371:in `block in transaction’
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database.rb:370:in `transaction’
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:61:in `block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:23:in `load’
/opt/gitlab/embedded/bin/bundle:23:in `’
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20210423164702 InsertRunnerRegistrationPlanLimits: migrating ===============
– quote_column_name(“ci_registered_group_runners”)
→ 0.0000s
– quote(“free”)
→ 0.0000s
– quote(50)
→ 0.0000s
– execute(“INSERT INTO plan_limits (plan_id, "ci_registered_group_runners")\nSELECT id, ‘50’ FROM plans WHERE name = ‘free’ LIMIT 1\nON CONFLICT (plan_id) DO UPDATE SET "ci_registered_group_runners" = EXCLUDED."ci_registered_group_runners";\n”)
STDERR:
---- End output of “bash” “/tmp/chef-script20220725-24312-7beuat” ----
Ran “bash” “/tmp/chef-script20220725-24312-7beuat” returned 1
Running handlers complete
Chef Infra Client failed. 0 resources updated in 27 seconds
Please, can you help me – where I go wrong so I can`t update to version 15?
Thanks a lot!