Skip to content

Error 500 after each upgrade since 18.2.0 (migrations not running automatically)

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Workaround below

gitlab-ctl upgrade logs

Logs

Setting up gitlab-ce (18.4.0-ce.0) ...
Checking PostgreSQL executables:[2025-09-19T12:15:10+02:00] INFO: Started Cinc Zero at chefzero://localhost:1 with repository at /opt/gitlab/embedded (One version per cookbook)
Cinc Client, version 18.3.0
Patents: https://www.chef.io/patents
Infra Phase starting
[2025-09-19T12:15:10+02:00] INFO: *** Cinc Client 18.3.0 ***
[2025-09-19T12:15:10+02:00] INFO: Platform: x86_64-linux
[2025-09-19T12:15:10+02:00] INFO: Cinc-client pid: 1480823
[2025-09-19T12:15:12+02:00] INFO: Setting the run_list to ["recipe[gitlab::config]", "recipe[postgresql::bin]"] from CLI options
[2025-09-19T12:15:12+02:00] INFO: Run List is [recipe[gitlab::config], recipe[postgresql::bin]]
[2025-09-19T12:15:12+02:00] INFO: Run List expands to [gitlab::config, postgresql::bin]
[2025-09-19T12:15:12+02:00] INFO: Starting Cinc Client Run for <redacted>
[2025-09-19T12:15:12+02:00] INFO: Running start handlers
[2025-09-19T12:15:12+02:00] INFO: Start handlers complete.
Resolving cookbooks for run list: ["gitlab::config", "postgresql::bin"]
[2025-09-19T12:15:13+02:00] INFO: Loading cookbooks [gitlab@0.0.1, postgresql@0.1.0, package@0.1.0, logrotate@0.1.0, redis@0.1.0, monitoring@0.1.0, registry@0.1.0, mattermost@0.1.0, consul@0.1.0, gitaly@0.1.0, praefect@0.1.0, gitlab-kas@0.1.0, gitlab-pages@0.1.0, letsencrypt@0.1.0, nginx@0.1.0, runit@5.1.7, acme@4.1.6, crond@0.1.0]
[2025-09-19T12:15:13+02:00] INFO: Removing cookbooks/gitlab-base/metadata.rb from the cache; its cookbook is no longer needed on this client.
[2025-09-19T12:15:13+02:00] INFO: Removing cookbooks/gitlab-base/recipes/config.rb from the cache; its cookbook is no longer needed on this client.
[2025-09-19T12:15:13+02:00] INFO: Removing cookbooks/gitlab-base/recipes/default.rb from the cache; its cookbook is no longer needed on this client.
[2025-09-19T12:15:13+02:00] INFO: Removing cookbooks/gitlab-ee/metadata.rb from the cache; its cookbook is no longer needed on this client.
[2025-09-19T12:15:13+02:00] INFO: Removing cookbooks/gitlab-ee/recipes/default.rb from the cache; its cookbook is no longer needed on this client.
Synchronizing cookbooks:
  - postgresql (0.1.0)
  - gitlab (0.0.1)
  - logrotate (0.1.0)
  - redis (0.1.0)
  - package (0.1.0)
  - monitoring (0.1.0)
  - mattermost (0.1.0)
  - registry (0.1.0)
  - consul (0.1.0)
  - gitaly (0.1.0)
  - praefect (0.1.0)
  - gitlab-kas (0.1.0)
  - gitlab-pages (0.1.0)
  - letsencrypt (0.1.0)
  - nginx (0.1.0)
  - runit (5.1.7)
  - acme (4.1.6)
  - crond (0.1.0)
Installing cookbook gem dependencies:
Compiling cookbooks...
Loading Cinc Auditor profile files:
Loading Cinc Auditor input files:
Loading Cinc Auditor waiver files:

================================================================================
Recipe Compile Error
================================================================================

Chef::Exceptions::RecipeNotFound
--------------------------------
could not find recipe config for cookbook gitlab

System Info:
------------
chef_version=18.3.0
platform=ubuntu
platform_version=22.04
ruby=ruby 3.2.8 (2025-03-26 revision 13f495dc2c) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/cinc-client
executable=/opt/gitlab/embedded/bin/cinc-client


Running handlers:
[2025-09-19T12:15:14+02:00] ERROR: Running exception handlers
Running handlers complete
[2025-09-19T12:15:14+02:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 03 seconds
[2025-09-19T12:15:14+02:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2025-09-19T12:15:14+02:00] FATAL: ---------------------------------------------------------------------------------------
[2025-09-19T12:15:14+02:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2025-09-19T12:15:14+02:00] FATAL: ---------------------------------------------------------------------------------------
[2025-09-19T12:15:14+02:00] FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe config for cookbook gitlab
Checking PostgreSQL executables: NOT OK
Could not update PostgreSQL executables.

The stacktrace.out

Generated at 2025-09-19 12:15:14 +0200
Chef::Exceptions::RecipeNotFound: could not find recipe config for cookbook gitlab
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/cookbook_version.rb:207:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/run_context.rb:429:in `load_recipe'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:228:in `block in compile_recipes'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:225:in `each'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:225:in `compile_recipes'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/run_context/cookbook_compiler.rb:109:in `compile'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/run_context.rb:259:in `load'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/policy_builder/expand_node_object.rb:103:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/forwardable-1.3.3/lib/forwardable.rb:240:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/client.rb:499:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/client.rb:294:in `run'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:305:in `run_with_graceful_exit_option'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:281:in `block in run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/local_mode.rb:42:in `with_server_connectivity'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:264:in `run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application/base.rb:354:in `run_application'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:67:in `run'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-bin-18.3.0/bin/cinc-client:25:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/site_ruby/3.2.0/rubygems.rb:319:in `load'
/opt/gitlab/embedded/lib/ruby/site_ruby/3.2.0/rubygems.rb:319:in `activate_and_load_bin_path'
/opt/gitlab/embedded/bin/cinc-client:25:in `<main>'
Edited by Jason Plum