Cannot open admin pages

I was attempting to add a deploy key and got an error similar to this one. When I tried to refresh the page, I’m getting the standard gitlab 500 screen. I can see all the admin pages except /admin/application_settings and /admin/deploy_keys

The first gives me

Completed 500 Internal Server Error in 138ms (ActiveRecord: 2.8ms)

ActionView::Template::Error (undefined method `authorized_keys_enabled' for #<ApplicationSetting:0x00007f0a400c0e30>):
780:       .col-sm-offset-2.col-sm-10
781:         .checkbox
782:           = f.label :authorized_keys_enabled do
783:             = f.check_box :authorized_keys_enabled
784:             Write to "authorized_keys" file
785:           .help-block
786:             By default, we write to the "authorized_keys" file to support Git
app/views/admin/application_settings/_form.html.haml:783:in `block (2 levels) in _app_views_admin_application_settings__form_html_haml__518681247241642_69840956262400'

The second I get

Completed 500 Internal Server Error in 29ms (ActiveRecord: 6.1ms)

ActionView::Template::Error (PG::UndefinedColumn: ERROR:  column deploy_keys_projects.can_push does not exist
LINE 1: ...RE "deploy_keys_projects"."deploy_key_id" = 7 AND "deploy_ke...
                                                         ^
: SELECT "projects".* FROM "projects" WHERE "projects"."id" IN (SELECT "deploy_keys_projects"."project_id" FROM "deploy_keys_projects" WHERE "deploy_keys_projects"."deploy_key_id" = 7 AND "deploy_keys_projects"."can_push" = 't')):
23:             %td
24:               %code.key-fingerprint= deploy_key.fingerprint
25:             %td
26:               - deploy_key.projects_with_write_access.each do |project|
27:                 = link_to project.full_name, admin_project_path(project), class: 'label deploy-project-label'
28:             %td
29:               %span.cgray
app/views/admin/deploy_keys/index.html.haml:26:in `block in _app_views_admin_deploy_keys_index_html_haml__3227298939485042324_69840960088280'

How can I reset so I can try again?

GitLab 10.4.0
GitLab Shell 5.11.0
GitLab Workhorse v3.3.1
GitLab API v4
Gitaly 0.66.0
Git 2.14.3
Ruby 2.3.6p384
Rails 4.2.10
postgresql 9.6.6

Got same arror on projects, also i get 500 on some merge request and files
Completed 500 Internal Server Error in 544ms (ActiveRecord: 38.3ms)

ActionView::Template::Error (PG::UndefinedColumn: ERROR: column users.admin_email_unsubscribed_at does not exist
LINE 1: …s_token" AS t1_r63, “users”.“theme_id” AS t1_r64, “users”."a…

This is still an issue for me - I cannot edit the admin settings. I suspect a bug, but need help understanding what I’m looking at.

I also tried updating; I’m now running 10.5.1. The “can_push” column error is still occurring, but the other error is now

Completed 500 Internal Server Error in 172ms (ActiveRecord: 1.8ms)

ActionView::Template::Error (undefined method `pages_domain_verification_enabled' for #<ApplicationSetting:0x00007fd33b7e59f8>):
    241:       .col-sm-offset-2.col-sm-10
    242:         .checkbox
    243:           = f.label :pages_domain_verification_enabled do
    244:             = f.check_box :pages_domain_verification_enabled
    245:             Require users to prove ownership of custom domains
    246:         .help-block
    247:           Domain verification is an essential security measure for public GitLab
  app/views/admin/application_settings/_form.html.haml:244:in `block (2 levels) in _app_views_admin_application_settings__form_html_haml__3496685356104420562_70272598975040'
  app/views/admin/application_settings/_form.html.haml:243:in `block in _app_views_admin_application_settings__form_html_haml__3496685356104420562_70272598975040'
  app/views/admin/application_settings/_form.html.haml:1:in `_app_views_admin_application_settings__form_html_haml__3496685356104420562_70272598975040'
  app/views/admin/application_settings/show.html.haml:5:in `_app_views_admin_application_settings_show_html_haml__522134333622698530_70272598682260'
  lib/gitlab/i18n.rb:47:in `with_locale'
  lib/gitlab/i18n.rb:53:in `with_user_locale'
  app/controllers/application_controller.rb:325:in `set_locale'
  lib/gitlab/middleware/multipart.rb:95: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/read_only.rb:31:in `call'
  lib/gitlab/request_context.rb:18:in `call'
  lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'

So, I used pg_admin to add the can_push column and I can see the deploy keys page now. This really seems like a bug, but I don’t know where it was introduced.

Hey, it looks like I’m not the only one! https://gitlab.com/gitlab-org/gitlab-ce/issues/43589