2017-12-03 3 views
0

이전 Gitlab 인스턴스를 7.3.2 옴니버스 설치로 실행하고 있습니다. 서버가 더 이상 연결할 수없는 사람에 의해 설정되었습니다. 나는 7에서 10까지 옴니버스를 통해 직접 업그레이드를 시도했으나 효과가 없었습니다. gitlab-ctl reconfigure을 실행할 때 나는이 문서에서 많이 읽은 다음 오류Gitlab 7.3.2를 현재 릴리스로 업그레이드

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 

을 얻을 수 있지만, 너무 많은 정보 나 업데이트가 작동하지 수있다. 현재 릴리스로 설치하는 데 필요한 단계는 무엇이며 취할 중요한 단계는 무엇입니까?

(여러 주요 버전에서 뛰어 안 일반적으로
+0

Gitlab을위한 최선의 방법은 다음 버전으로 정기적으로 업데이트하는 것이므로 중간 버전 업그레이드 (여러 단계로 진행되는 마이그레이션 단계)를 이전 버전과 비교해 볼 수 있습니다. – djuarez

답변

0

즉 7.x의, 8.x의, 9.x의 및 10.x를 주요 버전입니다. 그들은 주요 변경 내용이 포함되어 있습니다. 7.3의 현재 버전에서

7.14.x로 업그레이드 한 다음 8.0.x, 8.17.x, 9.0, 9.5.x, 10.0, 10.latext로 업그레이드하는 것이 좋습니다 (각 단계가 끝나면 웹 UI가 작동하는지 확인하십시오. 당신이 복제/푸시 할 수 있습니다. 또한 로그를 따라 명백한 오류가 있는지 확인하십시오.

GitLab 패키지 저장소를 사용하여 업그레이드하는 경우 (yum/apt를 통해) 특정 버전/설치 명령을 찾을 수 있습니다. https://packages.gitlab.com/gitlab/gitlab-ce에서 사용해야합니다. 10.1.과 같은 문자열에. OS 버전의 RPM 또는 Deb 패키지를 클릭하면 apt-get install gitlab-ce=10.1.5-ce.0 (Ubuntu Trusty) 또는 yum install gitlab-ce-10.1.5-ce.0.el7.x86_64 (CentOS/RHEL 7)과 같은 설치 명령이 표시됩니다. 매번 curl | bash 비트를 반복 할 필요가 없습니다.

관련 문제