GitLab CE升级失败

时间:2018-08-13 11:27:00

标签: gitlab

我正在尝试将在Kubernets上运行的GitLab CE版本从9.3.2-ce.0升级到11.1.4-ce.0。但是,我不断收到此错误:

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================

RuntimeError
------------
Removed configurations found in gitlab.rb. Aborting reconfigure.

Cookbook Trace:
---------------
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/omnibus_helper.rb:109:in `check_deprecations'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:28:in `from_file'

[...]

System Info:
------------
chef_version=13.6.4
platform=ubuntu
platform_version=16.04
ruby=ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client


Running handlers:
There was an error running gitlab-ctl reconfigure:

Removed configurations found in gitlab.rb. Aborting reconfigure.


Removals:
* git_data_dir has been deprecated since 8.10 and was removed in 11.0. Use git_data_dirs instead.

Running handlers complete
Chef Client failed. 0 resources updated in 05 seconds

很明显一行:

git_data_dir has been deprecated since 8.10 and was removed in 11.0. Use git_data_dirs instead.

但是,我的配置中绝对没有git_data_dir。在/etc/gitlab/gitlab.rb中,我有这一行(唯一未注释的行):

git_data_dirs({ "default" => { "path" => "/gitlab-data/git-data/repositories", 'gitaly_address' => 'unix:/var/opt/gitlab/gitaly/gitaly.socket' } })

显然是正确的格式。我已经运行$ gitlab-ctl reconfigure,并且/var/opt/gitlab/gitlab-rails/etc/gitlab.yml中提供的正确路径包含相同的信息。

出于我的爱,我无法找出升级失败的原因。非常感谢在此问题上提供的任何帮助。

1 个答案:

答案 0 :(得分:0)

我有同样的问题。其实我忘了一步。 更改有关git_data_dirs语法的配置文件后,我要做的就是:

gitlab-ctl reconfigure

在那之后,百胜就没问题了。