Reputation: 3067
We are running an old Gitlab Instance with 7.3.2 Omnibus Installation as I see. The Server was setup by someone who is not longer reachable. I tried to upgrade directly through omnibus from 7 to 10 but that did not work. When executing gitlab-ctl reconfigure
I get the following Error
Recipe: gitlab::database_migrations
* bash[migrate gitlab-rails database] action run
[execute] rake aborted!
PG::ConnectionBad: 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"?
/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 `<main>'
Tasks: TOP => gitlab:db:configure
(See full trace by running task with --trace)
================================================================================
Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20171203-14483-19wea60" ----
STDOUT: rake aborted!
PG::ConnectionBad: 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"?
/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 `<main>'
Tasks: TOP => gitlab:db:configure
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20171203-14483-19wea60" ----
Ran "bash" "/tmp/chef-script20171203-14483-19wea60" returned 1
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb
51: bash "migrate gitlab-rails database" do
52: code <<-EOH
53: set -e
54: log_file="#{node['gitlab']['gitlab-rails']['log_directory']}/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log"
55: umask 077
56: /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}
57: STATUS=${PIPESTATUS[0]}
58: echo $STATUS > #{db_migrate_status_file}
59: exit $STATUS
60: EOH
61: environment env_variables unless env_variables.empty?
62: notifies :run, "execute[clear the gitlab-rails cache]", :immediately
63: dependent_services.each do |svc|
64: notifies :restart, svc, :immediately
65: end
66: not_if "(test -f #{db_migrate_status_file}) && (cat #{db_migrate_status_file} | grep -Fx 0)"
67: only_if { node['gitlab']['gitlab-rails']['auto_migrate'] }
68: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb:51:in `from_file'
bash("migrate gitlab-rails database") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
command "migrate gitlab-rails database"
backup 5
returns 0
code " set -e\n log_file=\"/var/log/gitlab/gitlab-rails/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log\"\n umask 077\n /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}\n STATUS=${PIPESTATUS[0]}\n echo $STATUS > /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-da70bc4\n exit $STATUS\n"
interpreter "bash"
declared_type :bash
cookbook_name "gitlab"
recipe_name "database_migrations"
not_if "(test -f /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-da70bc4) && (cat /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-da70bc4 | grep -Fx 0)"
only_if { #code block }
end
Platform:
---------
x86_64-linux
Running handlers:
Running handlers complete
Chef Client failed. 3 resources updated in 36 seconds
I read a lot in the docs, but there are so much information, that I cannot get the update working. So what are the required steps to get the installation to a current release and what are the critical steps to take?
Upvotes: 0
Views: 1009
Reputation: 2705
In general you should not jump across multiple major versions (i.e. 7.x, 8.x, 9.x and 10.x are major versions. They contain breaking changes.
From your current version of 7.3, I recommend trying to upgrade to 7.14.x, then to 8.0.x, 8.17.x, 9.0, 9.5.x, 10.0, 10.latext (whatever is latest at the time. After each step, verify that the web UI works and you can clone/push. Also follow the logs to check for obvious errors - sudo gitlab-ctl tail
.
If you're using the GitLab package repository to upgrade (via yum/apt) you can find the specific version/install command you need to use at https://packages.gitlab.com/gitlab/gitlab-ce. Search for a version string such as 10.1.
. Click on the RPM or Deb package for your OS version, then you will see an install command such as apt-get install gitlab-ce=10.1.5-ce.0
(Ubuntu Trusty) or yum install gitlab-ce-10.1.5-ce.0.el7.x86_64
(CentOS/RHEL 7). No need to repeat the curl | bash
bit each time.
Upvotes: 1