Gitlab 无法升级到第 9 版

Gitlab 无法升级到第 9 版

这就是我所拥有的,

[git]~> dpkg -l | grep gitlab
rc  gitlab                               7.7.2-omnibus.5.4.2.ci-1          amd64        The full stack of gitlab
iF  gitlab-ce                            9.0.0-ce.0                        amd64        GitLab Community Edition (including NGINX, Postgres, Redis)
ii  gitlab-ci-multi-runner 

这就是我尝试升级时发生的情况。

  [git]~> apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-101 linux-headers-3.13.0-101-generic
  linux-image-3.13.0-101-generic linux-image-extra-3.13.0-101-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up gitlab-ce (9.0.0-ce.0) ...


       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.

     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:

sudo gitlab-ctl reconfigure

gitlab: GitLab should be reachable at http://git.tumo.lab
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab: 
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab: 
Checking PostgreSQL executables:Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab::postgresql-bin"]
Synchronizing Cookbooks:
  - package (0.0.0)
  - gitlab (0.0.1)
  - runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 1 resources
Recipe: gitlab::postgresql-bin
  * ruby_block[Link postgresql bin files to the correct version] action run (skipped due to only_if)

Running handlers:
Running handlers complete
Chef Client finished, 0/1 resources updated in 02 seconds
Checking PostgreSQL executables: OK
Checking for an omnibus managed postgresql: OK
Checking if we already upgraded: NOT OK
Checking for a newer version of PostgreSQL to install: OK
Upgrading PostgreSQL to 9.6.1
Checking if PostgreSQL bin files are symlinked to the expected location: OK
Toggling deploy page:cp /opt/gitlab/embedded/service/gitlab-rails/public/deploy.html /opt/gitlab/embedded/service/gitlab-rails/public/index.html
Toggling deploy page: OK
Toggling services:ok: down: logrotate: 0s, normally up
ok: down: sidekiq: 1s, normally up
Toggling services: OK
Stopping the database:ok: down: postgresql: 0s, normally up
Stopping the database: OK
Update the symlinks: OK
Creating temporary data directory:Error creating new directory: /var/opt/gitlab/postgresql/data.9.6.1
STDOUT: 
STDERR: -su: 11: /etc/profile.d/zscript.sh: function: not found
-su: 12: local: not in a function
Creating temporary data directory: NOT OK
== Fatal error ==
Please check the output
== Reverting ==
ok: down: postgresql: 1s, normally up
ok: run: postgresql: (pid 5954) 0s
== Reverted ==
== Reverted to 9.2.18. Please check output for what went wrong ==
Toggling deploy page:rm -f /opt/gitlab/embedded/service/gitlab-rails/public/index.html
Toggling deploy page: OK
Toggling services:ok: run: logrotate: (pid 5965) 0s
ok: run: sidekiq: (pid 5967) 0s
Toggling services: OK
Ensuring PostgreSQL is updated: NOT OK
Error ensuring PostgreSQL is updated. Please check the logs
dpkg: error processing package gitlab-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

在更新到版本 9 后遇到类似错误后,我运行了 sudo gitlab-ctl reconfigure

您还可以看到https://docs.gitlab.com/omnibus/settings/configuration.html

相关内容