APT Package fails to update from 8.17.3-ce to 9.0.0-ce.0
As instructed by the label 'update asap', I have tried to update to the latest package version by using apt-get upgrade
. Worked every tim before.
This time it failed with messages below.
I was upgrading from 8.17.3 CE, running on Ubuntu 16.04.2, connected to an external PostgreSQL that was installed using gitlab-ce on a separate host. The gitlab-ce on the DB host is kept updated via apt-get as well.
This issue is similar to to #2123 (closed), but my DB is on separate host.
I ran gitlab-ctl reconfigure
as instructed in the log to generate missing file. This brought back my installation (now running 9.0) and from the large amount of changes done by Chef on the first try, it did the actual update.
The APT package is still marked as incompletely installed, blocking me from future updates.
Checking PostgreSQL executables: OK
Checking for an omnibus managed postgresql: NOT OK
No currently installed postgresql in the omnibus instance found.
Checking if we already upgraded: NOT OK
Checking for a newer version of PostgreSQL to install: OK
Upgrading PostgreSQL to 9.6.1
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: logrotate: 1s, normally up
ok: down: registry: 0s, normally up
ok: down: sidekiq: 0s, normally up
Toggling services: OK
There wasn an error fetching locale and encoding information from the database
Please ensure the database is running and functional before running pg-upgrade
STDOUT: /opt/gitlab/bin/gitlab-psql error: could not load /opt/gitlab/etc/gitlab-psql-rc
Either you are not allowed to read the file, or it does not exist yet.
You can generate it with: sudo gitlab-ctl reconfigure
STDERR:
Stopping the database: OK
Update the symlinks: OK
Creating temporary data directory: OK
Initializing the new database:Error initializing database for 9.6.1
STDOUT: The files belonging to this database system will be owned by user "gitlab-psql".
This user must also own the server process.
STDERR: initdb: invalid locale name "--encoding"
== Fatal error ==
Please check the output and try again
== Reverting ==
== Reverted ==
== Reverted to 9.2.18. 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: logrotate: (pid 4130) 0s
ok: run: registry: (pid 4137) 1s
ok: run: sidekiq: (pid 4143) 0s
Toggling services: OK
Ensuring PostgreSQL is updated: NOT OK
Error ensuring PostgreSQL is updated. Please check the logs