Skip to content

Review app: Migration pod failing to start due to uninitialized constant

The migration pod is failing to start:

$ kubectl logs review-sh-bump-sh-0pz34y-migrations.1-cmldd --namespace review-apps-ce
+ /scripts/set-config /var/opt/gitlab/templates /srv/gitlab/config
Begin parsing .erb files from /var/opt/gitlab/templates
Writing /srv/gitlab/config/database.yml
Writing /srv/gitlab/config/resque.yml
Writing /srv/gitlab/config/gitlab.yml
Copying other config files found in /var/opt/gitlab/templates
+ exec /scripts/wait-for-deps /scripts/db-migrate
Checking database connection and schema version
WARNING: This version of GitLab depends on gitlab-shell 9.2.0, but you're running Unknown. Please update gitlab-shell.
Database Schema
Current version: 20190516011213
Codebase version: 20190516011213
Checking database migrations are up-to-date
Checking for new migrations
WARNING: This version of GitLab depends on gitlab-shell 9.2.0, but you're running Unknown. Please update gitlab-shell.
Disable authorized keys write in the database
WARNING: This version of GitLab depends on gitlab-shell 9.2.0, but you're running Unknown. Please update gitlab-shell.
/srv/gitlab/lib/haml_lint/linter/no_plain_nodes.rb:8:in `<class:NoPlainNodes>': uninitialized constant HamlLint::Linter::NoPlainNodes::LinterRegistry (NameError)
	from /srv/gitlab/lib/haml_lint/linter/no_plain_nodes.rb:7:in `<class:Linter>'
	from /srv/gitlab/lib/haml_lint/linter/no_plain_nodes.rb:6:in `<module:HamlLint>'
	from /srv/gitlab/lib/haml_lint/linter/no_plain_nodes.rb:5:in `<top (required)>'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.7/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.7/lib/active_support/concurrency/share_lock.rb:149:in `exclusive'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.7/lib/active_support/dependencies/interlock.rb:11:in `loading'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/engine.rb:475:in `each'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/engine.rb:475:in `block in eager_load!'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/engine.rb:473:in `each'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/engine.rb:473:in `eager_load!'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/engine.rb:354:in `eager_load!'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/application/finisher.rb:67:in `each'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/application/finisher.rb:67:in `block in <module:Finisher>'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/initializable.rb:30:in `instance_exec'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/initializable.rb:30:in `run'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/initializable.rb:59:in `block in run_initializers'
	from /usr/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
	from /usr/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /usr/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /usr/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /usr/lib/ruby/2.6.0/tsort.rb:347:in `each'
	from /usr/lib/ruby/2.6.0/tsort.rb:347:in `call'
	from /usr/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
	from /usr/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
	from /usr/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/initializable.rb:58:in `run_initializers'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/application.rb:353:in `initialize!'
	from /srv/gitlab/config/environment.rb:6:in `<top (required)>'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/application.rb:329:in `require_environment!'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/command/actions.rb:16:in `require_application_and_environment!'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/commands/runner/runner_command.rb:27:in `perform'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/command/base.rb:63:in `perform'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/command.rb:44:in `invoke'
	from /srv/gitlab/vendor/bundle/ruby/2.6.0/gems/railties-5.1.7/lib/rails/commands.rb:16:in `<top (required)>'
	from /srv/gitlab/bin/rails:4:in `require'
	from /srv/gitlab/bin/rails:4:in `<main>'
Storing Migration Status

/cc: @lbennett