Skip to content

Downgrade from 7.14.x to 7.13.x not possible?

I attempted to downgrade my gitlab instance from 7.14.1 to 7.13.{4, 5} at least for the time being. Unfortunately, gitlab-ctl reconfigure throws this when stepping through the latest version of the reverting instructions. This is immediately prior to attempting to restore a database backup.

  ================================================================================
  Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
  ================================================================================
  
  NoMethodError
  -------------
  undefined method `[]' for nil:NilClass
  
  Cookbook Trace:
  ---------------
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:182:in `block (2 levels) in read_gitlab_secrets'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:180:in `each'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:180:in `block in read_gitlab_secrets'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:179:in `each'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:179:in `read_gitlab_secrets'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:70:in `generate_secrets'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:291:in `generate_config'
    /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:37:in `from_file'
  
  Relevant File Content:
  ----------------------
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:
  
  175:      if File.exists?("/etc/gitlab/gitlab-secrets.json")
  176:        existing_secrets = Chef::JSONCompat.from_json(File.read("/etc/gitlab/gitlab-secrets.json"))
  177:      end
  178:  
  179:      existing_secrets.each do |k, v|
  180:        v.each do |pk, p|
  181:          # Note: Specifiying a secret in gitlab.rb will take precendence over "gitlab-secrets.json"
  182>>         Gitlab[k][pk] ||= p
  183:        end
  184:      end
  185:    end
  186:  
  187:    def self.write_to_gitlab_secrets
  188:      secret_tokens = {
  189:                        'gitlab_shell' => {
  190:                          'secret_token' => Gitlab['gitlab_shell']['secret_token'],
  191:                        },
  

I'm not really sure what's going on here; gitlab-secrets.json exists, for instance. Any suggestions?

I did change my gitlab.rb to use the new-style LDAP configuration when moving from 7.13.x to 7.14.x (it had the old deprecated syntax previously) but nothing else has changed.

(The 7.14.x upgrade broke my omniauth-kerberos setup-- I was using it as a custom authentication provider despite not having EE and it was working fine-- so I wanted to revert at least for the time being. It's not really relevant but this appears to be what broke?).