记一次Gitlab升级, 14.6.0-ee到14.10.0-ee

升级原因:Gitlab无法删除项目,点删除按钮后项目依然存在,打开后提示“No repository”,(不确定是否这个版本问题,想通过版本升级重装一遍看能否解决问题)

升级过程:

时间:2022-04-27 当前最新版本GitLab Enterprise Edition 14.10.0-ee

1、官方指导说升级到最新版本直接

yum install -y gitlab-ee

Create a GitLab upgrade plan | GitLab

但是,我这儿执行后,提示没有可升级内容Nothing to do ,但是查看我的版本是14.6.0并不是最新版本;

于是按照安装时的步骤,重新添加安装包库

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

再次yum install -y gitlab-ee 正常升级安装

2、程序运行完成后,Gitlab无法访问,运行日志显示升级过程有错误,信息如下:

Recipe: gitlab::database_migrations
  * ruby_block[check remote PG version] action nothing (skipped due to action :nothing)
  * rails_migration[gitlab-rails] action run
    * bash[migrate gitlab-rails database] action run
 =========================================================================
      Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
 =========================================================================
      Mixlib::ShellOut::ShellCommandFailed
      ------------------------------------
      Command execution failed. STDOUT/STDERR suppressed for sensitive resource
      
      Resource Declaration:
      ---------------------
      suppressed sensitive resource output
      
      Compiled Resource:
      ------------------
      suppressed sensitive resource output
      
      System Info:
      ------------
      chef_version=15.17.4
      platform=centos
      platform_version=7.9.2009
      ruby=ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
      program_name=/opt/gitlab/embedded/bin/chef-client
      executable=/opt/gitlab/embedded/bin/chef-client
  ========================================================================
    Error executing action `run` on resource 'rails_migration[gitlab-rails]'
 =========================================================================
    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Command execution failed. STDOUT/STDERR suppressed for sensitive resource
    
    Resource Declaration:
    ---------------------
    # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb
    
     51: rails_migration "gitlab-rails" do
     52:   rake_task 'gitlab:db:configure'
     53:   logfile_prefix 'gitlab-rails-db-migrate'
     54:   helper migration_helper
     55: 
     56:   environment env_variables
     57:   dependent_services dependent_services
     58:   notifies :run, "execute[clear the gitlab-rails cache]", :immediately
     59:   notifies :run, "ruby_block[check remote PG version]", :immediately
     60: 
     61:   only_if { migration_helper.attributes_node['auto_migrate'] }
     62: end
    
    Compiled Resource:
    ------------------
    # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb:51:in `from_file'
    
    rails_migration("gitlab-rails") do
      action [:run]
      default_guard_interpreter :default
      declared_type :rails_migration
      cookbook_name "gitlab"
      recipe_name "database_migrations"
      rake_task "gitlab:db:configure"
      logfile_prefix "gitlab-rails-db-migrate"
      helper "*sensitive value suppressed*"
      environment "*sensitive value suppressed*"
      dependent_services []
      only_if { #code block }
    end
    
    System Info:
    ------------
    chef_version=15.17.4
    platform=centos
    platform_version=7.9.2009
    ruby=ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
    program_name=/opt/gitlab/embedded/bin/chef-client
    executable=/opt/gitlab/embedded/bin/chef-client
    
Recipe: gitlab::gitlab-rails
  * execute[clear the gitlab-rails cache] action run
    - execute /opt/gitlab/bin/gitlab-rake cache:clear
Recipe: gitaly::enable
  * runit_service[gitaly] action hup
    - send hup to runit_service[gitaly]
Recipe: gitlab-kas::enable
  * runit_service[gitlab-kas] action restart (up to date)

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

rails_migration[gitlab-rails] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Command execution failed. STDOUT/STDERR suppressed for sensitive resource


Notes:
Found old initial root password file at /etc/gitlab/initial_root_password and deleted it.

Running handlers complete
Chef Infra Client failed. 56 resources updated in 01 minutes 07 seconds

Notes:
Found old initial root password file at /etc/gitlab/initial_root_password and deleted it.

===
There was an error running gitlab-ctl reconfigure. Please check the output above for more
details.
===
warning: %posttrans(gitlab-ee-14.10.0-ee.0.el7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ee-14.10.0-ee.0.el7.x86_64
  Verifying  : gitlab-ee-14.10.0-ee.0.el7.x86_64                                                                                                                                                                                                                          1/2 
  Verifying  : gitlab-ee-14.6.0-ee.0.el7.x86_64                                                                                                                                                                                                                           2/2 

Updated:
  gitlab-ee.x86_64 0:14.10.0-ee.0.el7                                                                                                                                                                                                                                         

Complete!

按提示看应该是有迁移过程失败,手动执行迁移命令,并打印详细信息

gitlab-rake db:migrate --trace

会提示出错误原因,我的执行后给出了解决办法:

sudo gitlab-rake gitlab:background_migrations:finalize[ProjectNamespaces::BackfillProjectNamespaces,projects,id,'[null\,"up"]']

然后执行:gitlab-rake db:migrate:status 查看迁移状态,此时都up了,至此升级问题解决完成

3、执行 gitlab-ctl reconfigure 重新配置,配置后无法访问

gitlab-ctl tail 后查看日志502 

/var/opt/gitlab/gitlab-rails/sockets/gitlab.socketconnectconnection refused"

重启后解决

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这是一个使用 logistic 回归模型进行二分类问题建模得到的结果表格,其中包含了模型参数、标准误差、假设检验结果以及模型性能指标等信息。具体解释如下: - net1:模型名称或编号。 - Coef.:每个特征的系数,用于计算该特征对分类结果的贡献。例如,party 特征的系数为 3.579,表示该特征对分类结果的贡献比其他特征更大。 - St.Err.:每个系数的标准误差,反映了该系数的抽样误差大小。 - t-value:各个系数的 t 值,用于检验该系数是否显著。例如,party 特征的 t 值为 11.08,p 值为 0,说明该特征对分类结果的贡献是显著的。 - p-value:各个系数的 p 值,用于检验该系数是否显著。例如,gender 特征的 p 值为 0.213,大于 0.05,说明该特征对分类结果的贡献不显著。 - [95% Conf. Interval]:每个系数的置信区间,用于表示该系数的真实值可能落在哪个区间内。 - Sig:各个系数的显著性标识,用于表示该系数是否显著。例如,*** 表示 p<.01,即该特征对分类结果的贡献非常显著。 - Mean dependent var:样本的平均分类结果,例如该样本中 35.1% 的个体分类为正例。 - SD dependent var:样本分类结果的标准差,例如该样本中分类结果的标准差为 0.477。 - Pseudo r-squared:模型的拟合优度指标,表示模型对样本分类结果的解释程度,此处为伪 R 方。该值越高,模型对样本分类结果的解释越好。 - Number of obs:样本的观测数,即样本量。 - Chi-square:模型的卡方值,用于检验模型的拟合优度。该值越大,说明模型对样本分类结果的解释能力越强。 - Prob > chi2:卡方检验结果的 p 值,用于检验模型的拟合优度是否显著。 - Akaike crit. (AIC):模型的 AIC 值,用于比较不同模型的拟合优度。该值越小,说明模型对未知样本的预测能力越好。 - Bayesian crit. (BIC):模型的 BIC 值,用于比较不同模型的拟合优度。该值越小,说明模型对未知样本的预测能力越好。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值