2

我在管理 GitLab 方面相对较新,我继承了大约十几个托管 git repos 的实例。我听到抱怨从项目中单击“分支”会引发 404。看起来它会在 production.log 中引发 500。不过,这只是在某些项目上。其他项目表现良好,但我无法找到一种模式来说明为什么它会发生在某些项目上而不发生在其他项目上。据我所知,我们没有名称中带有“#”或两个“/”的分支。

从 nginx 访问日志:

129.46.71.24 - - [31/Oct/2013:14:18:49 -0700] "GET /thirdparty/llvm-static-
artifacts/branches HTTP/1.1" 404 249 "https://gitlab.someurl.com/thirdparty/llvm-
static-artifacts/branches" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/30.0.1599.114 Safari/537.36"

129.46.71.24 - - [31/Oct/2013:14:18:49 -0700] "GET /thirdparty/llvm-static-
artifacts/branches HTTP/1.1" 404 249 "https://gitlab.someurl.com/thirdparty/llvm-
static-artifacts/branches" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/30.0.1599.114 Safari/537.36"

来自生产日志:

Started GET "/thirdparty/llvm-static-artifacts/branches" for 127.0.0.1 at 2013-10-31 
14:19:58 -0700
Processing by Projects::BranchesController#index as HTML
  Parameters: {"project_id"=>"thirdparty/llvm-static-artifacts"}
  Rendered shared/_ref_switcher.html.haml (1.8ms)
  Rendered projects/commits/_head.html.haml (4.5ms)
  Rendered projects/branches/_filter.html.haml (1.6ms)
  Rendered projects/branches/_branch.html.haml (4.3ms)
  Rendered projects/branches/_branch.html.haml (2.3ms)
  Rendered projects/branches/index.html.haml within layouts/projects (13.5ms)
Completed 500 Internal Server Error in 85ms

ActionController::RoutingError (No route matches {:action=>"destroy",   
:controller=>"projects/branches", :project_id=>#<Project id: 107, name:    
"llvm.static.artifacts", path: "llvm-static-artifacts", description: "", created_at: 
"2013-09-23 21:15:36", updated_at: "2013-10-07 21:56:28", creator_id: 7, default_branch: 
"feature/NEO-10669_clang_and_static_libcxx", issues_enabled: true, wall_enabled: false, 
merge_requests_enabled: true, wiki_enabled: true, namespace_id: 18, public: false, 
issues_tracker: "gitlab", issues_tracker_id: nil, snippets_enabled: false, 
last_activity_at: "2013-10-07 21:56:30", imported: false, import_url: "">, 
:id=>"feature/NEO-5388_update_nst_to_compile_with_llvm/clang32"}):
  app/views/projects/branches/_branch.html.haml:17:in  
`_app_views_projects_branches__branch_html_haml___758623504167079734_70006805062880'

  app/views/projects/branches/index.html.haml:9:in `block in 
_app_views_projects_branches_index_html_haml___1230313324773652987_70006835956360'
  app/views/projects/branches/index.html.haml:8:in `each'
  app/views/projects/branches/index.html.haml:8:in  
`_app_views_projects_branches_index_html_haml___1230313324773652987_70006835956360'


Started GET "/thirdparty/llvm-static-artifacts/branches" for 127.0.0.1 at 2013-10-31  
14:19:58 -0700
Processing by Projects::BranchesController#index as HTML
  Parameters: {"project_id"=>"thirdparty/llvm-static-artifacts"}
  Rendered shared/_ref_switcher.html.haml (1.8ms)
  Rendered projects/commits/_head.html.haml (4.4ms)
  Rendered projects/branches/_filter.html.haml (1.6ms)
  Rendered projects/branches/_branch.html.haml (4.2ms)
  Rendered projects/branches/_branch.html.haml (2.3ms)
  Rendered projects/branches/index.html.haml within layouts/projects (13.4ms)
Completed 500 Internal Server Error in 84ms

ActionController::RoutingError (No route matches {:action=>"destroy",  
:controller=>"projects/branches", :project_id=>#<Project id: 107, name:  
"llvm.static.artifacts", path: "llvm-static-artifacts", description: "", created_at:  
"2013-09-23 21:15:36", updated_at: "2013-10-07 21:56:28", creator_id: 7, default_branch: 
"feature/NEO-10669_clang_and_static_libcxx", issues_enabled: true, wall_enabled: false,  
merge_requests_enabled: true, wiki_enabled: true, namespace_id: 18, public: false, 
issues_tracker: "gitlab", issues_tracker_id: nil, snippets_enabled: false, 
last_activity_at: "2013-10-07 21:56:30", imported: false, import_url: "">, 
:id=>"feature/NEO-5388_update_nst_to_compile_with_llvm/clang32"}):
  app/views/projects/branches/_branch.html.haml:17:in  
`_app_views_projects_branches__branch_html_haml___758623504167079734_70006805062880'
  app/views/projects/branches/index.html.haml:9:in `block in   
_app_views_projects_branches_index_html_haml___1230313324773652987_70006835206340'
  app/views/projects/branches/index.html.haml:8:in `each'
  app/views/projects/branches/index.html.haml:8:in  
`_app_views_projects_branches_index_html_haml___1230313324773652987_70006835206340'

这是我们正在运行的:

$ cat VERSION 
6.0.0-ee

$ git branch
  6-0-stable
* master

$ git status
# On branch master
# Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
#   (use "git pull" to update your local branch)
#
nothing to commit, working directory clean

我意识到它说我们落后了 1 个提交。更新会像执行“git pull”然后重新启动 nginx 和 gitlab 一样简单吗?

提前致谢。对于新手 gitlab 的体验,我深表歉意。

4

2 回答 2

2

我刚刚使用以下非常详细的说明从 6.0.0-ee 升级到 6.2.0-ee:https ://github.com/gitlabhq/gitlabhq/blob/master/doc/update/6.0-to-6.2.md

它进行得令人怀疑的顺利。但是现在返回 404 的项目现在返回一个分支列表。

于 2013-11-08T20:07:30.313 回答
0

你能运行:sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

告诉我你是否看到任何红色支票?

于 2013-11-01T13:24:20.600 回答