Accidentally upgraded my gitlab: Now "Gitlab is taking too much time to respond" (Error 502)

Hello everyone!

I’ve made the mistake to upgrade my old version of gitlab to version 12.10.3 with the yum update command, before checking the upgrade recommandation. Now, Gitlab refuses to start, with the 502 error message:

Whoops, GitLab is taking too much time to respond.

I’ve tried to start Gitlab with no result:

[admin@gitlab ~]$ sudo gitlab-ctl start
ok: run: alertmanager: (pid 1355) 1031s
ok: run: gitaly: (pid 1337) 1031s
timeout: down: gitlab-monitor: 1s, normally up, want up
ok: run: gitlab-workhorse: (pid 1343) 1061s
ok: run: logrotate: (pid 1342) 1061s
ok: run: nginx: (pid 1352) 1061s
ok: run: node-exporter: (pid 1353) 1061s
ok: run: postgres-exporter: (pid 1330) 1061s
ok: run: postgresql: (pid 1334) 1061s
ok: run: prometheus: (pid 32297) 0s
ok: run: redis: (pid 1336) 1063s
ok: run: redis-exporter: (pid 1349) 1063s
ok: run: sidekiq: (pid 1332) 1063s
ok: run: unicorn: (pid 32279) 1s

I’ve also tried to debug by executing gitlab-ctl reconfigure, and it seems the database is too old for this kind of version:

There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20200506-32343-1okix2c” ----
STDOUT: rake aborted!
Your current database version is too old to be migrated. You should upgrade to G itLab 11.11.0 before moving to this version. Please see GitLab release and maintenance policy | GitLab
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/migrate/schema_check.rake:13 :in block in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49: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 => schema_version_check
(See full trace by running task with --trace)
STDERR:
---- End output of “bash” “/tmp/chef-script20200506-32343-1okix2c” ----
Ran “bash” “/tmp/chef-script20200506-32343-1okix2c” returned 1

Running handlers complete
Chef Client failed. 72 resources updated in 01 minutes 16 seconds

The problem is that I don’t remember the previous version, I just remember that I was in version 8.X. I think the version was v8.30.1 because of the following result:

[admin@gitlab ~]$ grep gitlab /opt/gitlab/version-manifest.txt
gitlab-ee 12.10.3
gitlab-config-template         12.10.3
gitlab-cookbooks               12.10.3
gitlab-ctl                     12.10.3
gitlab-ctl-ee                  12.10.3
gitlab-elasticsearch-indexer   v2.2.0                                     git:df                                                                                                                                                             2eb85353e89ad66d52202d52cdffa8857ef14b
gitlab-exporter                7.0.1
gitlab-geo-psql                bc339ea21bdbb329263ad93788aaa428
gitlab-healthcheck             90e6447aeead4a29ac9fffc15945ce6b
gitlab-pages                   v1.17.0                                    git:dd                                                                                                                                                             46b590ff7bbd6a628acbd7191f5e31847a4c52
gitlab-pg-ctl                  71f87e0dc829f288dfbec8991cc43675
gitlab-psql                    7e11364159031db0eb55867ad3d5713b
gitlab-rails                   v12.10.3-ee                                git:7c                                                                                                                                                             0ab260960c57825b1c5ab1295ebec1a9288d60
gitlab-redis-cli               c44b184e13a2ff40d6f71b3eff6bf6ee
gitlab-scripts                 12.10.3
gitlab-selinux                 12.10.3
gitlab-shell                   v12.2.0                                    git:f6                                                                                                                                                             2a4b2fb89754372a346f24659212eb8da13601
gitlab-workhorse               v8.30.1                                    git:65                                                                                                                                                             ce801695b714c53b1a4daa28f8e90f3ba2b35a
pgbouncer-exporter             v0.1.3-gitlab                              git:52                                                                                                                                                             9debe7770e650d6b2fb2862c0ee7ed0d3c8ef4
registry                       v2.9.0-gitlab                              git:ae

Can I revert the process? I’ve red some tutorials about how to downgrade, but I rather prefer to be cautious and ask the community before making another mistake.

Many thanks in advance for your help :relaxed: