Gitlab upgrade fail - Database


#1

Hello,

I’ve spent all day trying to figure out what has been going on with my upgrade. I been trying to upgrade my Gitlab install from 10.7 to 10.8 but keep coming up with the error message below. This error message is produced even if I do a fresh install of 11.x or an existing install upgrade. I believe the error is something to do with the database?

This error happens with a few commands I have tried:

  • gitlab-rake gitlab:env:info
  • gitlab-ctl reconfigure

I’m not quite sure what it means with the mapping values.

rake aborted!
Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 44 column 33
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/1_settings.rb:5:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure => environment
(See full trace by running task with --trace)
chef_version=13.6.4
    platform=ubuntu
    platform_version=16.04
    ruby=ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux]
    program_name=/opt/gitlab/embedded/bin/chef-client
    executable=/opt/gitlab/embedded/bin/chef-client

Recipe: gitlab::gitlab-rails
  * execute[clear the gitlab-rails cache] action run
    [execute] rake aborted!
              Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 44 column 33
              /opt/gitlab/embedded/service/gitlab-rails/config/initializers/1_settings.rb:5:in `<top (required)>'
              /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
              /opt/gitlab/embedded/bin/bundle:23:in `load'
              /opt/gitlab/embedded/bin/bundle:23:in `<main>'
              Tasks: TOP => cache:clear => cache:clear:redis => environment
              (See full trace by running task with --trace)

    ================================================================================
    Error executing action `run` on resource 'execute[clear the gitlab-rails cache]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of /opt/gitlab/bin/gitlab-rake cache:clear ----
    STDOUT:
    STDERR: rake aborted!
    Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 44 column 33
    /opt/gitlab/embedded/service/gitlab-rails/config/initializers/1_settings.rb:5:in `<top (required)>'
    /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
    /opt/gitlab/embedded/bin/bundle:23:in `load'
    /opt/gitlab/embedded/bin/bundle:23:in `<main>'
    Tasks: TOP => cache:clear => cache:clear:redis => environment
    (See full trace by running task with --trace)
    ---- End output of /opt/gitlab/bin/gitlab-rake cache:clear ----
    Ran /opt/gitlab/bin/gitlab-rake cache:clear returned 1

#2

This issue can now be marked as solved.

I found this was down to an old setting in the config file:

gitlab_rails['gitlab_email_subject_suffix'] = 'GitLab:'


#3

Thanks a lot for sharing your findings! I marked your latest post as the solution. For future reference, you can also do this yourself without having to wait for a moderator, using the checkbox in the options near the bottom of the post.