Error 502 - ActionView::Template::Error (undefined method `grafana_enabled?'
Summary
Error 502 after update Gitlab-ce 12.3.1
Steps to reproduce
log: production_json.log
{"method":"GET","path":"/admin","format":"html","controller":"Admin::DashboardController","action":"index","status":500,"error":"ActionView::Template::Error: undefined method `grafana_enabled?' for #<ApplicationSetting:0x00007f198e9bb898>\nDid you mean? gravatar_enabled?\n gravatar_enabled\n gravatar_enabled=","duration":229.38,"view":0.0,"db":31.25,"time":"2019-08-01T03:36:29.091Z","params":[],"remote_ip":"201.82.210.200","user_id":5,"username":"ziliotti","ua":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36","queue_duration":null,"correlation_id":"p89EFPwxAt"}
{"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":200,"duration":1.21,"view":0.35,"db":0.0,"time":"2019-08-01T03:36:29.672Z","params":[],"remote_ip":null,"user_id":null,"username":null,"ua":null,"queue_duration":null,"correlation_id":"1f366ccf-a78c-4dec-8a83-e3a686c74a09"}
log: production.log
Started GET "/-/metrics" for 127.0.0.1 at 2019-08-01 03:49:44 +0000
Processing by MetricsController#index as HTML
Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
Started GET "/admin" for 201.82.210.200 at 2019-08-01 03:49:48 +0000
Processing by Admin::DashboardController#index as HTML
Completed 500 Internal Server Error in 236ms (ActiveRecord: 31.8ms)
ActionView::Template::Error (undefined method `grafana_enabled?' for #<ApplicationSetting:0x00007f198d066438>
Did you mean? gravatar_enabled?
gravatar_enabled
gravatar_enabled=):
81: = link_to admin_requests_profiles_path, title: _('Requests Profiles') do
82: %span
83: = _('Requests Profiles')
84: - if Gitlab::CurrentSettings.current_application_settings.grafana_enabled?
85: = nav_link do
86: = link_to Gitlab::CurrentSettings.current_application_settings.grafana_url, target: '_blank', title: _('Metrics Dashboard') do
87: %span
app/views/layouts/nav/sidebar/_admin.html.haml:84:in `block in _app_views_layouts_nav_sidebar__admin_html_haml__3100362397962747483_69873914318100'
app/helpers/tab_helper.rb:69:in `nav_link'
app/views/layouts/nav/sidebar/_admin.html.haml:51:in `_app_views_layouts_nav_sidebar__admin_html_haml__3100362397962747483_69873914318100'
app/views/layouts/_page.html.haml:3:in `_app_views_layouts__page_html_haml___1023719031846323567_69873856932400'
app/views/layouts/application.html.haml:10:in `_app_views_layouts_application_html_haml___352788380324896284_69873923808160'
app/views/layouts/admin.html.haml:6:in `_app_views_layouts_admin_html_haml__2409360474073354567_69873979632000'
app/controllers/application_controller.rb:117:in `render'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:445:in `set_session_storage'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:439:in `set_locale'
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/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:12:in `call'
Started GET "/favicon.ico" for 201.82.210.200 at 2019-08-01 03:49:49 +0000
Started GET "/-/metrics" for 127.0.0.1 at 2019-08-01 03:49:59 +0000
Processing by MetricsController#index as HTML
Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
(What actually happens)
What is the expected correct behavior?
(What you should see instead)
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)