7.4.4 Upgrade Failure

Okay, it appears to be a problem with the secrets file. I renamed the secrets file and reconfigure worked:

# mv /etc/gitlab/gitlab-secrets.json /etc/gitlab/gitlab-secrets.json.bak
# gitlab-ctl reconfigure

I’m on the long journey of upgrading from 6.1 to the latest on Ubuntu 14.04. I have successfully upgraded to 7.4.3 by downloading and installing using dpkg, here are the steps I used for the upgrade (I’m running as root):

# wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64.deb
# dpkg -i gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64.deb
# gitlab-ctl reconfigure

Next I tried upgrading to 7.4.4:

# wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.4.4-omnibus.5.1.0.ci-1_amd64.deb
# dpkg -i gitlab_7.4.4-omnibus.5.1.0.ci-1_amd64.deb
(Reading database ... 119518 files and directories currently installed.)
Preparing to unpack gitlab_7.4.4-omnibus.5.1.0.ci-1_amd64.deb ...
Unpacking gitlab (7.4.4-omnibus.5.1.0.ci-1) over (7.4.3-omnibus.5.1.0.ci-1) ...
Setting up gitlab (7.4.4-omnibus.5.1.0.ci-1) ...
Thank you for installing GitLab!
Configure and start GitLab by running the following command:

sudo gitlab-ctl reconfigure

GitLab should be reachable at xxx.xxx.x.xx
Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And running reconfigure again.
# gitlab-ctl reconfigure
Starting Chef Client, version 11.12.2
Compiling Cookbooks...
Recipe: gitlab::default
  * directory[/etc/gitlab] action create (up to date)

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb
================================================================================


NoMethodError
-------------
undefined method `[]=' for nil:NilClass


Cookbook Trace:
---------------
  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:69:in `block (2 levels) in generate_secrets'
  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:68:in `each'
  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:68:in `block in generate_secrets'
  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:67:in `each'
  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:67:in `generate_secrets'
  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:190:in `generate_config'
  /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:34:in `from_file'


Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:

 62:      def generate_secrets(node_name)
 63:        existing_secrets ||= Hash.new
 64:        if File.exists?("/etc/gitlab/gitlab-secrets.json")
 65:          existing_secrets = Chef::JSONCompat.from_json(File.read("/etc/gitlab/gitlab-secrets.json"))
 66:        end
 67:        existing_secrets.each do |k, v|
 68:          v.each do |pk, p|
 69>>           Gitlab[k][pk] = p
 70:          end
 71:        end
 72:
 73:        Gitlab['gitlab_rails']['secret_token'] ||= generate_hex(64)
 74:
 75:        if File.directory?("/etc/gitlab")
 76:          File.open("/etc/gitlab/gitlab-secrets.json", "w") do |f|
 77:            f.puts(
 78:              Chef::JSONCompat.to_json_pretty({




Running handlers:
[2016-08-11T09:02:16-04:00] ERROR: Running exception handlers
Running handlers complete

[2016-08-11T09:02:16-04:00] ERROR: Exception handlers complete
[2016-08-11T09:02:16-04:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 3.625528933 seconds
[2016-08-11T09:02:16-04:00] ERROR: undefined method `[]=' for nil:NilClass
[2016-08-11T09:02:16-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Here’s my gitlab.rb:

# Change the external_url to the address your users will type in their browser
external_url 'http://xxx.xxx.x.x'
gitlab_rails['db_username'] = 'git'
gitlab_rails['db_password'] = 'xxxxxxxxxxx'

Any suggestions on how to fix?

Thanks