Upgrading GitLab getting errors

Trying to upgrade from v8.15.5 to at least v8.17.7 for now but I’m running into some errors, shown below. It seems like as GitLab tries to upgrade, there’s a parsing error in gitlab-secrects.json file. I’m noticing that when I try and view the gitlab-secrets.json file, it’s not viewable in vim, it’s like it’s a data file or binary file and not ascii. I’m noticing on my other GitLab test instance that it is readable via vim.

Does anyone know if the gitlab-secrets.json file is supposed to be in a non-readable file format ? Maybe that’s why the GitLab upgrade process is not abel to parse it ? Not sure.

Here is the error I’m encountering :

Creating backup archive: 1613528275_2021_02_17_gitlab_backup.tar … done
Uploading backup archive to remote storage … skipped
Deleting tmp directories … done
done
Deleting old backups … done. (0 removed)
Updating : gitlab-ce-8.17.7-ce.0.el7.x86_64

   *.                  *.
  ***                 ***
 *****               *****
.******             *******
********            ********

,,
,
,
.,,
,
***,.
,
,
.,
,
,*,.

 _______ __  __          __
/ ____(_) /_/ /   ____ _/ /_

/ / / / / / / __ `/ __
/ // / / // /
/ // / // /
_
//_/___/_,/./

gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:

sudo gitlab-ctl reconfigure

gitlab: GitLab should be reachable at https://ul11me-3470-001.silicon.us-cert.gov
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: README.md · master · GitLab.org / omnibus-gitlab · GitLab
gitlab:

gitlab: GitLab now ships with a newer version of PostgreSQL (9.6.1), and will be used
gitlab: as the default in the next major release. To upgrade, RUN THE FOLLOWING COMMANDS:

sudo gitlab-ctl pg-upgrade

gitlab: For more details, please see:
gitlab: Database settings | GitLab
gitlab:
Cleanup : gitlab-ce-8.15.5-ce.0.el7.x86_64
Checking PostgreSQL executables: OK
Shutting down all GitLab services except those needed for migrations
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 0s, normally up
ok: down: nginx: 1s, normally up
ok: down: postgresql: 0s, normally up
ok: down: redis: 1s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 0s, normally up
ok: run: postgresql: (pid 4730) 1s
ok: run: redis: (pid 4738) 0s
run: postgresql: (pid 4730) 1s; run: log: (pid 935) 1980s
run: redis: (pid 4738) 0s; run: log: (pid 928) 1980s
Reconfiguring GitLab to apply migrations

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

Chef::Exceptions::JSON::ParseError

lexical error: invalid char in json text.
(right here) ------^

Cookbook Trace:

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:217:in read_gitlab_secrets' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:117:in generate_secrets’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:226:in generate_config' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:24:in from_file’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file’

Relevant File Content:

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:

210:
211: class SecretsHelper
212:
213: def self.read_gitlab_secrets
214: existing_secrets ||= Hash.new
215:
216: if File.exists?("/etc/gitlab/gitlab-secrets.json")
217>> existing_secrets = Chef::JSONCompat.from_json(File.read("/etc/gitlab/gitlab-secrets.json"))
218: end
219:
220: existing_secrets.each do |k, v|
221: if Gitlab[k]
222: v.each do |pk, p|
223: # Note: Specifiying a secret in gitlab.rb will take precendence over “gitlab-secrets.json”
224: Gitlab[k][pk] ||= p
225: end
226: else

Platform:

x86_64-linux

warning: %posttrans(gitlab-ce-8.17.7-ce.0.el7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ce-8.17.7-ce.0.el7.x86_64
Verifying : gitlab-ce-8.17.7-ce.0.el7.x86_64 1/2
Verifying : gitlab-ce-8.15.5-ce.0.el7.x86_64 2/2

Updated:
gitlab-ce.x86_64 0:8.17.7-ce.0.el7

Complete!