[DRE-maint] Bug#1015302: Upgrading 14.10.5 to 15.0.4 aborts on db:migrate
Patrick Matthäi
patrick at linux-dev.org
Tue Jul 19 11:05:37 BST 2022
Package: gitlab
Version: 15.0.4+ds1-1
Severity: serious
Hey,
on upgrading gitlab I always end up with this error:
(1055 rows) = Did not find any relations. ]
+ echo gitlab_production database is not empty, skipping gitlab setup
gitlab_production database is not empty, skipping gitlab setup
+ runuser -u gitlab -- sh -c /usr/bin/bundle exec rake db:migrate
Attention: used pure ruby version of MurmurHash3
/usr/share/gitlab/lib/gitlab.rb:47: warning: already initialized
constant Gitlab::APP_DIRS_PATTERN
/usr/share/gitlab/lib/gitlab.rb:47: warning: previous definition of
APP_DIRS_PATTERN was here
/usr/share/gitlab/lib/gitlab.rb:48: warning: already initialized
constant Gitlab::VERSION
/usr/share/gitlab/lib/gitlab.rb:48: warning: previous definition of
VERSION was here
/usr/share/gitlab/lib/gitlab.rb:49: warning: already initialized
constant Gitlab::INSTALLATION_TYPE
/usr/share/gitlab/lib/gitlab.rb:49: warning: previous definition of
INSTALLATION_TYPE was here
/usr/share/gitlab/lib/gitlab.rb:50: warning: already initialized
constant Gitlab::HTTP_PROXY_ENV_VARS
/usr/share/gitlab/lib/gitlab.rb:50: warning: previous definition of
HTTP_PROXY_ENV_VARS was here
== 20220213103859 RemoveIntegrationsType: migrating
===========================
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Gitlab::Database::BackgroundMigration::BatchedMigrationRunner::FailedToFinalize
/usr/share/gitlab/lib/gitlab/database/background_migration/batched_migration_runner.rb:76:in
`finalize'
/usr/share/gitlab/lib/gitlab/database/background_migration/batched_migration_runner.rb:10:in
`finalize'
/usr/share/gitlab/lib/gitlab/database/migrations/batched_background_migration_helpers.rb:139:in
`finalize_batched_background_migration'
/usr/share/gitlab/lib/gitlab/database/migration_helpers.rb:962:in
`ensure_batched_background_migration_is_finished'
/usr/share/gitlab/db/post_migrate/20220213103859_remove_integrations_type.rb:48:in
`up'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:870:in
`public_send'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:870:in
`exec_migration'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:851:in
`block (2 levels) in migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:850:in
`block in migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in
`with_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:849:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1037:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1329:in
`block in execute_migration_in_transaction'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1382:in
`ddl_transaction'
/usr/share/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in
`ddl_transaction'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1328:in
`execute_migration_in_transaction'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1302:in
`each'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1302:in
`migrate_without_lock'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1251:in
`block in migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1401:in
`block in with_advisory_lock'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1416:in
`block in with_advisory_lock_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in
`with_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1416:in
`with_advisory_lock_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1397:in
`with_advisory_lock'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1251:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1086:in
`up'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1061:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/tasks/database_tasks.rb:237:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/railties/databases.rake:92:in
`block (3 levels) in <top (required)>'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/railties/databases.rake:90:in
`each'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/railties/databases.rake:90:in
`block (2 levels) in <top (required)>'
/usr/share/rubygems-integration/all/gems/sentry-ruby-core-5.3.0/lib/sentry/rake.rb:26:in
`execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.3/exe/rake:27:in
`<top (required)>'
Caused by:
Gitlab::Database::BackgroundMigration::BatchedMigrationRunner::FailedToFinalize:
Gitlab::Database::BackgroundMigration::BatchedMigrationRunner::FailedToFinalize
/usr/share/gitlab/lib/gitlab/database/background_migration/batched_migration_runner.rb:76:in
`finalize'
/usr/share/gitlab/lib/gitlab/database/background_migration/batched_migration_runner.rb:10:in
`finalize'
/usr/share/gitlab/lib/gitlab/database/migrations/batched_background_migration_helpers.rb:139:in
`finalize_batched_background_migration'
/usr/share/gitlab/lib/gitlab/database/migration_helpers.rb:962:in
`ensure_batched_background_migration_is_finished'
/usr/share/gitlab/db/post_migrate/20220213103859_remove_integrations_type.rb:48:in
`up'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:870:in
`public_send'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:870:in
`exec_migration'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:851:in
`block (2 levels) in migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:850:in
`block in migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in
`with_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:849:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1037:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1329:in
`block in execute_migration_in_transaction'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1382:in
`ddl_transaction'
/usr/share/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in
`ddl_transaction'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1328:in
`execute_migration_in_transaction'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1302:in
`each'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1302:in
`migrate_without_lock'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1251:in
`block in migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1401:in
`block in with_advisory_lock'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1416:in
`block in with_advisory_lock_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in
`with_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1416:in
`with_advisory_lock_connection'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1397:in
`with_advisory_lock'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1251:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1086:in
`up'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/migration.rb:1061:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/tasks/database_tasks.rb:237:in
`migrate'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/railties/databases.rake:92:in
`block (3 levels) in <top (required)>'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/railties/databases.rake:90:in
`each'
/usr/share/rubygems-integration/all/gems/activerecord-6.1.4.7/lib/active_record/railties/databases.rake:90:in
`block (2 levels) in <top (required)>'
/usr/share/rubygems-integration/all/gems/sentry-ruby-core-5.3.0/lib/sentry/rake.rb:26:in
`execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.3/exe/rake:27:in
`<top (required)>'
Tasks: TOP => db:migrate
To be exact it is the upgrade from 14.10.5+ds1-1~fto11+1 to
15.0.4+ds1-1~fto11+2
More information about the Pkg-ruby-extras-maintainers
mailing list