Gitlabce omnibus package fails to update with external postgresql
Summary
Updating to gitlab-ce 13.5.4-ce.0 from 13.5.3-ce.0 using apt package fails with external managed prostgresql:
gitlab preinstall: gitlab preinstall: Database backup failed! If you want to skip this backup, run the following command and try again: gitlab preinstall: gitlab preinstall: sudo touch /etc/gitlab/skip-auto-backup gitlab preinstall:
While previous versions were aware of the fact that the database was managed externally.
Steps to reproduce
sudo apt update && sudo apt upgrade
What is the current bug behavior?
the update fails: while previous versions (including 13.5.3-ce.0) were happily continuing to install, this release stops.
What is the expected correct behavior?
the update should continue: the database backup shouldn't be a concern of gitlab-ce installation package as it is externally managed. A warn should be sufficient.
Relevant logs
Relevant logs
Preparing to unpack .../gitlab-ce_13.5.4-ce.0_amd64.deb ...
gitlab preinstall:
gitlab preinstall: This node does not appear to be running a database
gitlab preinstall: Skipping version check, if you think this is an error exit now
gitlab preinstall:
gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!)
2020-11-16 07:47:03 +0000 -- ESC[34mDumping database ... ESC[0m
Dumping PostgreSQL database gitlab ... pg_dump: error: connection to database "gitlab" failed: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
ESC[31m[FAILED]ESC[0m
rake aborted!
Backup::Error: Backup failed
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/database.rb:62:in `dump'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:132:in `block (4 levels) in '
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:10:in `block (3 levels) in '
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `'
Tasks: TOP => gitlab:backup:db:create
(See full trace by running task with --trace)
gitlab preinstall:
gitlab preinstall: Database backup failed! If you want to skip this backup, run the following command and try again:
gitlab preinstall:
gitlab preinstall: sudo touch /etc/gitlab/skip-auto-backup
gitlab preinstall:
ESC[1mdpkg:ESC[0m error processing archive /var/cache/apt/archives/gitlab-ce_13.5.4-ce.0_amd64.deb (--unpack):
new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/gitlab-ce_13.5.4-ce.0_amd64.deb
Log ended: 2020-11-16 07:47:16
Details of package version
Provide the package version installation details
gitlab-ce 13.5.3-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)
Environment details
- Operating System:
REPLACE-WITH-DETAILS - Installation Target, remove incorrect values:
- VM: Digital Ocean
- Installation Type, remove incorrect values:
- Upgrade from version 13.5.3-ce.0
- Is there any other software running on the machine: postgresql, apache
- Is this a single or multiple node installation? single
- Resources
- CPU: 4
- Memory total: 8152932
Configuration details
Provide the relevant sections of `/etc/gitlab/gitlab.rb`
external_url 'http://git.fermasoft.com' gitlab_rails['db_adapter'] = "postgresql" gitlab_rails['db_encoding'] = "utf-8" gitlab_rails['db_database'] = "gitlab" gitlab_rails['db_pool'] = 10 gitlab_rails['db_username'] = "somename" gitlab_rails['db_password'] = "somepassword" gitlab_rails['db_host'] = "127.0.0.1" gitlab_rails['db_port'] = 5432 gitlab_rails['db_prepared_statements'] = true gitlab_rails['db_statements_limit'] = 1000 gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "somesmtp" gitlab_rails['smtp_port'] = 587 gitlab_rails['smtp_user_name'] = "somename" gitlab_rails['smtp_password'] = "somepassword" gitlab_rails['smtp_domain'] = "somesmtp" gitlab_rails['smtp_authentication'] = "someauthmethod" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['gitlab_email_from'] = 'somename' gitlab_rails['gitlab_email_reply_to'] = 'someemail' postgresql['enable'] = false web_server['username'] = 'www-data' web_server['group'] = 'www-data' nginx['enable'] = false