Hello
I want to upgrade my gitlab-ce 12.6.4
and I’m facing some problems. I know I have to got from 12.6.4
-> 12.10.14
-> 13.0.14
-> 13.5.1
but I’ve one problem.
When I’m trying to upgrade from the 12.6.4
to 12.10.14
I’ve problems with the postgresql upgrade.
This is my current version:
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.6.3p62
Gem Version: 2.7.9
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 3.2.12
Git Version: 2.24.1
Sidekiq Version:5.2.7
Go Version: unknown
GitLab information
Version: 12.6.4
Revision: 70900054dfe
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 9.6.14
URL: https://xtpo.com
HTTP Clone URL: https://xtpo.com/some-group/some-project.git
SSH Clone URL: git@xtpo.com:some-group/some-project.git
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 10.3.0
Repository storage paths:
- default: /mnt/gitlab-data0/repositories
- gitlab-data1: /mnt/gitlab-data1/repositories
- gitlab-data2: /mnt/gitlab-data2/repositories
- gitlab-data3: /mnt/gitlab-data3/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Git: /opt/gitlab/embedded/bin/git
If I try to go from the 12.6.4
-> 12.10.14
the upgrade fails because the postgres.
yum install gitlab-ce-12.10.14-ce.0.el7.x86_64
gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!)
2020-10-28 17:20:04 +0000 -- Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
2020-10-28 17:36:26 +0000 -- done
2020-10-28 17:36:26 +0000 -- Dumping repositories ...
2020-10-28 17:36:26 +0000 -- [SKIPPED]
2020-10-28 17:36:26 +0000 -- Dumping uploads ...
2020-10-28 17:36:26 +0000 -- [SKIPPED]
2020-10-28 17:36:26 +0000 -- Dumping builds ...
2020-10-28 17:36:26 +0000 -- [SKIPPED]
2020-10-28 17:36:26 +0000 -- Dumping artifacts ...
2020-10-28 17:36:26 +0000 -- [SKIPPED]
2020-10-28 17:36:26 +0000 -- Dumping pages ...
2020-10-28 17:36:26 +0000 -- [SKIPPED]
2020-10-28 17:36:26 +0000 -- Dumping lfs objects ...
2020-10-28 17:36:26 +0000 -- [SKIPPED]
2020-10-28 17:36:26 +0000 -- Dumping container registry images ...
2020-10-28 17:36:26 +0000 -- [DISABLED]
Creating backup archive: 1603906586_2020_10_28_12.6.4_gitlab_backup.tar ... done
Uploading backup archive to remote storage ... skipped
Deleting tmp directories ... done
done
Deleting old backups ... done. (3 removed)
Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data
and are not included in this backup. You will need these files to restore a backup.
Please back them up manually.
Backup task is done.
gitlab preinstall: Automatically backing up /etc/gitlab
Running configuration backup
Creating configuration backup archive: gitlab_config_1603906737_2020_10_28.tar
/etc/gitlab/
/etc/gitlab/gitlab-secrets.json
/etc/gitlab/trusted-certs/
/etc/gitlab/ssl/
/etc/gitlab/ssl/xtpo_com.crt
/etc/gitlab/ssl/xtpo_com.key
/etc/gitlab/ssl/xtop.com.crt
/etc/gitlab/ssl/xtpo.com.key
/etc/gitlab/gitlab.rb
Configuration backup archive complete: /etc/gitlab/config_backup/gitlab_config_1603906737_2020_10_28.tar
Updating : gitlab-ce-12.10.14-ce.0.el7.x86_64 1/2
Cleanup : gitlab-ce-12.6.4-ce.0.el7.x86_64 2/2
Checking PostgreSQL executables:Starting Chef Client, version 14.14.29
resolving cookbooks for run list: ["gitlab::config", "postgresql::bin"]
Synchronizing Cookbooks:
- gitlab (0.0.1)
- postgresql (0.1.0)
- package (0.1.0)
- redis (0.1.0)
- registry (0.1.0)
- monitoring (0.1.0)
- mattermost (0.1.0)
- consul (0.1.0)
- gitaly (0.1.0)
- nginx (0.1.0)
- letsencrypt (0.1.0)
- runit (4.3.0)
- praefect (0.1.0)
- crond (0.1.0)
- acme (4.1.1)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 3 resources
Recipe: postgresql::bin
* ruby_block[check_postgresql_version] action run (skipped due to not_if)
* ruby_block[check_postgresql_version_is_deprecated] action run (skipped due to not_if)
* ruby_block[Link postgresql bin files to the correct version] action run
- execute the ruby block Link postgresql bin files to the correct version
Running handlers:
Running handlers complete
Chef Client finished, 1/3 resources updated in 20 seconds
Checking PostgreSQL executables: OK
Checking if Grafana needs to be reset:
Status file found. Grafana is not vulnerable. Skipping reset.
Checking if Grafana needs to be reset: OK
Checking for an omnibus managed postgresql: OK
Checking if postgresql['version'] is set: OK
Checking if we already upgraded: NOT OK
Checking for a newer version of PostgreSQL to install
Upgrading PostgreSQL to 11.7
Checking if PostgreSQL bin files are symlinked to the expected location: OK
Toggling deploy page:cp /opt/gitlab/embedded/service/gitlab-rails/public/deploy.html /opt/gitlab/embedded/service/gitlab-rails/public/index.html
Toggling deploy page: OK
Toggling services:ok: down: alertmanager: 0s, normally up
ok: down: gitaly: 0s, normally up
ok: down: gitlab-exporter: 0s, normally up
ok: down: grafana: 1s, normally up
ok: down: logrotate: 0s, normally up
ok: down: node-exporter: 0s, normally up
ok: down: postgres-exporter: 1s, normally up
ok: down: prometheus: 0s, normally up
ok: down: redis-exporter: 1s, normally up
ok: down: sidekiq: 1s, normally up
Toggling services: OK
Running stop on postgresql:ok: down: postgresql: 0s, normally up
Running stop on postgresql: OK
Symlink correct version of binaries: OK
Creating temporary data directory: OK
Initializing the new database: OK
Upgrading the data:Error upgrading the data to version 11.7
STDOUT:
STDERR: timed out
Upgrading the data: NOT OK
== Fatal error ==
Error running pg_upgrade, please check logs
== Reverting ==
ok: down: postgresql: 627s, normally up
Symlink correct version of binaries: OK
ok: run: postgresql: (pid 10548) 0s
== Reverted ==
== Reverted to 9.6.17. Please check output for what went wrong ==
Toggling deploy page:rm -f /opt/gitlab/embedded/service/gitlab-rails/public/index.html
Toggling deploy page: OK
Toggling services:ok: run: alertmanager: (pid 10562) 0s
ok: run: gitaly: (pid 10564) 1s
ok: run: gitlab-exporter: (pid 10567) 0s
ok: run: grafana: (pid 10589) 1s
ok: run: logrotate: (pid 10599) 0s
ok: run: node-exporter: (pid 10612) 1s
ok: run: postgres-exporter: (pid 10619) 0s
ok: run: prometheus: (pid 10638) 0s
ok: run: redis-exporter: (pid 10650) 0s
ok: run: sidekiq: (pid 10652) 0s
Toggling services: OK
Ensuring PostgreSQL is updated: NOT OK
Error ensuring PostgreSQL is updated. Please check the logs
warning: %posttrans(gitlab-ce-12.10.14-ce.0.el7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ce-12.10.14-ce.0.el7.x86_64
Verifying : gitlab-ce-12.10.14-ce.0.el7.x86_64 1/2
Verifying : gitlab-ce-12.6.4-ce.0.el7.x86_64 2/2
Updated:
gitlab-ce.x86_64 0:12.10.14-ce.0.el7
Complete!
The GitLab are updated to the target version, but the postgresql not.
If I disable the automatic PostgreSQL upgrade during GitLab package upgrade I can go to the 12.10.14
. After that I’ve to upgrade my postgres before the GitLab 13.0.14
version but when I’m trying to upgrade manually I’ve the same issue.
Any idea what I’m doing wrong? If i go to /var/opt/gitlab/postgresql/pg_upgrade_server.log doesn’t show up any error…
Thank you.