Upgrade from 12.2.0 to 14

Hi!
I plan on upgrading our GitLab Community Edition 12.2.0 to 14 tomorrow on our Debian 9 server.

Which steps should i use when upgrading from 12.2.0 ?

Is the following correct?:

12.2.012.10.1413.0.14 13.1.11 13.8.8 latest 13.12.Z latest 14.0.Z

Hi,

Yep, as per the docs pretty much:

12.10.1413.0.14 13.1.11 13.8.8 latest 13.12.Z latest 14.0.Z latest 14.Y.Z

however, once you get to latest 14.0.Z release, if you want to go further I suggest then doing this:

  1. Upgrade to 14.1.x
  2. Upgrade to 14.2.x
  3. Upgrade to 14.3.x

That of course depends on if Debian 9 does actually support any versions higher than this (edit: just checked, yes you can go to 14.3.0). For each version, you would do the upgrade like this:

apt install gitlab-ce=12.10.14-ce.0

then check all background migrations have finished. Once checked and migrations showing 0, then you can do the next upgrade on the list. And repeat, background migration check, next upgrade.

This link will help you with the exact version number: gitlab/gitlab-ce - Results for stretch in gitlab/gitlab-ce

you can check the package list to find out the exact filename for 12.10.14, 13.0.14, etc.

1 Like

Thank you

1 Like

I have upgraded to 12.10.14 now but have a failing background migration job. @iwalker

NameError: uninitialized constant Gitlab::BackgroundMigration::PopulateMergeRequestMetricsWithEventsDataImproved Did you mean? Gitlab::BackgroundMigration::PopulateMergeRequestAssigneesTable

--------------------------------------------------------------------------------
 GitLab:       12.10.14 (fe3e5d62b3e) FOSS
 GitLab Shell: 12.2.0
 PostgreSQL:   11.7
--------------------------------------------------------------------------------
Loading production environment (Rails 6.0.2)
irb(main):001:0> scheduled_queue = Sidekiq::ScheduledSet.new
=> #<Sidekiq::ScheduledSet:0x00007fa47f9ccbf8 @name="schedule", @_size=2>
irb(main):002:0> pending_job_classes = scheduled_queue.select { |job| job["class"] == "BackgroundMigrationWorker" }.map { |job| job["args"].first }.uniq
=> ["PopulateMergeRequestMetricsWithEventsDataImproved"]
irb(main):003:0> pending_job_classes.each { |job_class| Gitlab::BackgroundMigration.steal(job_class) }
Traceback (most recent call last):
       10: from (irb):3
        9: from (irb):3:in `each'
        8: from (irb):3:in `block in irb_binding'
        7: from lib/gitlab/background_migration.rb:30:in `steal'
        6: from lib/gitlab/background_migration.rb:30:in `each'
        5: from lib/gitlab/background_migration.rb:31:in `block in steal'
        4: from lib/gitlab/background_migration.rb:38:in `block (2 levels) in steal'
        3: from lib/gitlab/background_migration.rb:58:in `perform'
        2: from lib/gitlab/background_migration.rb:103:in `migration_class_for'
        1: from lib/gitlab/background_migration.rb:103:in `const_get'
NameError (uninitialized constant Gitlab::BackgroundMigration::PopulateMergeRequestMetricsWithEventsDataImproved)
Did you mean?  Gitlab::BackgroundMigration::PopulateMergeRequestAssigneesTable
irb(main):004:0>

I continued with upgrading, the job seems to have been successfull when upgrading to 13.12.12

1 Like