从 Gitlab 13.11.4 升级到 Gitlab 14.2.3

Posted

技术标签:

【中文标题】从 Gitlab 13.11.4 升级到 Gitlab 14.2.3【英文标题】:Upgrading from Gitlab 13.11.4 to Gitlab 14.2.3 【发布时间】:2021-11-03 17:29:31 【问题描述】:

我将 GitLab docker 映像更改为最新版本,但运行后,服务没有启动,只是记录了这个,我该怎么办?

    Current version: gitlab-ce=14.2.3-ce.0
    
    Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
    And restart this container to reload settings.
    To do it use docker exec:
    
      docker exec -it gitlab editor /etc/gitlab/gitlab.rb
      docker restart gitlab
    
    For a comprehensive list of configuration options please see the Omnibus GitLab readme
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
    
    If this container fails to start due to permission problems try to fix it by executing:
    
      docker exec -it gitlab update-permissions
      docker restart gitlab
    
    Cleaning stale PIDs & sockets
    It seems you are upgrading from major version 13 to major version 14.
    It is required to upgrade to the latest 14.0.x version first before proceeding.
    Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/index.html#upgrading-to-a-new-major-version

【问题讨论】:

【参考方案1】:

升级版本步骤: 8.11.Z -> 8.12.0 -> 8.17.7 -> 9.5.10 -> 10.8.7 -> 11.11.8 -> 12.0.12 -> 12.1.17 -> 12.10.14 -> 13.0.14 -> 13.1.11 -> 13.8.8 -> 最新 13.12.Z -> 最新 14.0.Z -> 14.1.Z -> 最新 14.YZ

【讨论】:

为什么?为什么要通过所有版本?另外,他已经在13.11.4,所以他不需要第一步 请在您的回答中提供更多详细信息。正如目前所写的那样,很难理解您的解决方案。 是的,但是我写了完整的版本升级步骤! @MohammadReza,我知道您是 Stack Exchange 的新手。通常你不会让别人发现问题,写详细的答案,然后在此基础上写你自己的答案并接受它。【参考方案2】:

答案已在您的帖子中:

您似乎正在从主要版本 13 升级到主要版本 14。 在继续之前需要先升级到最新的 14.0.x 版本。 请关注https://docs.gitlab.com/ee/update/index.html#upgrading-to-a-new-major-version的升级文档

This 提供更多信息。

理想情况下,您应该:

    备份您的数据文件夹 升级到13.12.11-ce(您当前主要版本的最后一个次要版本) 升级到14.0.10-ce(新主要版本的第一个次要版本) 升级到14.2.3-ce(您的目标,即新主要版本的最后一个次要版本)

查看here 获取最新的 docker 镜像列表。

【讨论】:

THX @cornuz 但是,在升级到 14.2.3-ce 后出现此错误:``` Running handlers: There was an error running gitlab-ctl reconfigure: rails_migration[gitlab-rails] (gitlab: :database_migrations 第 51 行)有一个错误:Mixlib::ShellOut::ShellCommandFailed: bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb 第 16 行)一个错误:Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of "bash" "/tmp/chef-script20210906-30-1ha3n27" --- - 标准输出:耙子中止! ``` 如果您的意思是在您第一次尝试从 13.11.4 直接到 14.2.3 失败之后,那么您应该从您希望拥有的备份中重新开始正确的过程。如果您的意思是在正确的程序之后,那么我会问他们,可能会在 Gitlab 本身上打开一个问题。 我按照你在最后一步(14.2.3-ce)中所说的步骤升级了,我有这个错误!;现在我的 gitlab 版本是 14.0.10-ce 并且可以正常工作。

以上是关于从 Gitlab 13.11.4 升级到 Gitlab 14.2.3的主要内容,如果未能解决你的问题,请参考以下文章

gitlab从8.6.5升级到8.11.7(补丁版本通用更新指南)

gitlab 启用HTTPS

Jenkins + gitlab 集成 实现自动构建

gitlab搭建

使用 cURL 使用用户名和密码登录 Gitlab

卸载gitlab