[go: up one dir, main page]

Skip to content

Error upgrading to gitlab-ee 17.0.0

On Ubuntu 22.04 error upgrading Omnibus gitlab-ee 16.11.2 to 17.0.0

Error on configuration

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

NoMethodError
-------------
undefined method `gsub' for nil:NilClass

      redirect_uri = Gitlab['gitlab_pages']['auth_redirect_uri'].gsub('.', '\.')
                                                                ^^^^^

Cookbook Trace: (most recent call first)
----------------------------------------
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-pages/libraries/gitlab_pages.rb:153:in `parse_namespace_in_path'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-pages/libraries/gitlab_pages.rb:33:in `parse_variables'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:208:in `block in generate_config'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:206:in `each'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/settings_dsl.rb:206:in `generate_config'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:35:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:27:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:22:in `from_file'

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

146:        # If GitLab Pages isn't enabled or namespace_in_path is isn't enabled, do nothing.
147:        return unless Gitlab['gitlab_pages']['enable'] && Gitlab['gitlab_pages']['namespace_in_path']
148:  
149:        Gitlab['pages_nginx']['namespace_in_path'] = Gitlab['gitlab_pages']['namespace_in_path']
150:        url_scheme = Gitlab['gitlab_rails']['pages_https'] ? 'https' : 'http'
151:  
152:        pages_port = Gitlab['gitlab_rails']['pages_port']
153>>       redirect_uri = Gitlab['gitlab_pages']['auth_redirect_uri'].gsub('.', '\.')
154:        # Add the following when pages_port is not 80 or 443
155:        Gitlab['pages_nginx']['proxy_redirect'] =
156:          if [80, 443].include?(pages_port)
157:            {
158:              "~^(#{redirect_uri})(.*)$" => "$1$2",
159:              "~^#{url_scheme}://([^/]*)\\.(#{Gitlab['pages_nginx']['fqdn_regex']})/(.*)$" => "#{url_scheme}://$2/$1/$3",
160:              "~^//([^/]*)\\.(#{Gitlab['pages_nginx']['fqdn_regex']})/(.*)$" => "/$1/$3",
161:              "~^/(.*)$" => "/$namespace/$1",
162:            }

System Info:
------------
chef_version=18.3.0
platform=ubuntu
platform_version=22.04
ruby=ruby 3.1.5p253 (2024-04-023 revision 1945f8dc0e) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/cinc-client
executable=/opt/gitlab/embedded/bin/cinc-client


Running handlers:
[2024-05-17T15:01:33+12:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

undefined method `gsub' for nil:NilClass

      redirect_uri = Gitlab['gitlab_pages']['auth_redirect_uri'].gsub('.', '\.')
                                                                ^^^^^

Running handlers complete
[2024-05-17T15:01:33+12:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 03 seconds
[2024-05-17T15:01:33+12:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2024-05-17T15:01:33+12:00] FATAL: ---------------------------------------------------------------------------------------
[2024-05-17T15:01:33+12:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2024-05-17T15:01:33+12:00] FATAL: ---------------------------------------------------------------------------------------
[2024-05-17T15:01:33+12:00] FATAL: NoMethodError: undefined method `gsub' for nil:NilClass

      redirect_uri = Gitlab['gitlab_pages']['auth_redirect_uri'].gsub('.', '\.')
                                                                ^^^^^
===
There was an error running gitlab-ctl reconfigure. Please check the output above for more
details.
===

dpkg: error processing package gitlab-ee (--configure):
 installed gitlab-ee package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 gitlab-ee
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Edited by Jason Plum