Uprading gitlab from 14.1.6 to 14.2.X

Hello all!

I see there are a few issues related to upgrading gitlab into the 14.X.X releases, I’ve searched, tried, and failed to implement multiple fixes, and am at a loss. Was wondering if I could get a bit of assistance. I’ve run the db:migrate, reconfigure, restart commands, have tried upgrading while the gitlab process was stopped, ran the commands given by the error message and nothing. Using centos 7.9

Expected batched background migration for the given configuration to be marked as ‘finished’, but it is ‘active’: {:job_class_name=>“CopyColumnUsingBackgroundMigrationJob”, :table_name=>“ci_stages”, :column_name=>“id”, :job_arguments=>[[“id”], [“id_convert_to_bigint”]]}

Finalize it manualy by running

    sudo gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_stages,id,'[["id"]\, ["id_convert_to_bigint"]]']

For more information, check the documentation

    https://docs.gitlab.com/ee/user/admin_area/monitoring/background_migrations.html#database-migrations-failing-because-of-batched-background-migration-not-finished

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:1129:in ensure_batched_background_migration_is_finished' /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20210707210916_finalize_ci_stages_bigint_conversion.rb:13:in up’
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in

Caused by:
Expected batched background migration for the given configuration to be marked as ‘finished’, but it is ‘active’: {:job_class_name=>“CopyColumnUsingBackgroundMigrationJob”, :table_name=>“ci_stages”, :column_name=>“id”, :job_arguments=>[[“id”], [“id_convert_to_bigint”]]}

Finalize it manualy by running

    sudo gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_stages,id,'[["id"]\, ["id_convert_to_bigint"]]']

For more information, check the documentation

/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:1129:in ensure_batched_background_migration_is_finished' /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20210707210916_finalize_ci_stages_bigint_conversion.rb:13:in up’
/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)

Thank you

  • nick