Im running Gitlab on Ubuntu 18.4.3
Im trying to upgrade to the latest version, Ive run apt-get update but Im getting an error that I need to upgrade to 11.11 first.
how do I upgrade to 11.11 specifically. I couldnt find the command or process in the documentation.
if you are using the official package repository, older package versions exist. The command provided by @grove will allow you to install this specific version, instead of the latest 12.7.x at this time.
In case you are not sure what will happen in this regard, you can test-drive this in a local Docker container too.
You can also use this method to download the packages manually and then do a local install on your VM. This sometimes is required if you’re in a DMZ without internet access.
Hi Michael
I dont have docker here. gitlab is running on premise but it has access to the internet.
I ran the comand you mentioned. that is what Im gettings:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-39 linux-headers-4.15.0-39-generic linux-headers-4.15.0-72
linux-headers-4.15.0-72-generic linux-image-4.15.0-39-generic linux-image-4.15.0-72-generic
linux-modules-4.15.0-39-generic linux-modules-4.15.0-72-generic linux-modules-extra-4.15.0-39-generic
linux-modules-extra-4.15.0-72-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
gitlab-ee
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 737 MB of archives.
After this operation, 380 MB of additional disk space will be used.
Get:1 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu bionic/main amd64 gitlab-ee amd64 11.11.8-ee.0 [737 MB]
Fetched 737 MB in 8min 10s (1,505 kB/s)
(Reading database ... 257847 files and directories currently installed.)
Preparing to unpack .../gitlab-ee_11.11.8-ee.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!)
Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... pg_dump: [archiver (db)] connection to database "gitlabhq_production" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
[FAILED]
rake aborted!
Backup::Error: Backup failed
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/database.rb:49:in `dump'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:99:in `block (4 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:10:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:backup:db:create
(See full trace by running task with --trace)
gitlab preinstall:
gitlab preinstall: Backup failed! If you want to skip this backup, run the following command and
gitlab preinstall: try again:
gitlab preinstall:
gitlab preinstall: sudo touch /etc/gitlab/skip-auto-reconfigure
gitlab preinstall:
dpkg: error processing archive /var/cache/apt/archives/gitlab-ee_11.11.8-ee.0_amd64.deb (--unpack):
new gitlab-ee package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/gitlab-ee_11.11.8-ee.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Docker was just meant to easily test this in a local sandbox. I use that on my macbook a lot to test-drive things before trying that out in production.
In your call, it says that the PostgreSQL database is not running, where I’d assume that your GitLab instance is stopped? The upgrade is trying to create a backup first.
If you want to skip the upgrade, do as proposed in the last message:
gitlab preinstall:
gitlab preinstall: Backup failed! If you want to skip this backup, run the following command and
gitlab preinstall: try again:
gitlab preinstall:
gitlab preinstall: sudo touch /etc/gitlab/skip-auto-reconfigure
gitlab preinstall:
and start install again. If the above command doesn’t work, you can fix that with apt-get -f install.
I believe the instructions as a maximum tell you to stop unicorn, sidekiq and puma - I always use the zero downtime procedure, which doesn’t require you to stop anything, so I might remember it wrongly.
I stopped all gitlab services because I saw this as a 2nd step here
if there is a procedure to do it with zero downtime, can you please direct me there?
if I understand correctly I just need to run: apt-get install gitlab-ee=11.11.8-ee.0
without stopping services before?
you are using the Omnibus packages, not a source installation. Therefore the linked docs are not valid for your setup. Just let GitLab be running and do the package installation.