Upgrade Failed 18.1.2 to 18.2.1

Problem to solve

Problem with updating gitlab self hosted instance from 18.1.2 to 18.2.1
After downloading and installing the update the reconfigure command failed with the following error:

Net::HTTPClientException: 412 “Precondition Failed”

Steps to reproduce

The upgrade followed the normal process

yum install gitlab-ce-18.2.1

Cinc Stacktrace:

cat /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
Generated at 2025-07-28 15:54:26 +0300
Net::HTTPClientException: 412 "Precondition Failed"
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/net-http-0.6.0/lib/net/http/response.rb:277:in `error!'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/http.rb:158:in `request'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/http.rb:137:in `post'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/policy_builder/expand_node_object.rb:186:in `sync_cookbooks'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/policy_builder/expand_node_object.rb:89:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/forwardable-1.3.3/lib/forwardable.rb:240:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/client.rb:499:in `setup_run_context'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/client.rb:294:in `run'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:305:in `run_with_graceful_exit_option'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:281:in `block in run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/local_mode.rb:42:in `with_server_connectivity'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:264:in `run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application/base.rb:354:in `run_application'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-18.3.0/lib/chef/application.rb:67:in `run'
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/chef-bin-18.3.0/bin/cinc-client:25:in `<top (required)>'
/opt/gitlab/embedded/bin/cinc-client:25:in `load'
/opt/gitlab/embedded/bin/cinc-client:25:in `<main>'

After downgrading again to previous version 18.1.2, installation is working fine.

Configuration

OS: AlmaLinux 8.10

Gitlab Info:

System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   3.2.5
Gem Version:    3.6.9
Bundler Version:2.6.9
Rake Version:   13.0.6
Redis Version:  7.2.9
Sidekiq Version:7.3.9
Go Version:     unknown

GitLab information
Version:        18.1.2
Revision:       98bf90e2827
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     16.8
URL:            xxx
HTTP Clone URL: xxx
SSH Clone URL:  xxx
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: 

GitLab Shell
Version:        14.42.0
Repository storages:
- default:      unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell

Gitaly
- default Address:      unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version:      18.1.2
- default Git Version:  2.49.0.gl2

Versions

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

The issue seems to be happening from other origin versions too.

Here is my reconfigure printout

 [2025-08-11T11:04:12+03:00] INFO: Started Cinc Zero at chefzero://localhost:1 with repository at /opt/gitlab/embedded (One version per cookbook)
Cinc Client, version 18.3.0
Patents: https://www.chef.io/patents
Infra Phase starting
[2025-08-11T11:04:12+03:00] INFO: *** Cinc Client 18.3.0 ***
[2025-08-11T11:04:12+03:00] INFO: Platform: x86_64-linux
[2025-08-11T11:04:12+03:00] INFO: Cinc-client pid: 573722
/opt/gitlab/embedded/lib/ruby/gems/3.2.0/gems/ffi-yajl-2.6.0/lib/ffi_yajl/encoder.rb:42: warning: undefining the allocator of T_DATA class FFI_Yajl::Ext::Encoder::YajlGen
[2025-08-11T11:04:15+03:00] INFO: Setting the run_list to ["recipe[gitlab-base]"] from CLI options
[2025-08-11T11:04:15+03:00] INFO: Run List is [recipe[gitlab-base]]
[2025-08-11T11:04:15+03:00] INFO: Run List expands to [gitlab-base]
[2025-08-11T11:04:15+03:00] INFO: Starting Cinc Client Run for gitlab.vsb.lancom.gr
[2025-08-11T11:04:15+03:00] INFO: Running start handlers
[2025-08-11T11:04:15+03:00] INFO: Start handlers complete.
Resolving cookbooks for run list: ["gitlab-base"]

================================================================================
Error Resolving Cookbooks for Run List:
================================================================================

Missing Cookbooks:
------------------
No such cookbook: repmgr

Expanded Run List:
------------------
* gitlab-base

System Info:
------------
chef_version=18.3.0
platform=almalinux
platform_version=8.10
ruby=ruby 3.2.5 (2024-07-26 revision 31d0f1a2e7) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/cinc-client
executable=/opt/gitlab/embedded/bin/cinc-client


Running handlers:
[2025-08-11T11:04:16+03:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

412 "Precondition Failed"

Running handlers complete
[2025-08-11T11:04:16+03:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 03 seconds
[2025-08-11T11:04:16+03:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2025-08-11T11:04:16+03:00] FATAL: ---------------------------------------------------------------------------------------
[2025-08-11T11:04:16+03:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2025-08-11T11:04:16+03:00] FATAL: ---------------------------------------------------------------------------------------
[2025-08-11T11:04:16+03:00] FATAL: Net::HTTPClientException: 412 "Precondition Failed"
1 Like

Did you have any other problems when upgrading from GitLab 17 to 18 ?

No issues with previous updates.