Master: migrations pods failing to load settings
Summary
A recent change seems to have affected the Migrations job, due to settings not being present.
Steps to reproduce
Deploy from current master-based images. Observe Migrations pod logs
Current behavior
Migrations job is failing with a stack trace.
Expected behavior
Migrations (and seeding) occur as expected.
Versions
- Chart:
b7c248332550f2d302a78d84052fa79e546396ad
, but others as well.
Relevant logs
│ migrations Tasks: TOP => db:version => db:load_config => environment
│ migrations (See full trace by running task with --trace)
│ migrations Checking database connection and schema version
│ migrations rake aborted!
│ migrations NoMethodError: undefined method `[]' for nil:NilClass
│ migrations /srv/gitlab/config/initializers/1_settings.rb:80:in `block in <main>'
│ migrations /srv/gitlab/lib/gitlab.rb:95:in `ee'
https://gitlab.com/gitlab-org/gitlab/blob/master/config/initializers/1_settings.rb#L80
Gitlab.ee do
Settings['smartcard'] ||= Settingslogic.new({})
Settings.smartcard['enabled'] = false if Settings.smartcard['enabled'].nil?
**Settings.smartcard['client_certificate_required_host'] = Settings.gitlab['host'] if Setting
Settings.smartcard['client_certificate_required_port'] = 3444 if Settings.smartcard['client
Settings.smartcard['required_for_git_access'] = false if Settings.smartcard['required_for_g
Settings.smartcard['san_extensions'] = false if Settings.smartcard['san_extensions'].nil?
end
Edited by Jason Plum