Skip to content

CI environment status broken after upgrade to 10.1.1

Summary

After upgrade to 10.1.1 status of review apps is not displayed

Red message "Something went wrong while fetching the environments for this merge request. Please try again."

Steps to reproduce

Just create new MR and after CI finished to create env visit MR page - message appears

Example Project

fails only in docker instance

What is the current bug behavior?

The route /Skilld/sf/merge_requests/1894/ci_environments_status returns 500

What is the expected correct behavior?

Link to created env displayed

Relevant logs and/or screenshots

==> /var/log/gitlab/gitlab-rails/production.log <==

ActionController::UrlGenerationError (No route matches {:action=>"metrics", :controller=>"projects/deployments", :environment_id=>#<Environment id: 678, project_id: 80, name: "review/h52878", created_at: "2017-11-02 19:40:59", updated_at: "2017-11-02 19:49:26", external_url: "http://review-h52878-obc9ek.custom.domain", environment_type: "review", state: "available", slug: "review-h52878-um32vv">, :id=>nil, :namespace_id=>#<Group id:6 @Skilld>, :project_id=>#<Project id:80 Skilld/sf>} missing required keys: [:id]):
  config/application.rb:174:in `block (4 levels) in <class:Application>'
  app/controllers/projects/merge_requests_controller.rb:227:in `block in ci_environments_status'
  app/controllers/projects/merge_requests_controller.rb:216:in `map'
  app/controllers/projects/merge_requests_controller.rb:216:in `ci_environments_status'
  lib/gitlab/i18n.rb:47:in `with_locale'
  lib/gitlab/i18n.rb:53:in `with_user_locale'
  app/controllers/application_controller.rb:337:in `set_locale'
  lib/gitlab/middleware/multipart.rb:93:in `call'
  lib/gitlab/request_profiler/middleware.rb:14:in `call'
  lib/gitlab/middleware/go.rb:17:in `call'
  lib/gitlab/etag_caching/middleware.rb:11:in `call'
  lib/gitlab/middleware/rails_queue_duration.rb:20:in `call'
  lib/gitlab/metrics/rack_middleware.rb:29:in `block in call'
  lib/gitlab/metrics/transaction.rb:49:in `run'
  lib/gitlab/metrics/rack_middleware.rb:29:in `call'
  lib/gitlab/middleware/read_only.rb:30:in `call'
  lib/gitlab/request_context.rb:18:in `call'
  lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'

Output of checks

This bug happend only locally

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:		
Current User:	git
Using RVM:	no
Ruby Version:	2.3.5p376
Gem Version:	2.6.13
Bundler Version:1.13.7
Rake Version:	12.1.0
Redis Version:	3.2.5
Git Version:	2.13.6
Sidekiq Version:5.0.4
Go Version:	unknown

GitLab information Version: 10.1.1 Revision: cc27e5f Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://custom.domain.com HTTP Clone URL: https://custom.domain.com/some-group/some-project.git SSH Clone URL: ssh://git@custom.domain.com:1322/some-group/some-project.git Using LDAP: no Using Omniauth: no

GitLab Shell Version: 5.9.3 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

root@gitlab:/# gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...

GitLab Shell version >= 5.9.3 ? ... OK (5.9.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/1 ... ok 6/3 ... ok 1/4 ... ok 7/5 ... ok 6/6 ... ok 6/7 ... repository is empty 11/8 ... repository is empty 12/9 ... ok 6/10 ... ok 6/11 ... ok 6/12 ... ok 6/13 ... ok 3/14 ... ok 6/15 ... ok 6/16 ... ok 6/19 ... repository is empty 3/20 ... ok 3/21 ... ok 3/22 ... ok 3/23 ... ok 6/24 ... ok 6/25 ... ok 6/26 ... ok 48/28 ... ok 6/29 ... ok 48/30 ... ok 23/31 ... ok 6/32 ... ok 6/33 ... ok 3/34 ... ok 6/35 ... ok 6/37 ... ok 6/39 ... ok 20/40 ... ok 6/43 ... ok 47/44 ... ok 6/45 ... ok 49/46 ... ok 6/47 ... ok 6/50 ... ok 6/51 ... ok 6/52 ... ok 6/53 ... repository is empty 6/54 ... ok 48/55 ... repository is empty 29/56 ... ok 6/57 ... ok 6/58 ... ok 6/59 ... ok 6/60 ... ok 67/61 ... ok 2/62 ... ok 10/63 ... repository is empty 6/64 ... ok 6/65 ... ok 2/66 ... repository is empty 2/67 ... ok 6/68 ... ok 6/69 ... ok 2/70 ... ok 6/71 ... ok 2/72 ... ok 23/73 ... ok 23/74 ... ok 2/75 ... ok 23/76 ... ok 3/77 ... ok 6/78 ... repository is empty 36/79 ... repository is empty 6/80 ... ok 6/81 ... ok 6/82 ... ok 6/83 ... ok 6/85 ... ok 6/86 ... ok 2/89 ... ok 6/91 ... ok 6/92 ... ok 9/93 ... repository is empty 6/94 ... ok 6/95 ... ok 12/96 ... ok 6/97 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 6/3 ... yes 1/4 ... yes 7/5 ... yes 6/6 ... yes 6/7 ... yes 11/8 ... yes 12/9 ... yes 6/10 ... yes 6/11 ... yes 6/12 ... yes 6/13 ... yes 3/14 ... yes 6/15 ... yes 6/16 ... yes 6/19 ... yes 3/20 ... yes 3/21 ... yes 3/22 ... yes 3/23 ... yes 6/24 ... yes 6/25 ... yes 6/26 ... yes 48/28 ... yes 6/29 ... yes 48/30 ... yes 23/31 ... yes 6/32 ... yes 6/33 ... yes 3/34 ... yes 6/35 ... yes 6/37 ... yes 6/39 ... yes 20/40 ... yes 6/43 ... yes 47/44 ... yes 6/45 ... yes 49/46 ... yes 6/47 ... yes 6/50 ... yes 6/51 ... yes 6/52 ... yes 6/53 ... yes 6/54 ... yes 48/55 ... yes 29/56 ... yes 6/57 ... yes 6/58 ... yes 6/59 ... yes 6/60 ... yes 67/61 ... yes 2/62 ... yes 10/63 ... yes 6/64 ... yes 6/65 ... yes 2/66 ... yes 2/67 ... yes 6/68 ... yes 6/69 ... yes 2/70 ... yes 6/71 ... yes 2/72 ... yes 23/73 ... yes 23/74 ... yes 2/75 ... yes 23/76 ... yes 3/77 ... yes 6/78 ... yes 36/79 ... yes 6/80 ... yes 6/81 ... yes 6/82 ... yes 6/83 ... yes 6/85 ... yes 6/86 ... yes 2/89 ... yes 6/91 ... yes 6/92 ... yes 9/93 ... yes 6/94 ... yes 6/95 ... yes 12/96 ... yes 6/97 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.6) Git user has default SSH configuration? ... yes Active users: ... 96

Checking GitLab ... Finished

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)