Gitlab-ee 500 error after upgrade from 13.0.14 to 13.1.11 to 13.8.8

Hello. Fully functioning 13.0.14-ee. Upgraded to 13.1.11-ee and then to 13.8.8-ee and ran pg-upgrade.

After the upgrade, getting a 500 error. Need to know how to resolve. Feel free to ask any other details.

Started GET “/” for 68.37.179.14 at 2021-11-04 13:06:21 -0400
Processing by RootController#index as HTML
Completed 500 Internal Server Error in 54ms (ActiveRecord: 4.0ms | Elasticsearch: 0.0ms | Allocations: 18233)

NoMethodError (undefined method `analytics_access_level=’ for #ProjectFeature:0x00007f6b8e19f6d0
Did you mean? analytics_enabled?):

app/controllers/concerns/renders_member_access.rb:14:in preload_max_member_access_for_collection' app/controllers/concerns/renders_projects_list.rb:5:in prepare_projects_for_rendering’
app/controllers/dashboard/projects_controller.rb:79:in load_projects' ee/app/controllers/ee/dashboard/projects_controller.rb:40:in load_projects’
app/controllers/dashboard/projects_controller.rb:57:in projects' app/controllers/root_controller.rb:25:in block in index’
lib/gitlab/gitaly_client.rb:306:in allow_n_plus_1_calls' app/controllers/root_controller.rb:24:in index’
ee/lib/gitlab/ip_address_state.rb:10:in with' ee/app/controllers/ee/application_controller.rb:44:in set_current_ip_address’
app/controllers/application_controller.rb:482:in set_current_admin' lib/gitlab/session.rb:11:in with_session’
app/controllers/application_controller.rb:473:in set_session_storage' lib/gitlab/i18n.rb:73:in with_locale’
lib/gitlab/i18n.rb:79:in with_user_locale' app/controllers/application_controller.rb:467:in set_locale’
lib/gitlab/error_tracking.rb:52:in with_context' app/controllers/application_controller.rb:532:in sentry_context’
app/controllers/application_controller.rb:460:in block in set_current_context' lib/gitlab/application_context.rb:56:in block in use’
lib/gitlab/application_context.rb:56:in use' lib/gitlab/application_context.rb:22:in with_context’
app/controllers/application_controller.rb:451:in set_current_context' lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in call’
lib/gitlab/request_profiler/middleware.rb:17:in call' lib/gitlab/jira/middleware.rb:19:in call’
lib/gitlab/middleware/go.rb:20:in call' lib/gitlab/etag_caching/middleware.rb:21:in call’
lib/gitlab/middleware/multipart.rb:172:in call' lib/gitlab/middleware/read_only/controller.rb:50:in call’
lib/gitlab/middleware/read_only.rb:18:in call' lib/gitlab/middleware/same_site_cookies.rb:27:in call’
lib/gitlab/middleware/handle_malformed_strings.rb:21:in call' lib/gitlab/middleware/basic_health_check.rb:25:in call’
lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in call' lib/gitlab/middleware/request_context.rb:23:in call’
config/initializers/fix_local_cache_middleware.rb:9:in call' lib/gitlab/metrics/requests_rack_middleware.rb:76:in call’
lib/gitlab/middleware/release_env.rb:12:in `call’
Started GET “/” for 68.37.179.14 at 2021-11-04 13:08:12 -0400
Processing by RootController#index as HTML
Completed 500 Internal Server Error in 57ms (ActiveRecord: 3.7ms | Elasticsearch: 0.0ms | Allocations: 16756)

Also, gitlab-ctl reconfigure results in:

  • bash[migrate gitlab-rails database] action run
    [execute] rake aborted!
    StandardError: An error has occurred, this and all later migrations canceled:

          PG::DuplicateSchema: ERROR:  schema "gitlab_partitions_dynamic" already exists
          /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20200623121135_create_dynamic_partitions_schema.rb:9:in `up'
          /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:59:in `block (3 levels) in <top (required)>'
          /opt/gitlab/embedded/bin/bundle:23:in `load'
          /opt/gitlab/embedded/bin/bundle:23:in `<main>'
          
          Caused by:
          ActiveRecord::StatementInvalid: PG::DuplicateSchema: ERROR:  schema "gitlab_partitions_dynamic" already exists
          /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20200623121135_create_dynamic_partitions_schema.rb:9:in `up'
          /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:59:in `block (3 levels) in <top (required)>'
          /opt/gitlab/embedded/bin/bundle:23:in `load'
          /opt/gitlab/embedded/bin/bundle:23:in `<main>'
          
          Caused by:
          PG::DuplicateSchema: ERROR:  schema "gitlab_partitions_dynamic" already exists
          /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20200623121135_create_dynamic_partitions_schema.rb:9:in `up'
          /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:59:in `block (3 levels) in <top (required)>'
          /opt/gitlab/embedded/bin/bundle:23:in `load'
          /opt/gitlab/embedded/bin/bundle:23:in `<main>'
          Tasks: TOP => db:migrate
          (See full trace by running task with --trace)
          == 20200623121135 CreateDynamicPartitionsSchema: migrating ====================
          -- execute("CREATE SCHEMA gitlab_partitions_dynamic")
    

    ================================================================================
    Error executing action run on resource ‘bash[migrate gitlab-rails database]’