ci/cd settings can't be openend after restore

Summary

After restoring a backup into a new Omnibus docker instance (11.10.4) the "ci/cd settings" of the project can't be opened again because of error 500. (I had one runner registered before restoring)

Steps to reproduce

I tried to restore my backup 2 times both times same behaviour. I also tried to restore /etc/gitlab directory as well as updating to 11.11. Behavior is always the same. CI/CD Settings of the project return error 500.

Even executing steps in http://review-docs-docs-s51l30.178.62.207.141.xip.io/ce/raketasks/backup_restore.html#reset-runner-registration-tokens didn't help.

What is the expected correct behavior?

runners should work as before after gitlab restore

Relevant logs and/or screenshots

==> /var/log/gitlab/gitlab-rails/production.log <==
Completed 500 Internal Server Error in 217ms (ActiveRecord: 18.7ms)

ActionView::Template::Error ():
    25:     project_clusters_path(@project),
    26:     class: 'btn btn-info'
    27:   %hr
    28:   = render partial: 'ci/runner/how_to_setup_runner',
    29:            locals: { registration_token: @project.runners_token,
    30:                      type: 'specific',
    31:                      reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path }

lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:33:in `ensure_token!'
app/models/concerns/token_authenticatable.rb:45:in `block in add_authentication_token_field'
app/models/project.rb:1550:in `runners_token'
app/views/projects/runners/_specific_runners.html.haml:28:in `_app_views_projects_runners__specific_runners_html_haml__488988351912714431_70052777584220'
app/views/projects/runners/_index.html.haml:8:in `_app_views_projects_runners__index_html_haml___915326592122062848_70052784800780'
app/views/projects/settings/ci_cd/show.html.haml:42:in `_app_views_projects_settings_ci_cd_show_html_haml__437060230150893168_70052797706820'
app/controllers/application_controller.rb:116:in `render'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:434:in `set_locale'
lib/gitlab/middleware/rails_queue_duration.rb:27:in `call'
lib/gitlab/metrics/rack_middleware.rb:17:in `block in call'
lib/gitlab/metrics/transaction.rb:57:in `run'
lib/gitlab/metrics/rack_middleware.rb:17:in `call'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:40:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:26:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'

==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/nyquist/tubescan/settings/ci_cd","format":"html","controller":"Projects::Settings::CiCdController","action":"show","status":500,"error":"ActionView::Template::Error: ","duration":217.8,"view":0.0,"db":18.7,"time":"2019-06-03T13:40:08.639Z","params":[{"key":"namespace_id","value":"nyquist"},{"key":"project_id","value":"tubescan"}],"remote_ip":"172.17.0.1","user_id":2,"username":"stumpf","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134","queue_duration":2.39,"gitaly_calls":1,"gitaly_duration":7.05,"correlation_id":"Ey4MXdxqxz5"}

)

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.5.3p105 Gem Version: 2.7.6 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.5 Go Version: unknown

GitLab information Version: 11.10.4 Revision: 62c464651d2 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.6.11 URL: http://nqsbuild:30080 HTTP Clone URL: http://nqsbuild:30080/some-group/some-project.git SSH Clone URL: ssh://git@nqsbuild:30022/some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 9.0.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 9.0.0 ? ... OK (9.0.0) 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 Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

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

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

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: ... 6/1 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.5.3) Git version >= 2.18.0 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 10

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Edited by Martin Stumpf