Upgrading to GitLab CE 18.2.7 fails on Ubuntu
Hello,
the upgrade of gitlab-ce from 18.1.6 to 18.2.7 on ubuntu jammy fails because of a MissingCookbookDependency.
sudo apt-get install -y gitlab-ce=18.2.7-ce.0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
gitlab-ce
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 1,436 MB of archives.
After this operation, 75.6 MB of additional disk space will be used.
Get:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu jammy/main amd64 gitlab-ce amd64 18.2.7-ce.0 [1,436 MB]
Fetched 1,436 MB in 17s (84.9 MB/s)
(Reading database ... 238027 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_18.2.7-ce.0_amd64.deb ...
gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!)
2025-09-30 12:09:24 UTC -- Dumping database ...
2025-09-30 12:09:24 UTC -- Dumping PostgreSQL database gitlabhq_production ...
2025-09-30 12:09:30 UTC -- [DONE]
2025-09-30 12:09:30 UTC -- Dumping database ... done
2025-09-30 12:09:30 UTC -- Dumping repositories ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping uploads ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping builds ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping artifacts ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping pages ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping lfs objects ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping terraform states ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping container registry images ... [DISABLED]
2025-09-30 12:09:30 UTC -- Dumping packages ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping ci secure files ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Dumping external diffs ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Creating backup archive: 1759234164_2025_09_30_18.1.6_gitlab_backup.tar ...
2025-09-30 12:09:30 UTC -- Creating backup archive: 1759234164_2025_09_30_18.1.6_gitlab_backup.tar ... done
2025-09-30 12:09:30 UTC -- Uploading backup archive to remote storage ... [SKIPPED]
2025-09-30 12:09:30 UTC -- Deleting old backups ...
2025-09-30 12:09:30 UTC -- Deleting old backups ... done. (0 removed)
2025-09-30 12:09:30 UTC -- Deleting tar staging files ...
2025-09-30 12:09:30 UTC -- Cleaning up /var/opt/gitlab/backups/backup_information.yml
2025-09-30 12:09:30 UTC -- Cleaning up /var/opt/gitlab/backups/db
2025-09-30 12:09:30 UTC -- Deleting tar staging files ... done
2025-09-30 12:09:30 UTC -- Deleting backups/tmp ...
2025-09-30 12:09:30 UTC -- Deleting backups/tmp ... done
2025-09-30 12:09:30 UTC -- Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data
and are not included in this backup. You will need these files to restore a backup.
Please back them up manually.
2025-09-30 12:09:30 UTC -- Backup 1759234164_2025_09_30_18.1.6 is done.
2025-09-30 12:09:30 UTC -- Deleting backup and restore PID file at [/opt/gitlab/embedded/service/gitlab-rails/tmp/backup_restore.pid] ... done
gitlab preinstall: Automatically backing up /etc/gitlab
Running configuration backup
Creating configuration backup archive: gitlab_config_1759234171_2025_09_30.tar
/etc/gitlab/
/etc/gitlab/gitlab-secrets.json
/etc/gitlab/gitlab.rb
/etc/gitlab/trusted-certs/
/etc/gitlab/trusted-certs/keycloak.crt
/etc/gitlab/trusted-certs/b154eebc.0
/etc/gitlab/trusted-certs/fullchain.pem
/etc/gitlab/trusted-certs/ffe8a915.0
/etc/gitlab/ssl/
/etc/gitlab/ssl/letsencrypt_account_private_key.pem
/etc/gitlab/ssl/<REDACTED>.key-staging
/etc/gitlab/ssl/<REDACTED>.crt
/etc/gitlab/ssl/<REDACTED>.key
Configuration backup archive complete: /etc/gitlab/config_backup/gitlab_config_1759234171_2025_09_30.tar
Keeping all older configuration backups
Unpacking gitlab-ce (18.2.7-ce.0) over (18.1.6-ce.0) ...
Setting up gitlab-ce (18.2.7-ce.0) ...
Checking PostgreSQL executables:[2025-09-30T14:12:15+02: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-09-30T14:12:15+02:00] INFO: *** Cinc Client 18.3.0 ***
[2025-09-30T14:12:15+02:00] INFO: Platform: x86_64-linux
[2025-09-30T14:12:15+02:00] INFO: Cinc-client pid: 513651
[2025-09-30T14:12:18+02:00] INFO: Setting the run_list to ["recipe[gitlab::config]", "recipe[postgresql::bin]"] from CLI options
[2025-09-30T14:12:18+02:00] INFO: Run List is [recipe[gitlab::config], recipe[postgresql::bin]]
[2025-09-30T14:12:18+02:00] INFO: Run List expands to [gitlab::config, postgresql::bin]
[2025-09-30T14:12:18+02:00] INFO: Starting Cinc Client Run for <REDACTED>
[2025-09-30T14:12:18+02:00] INFO: Running start handlers
[2025-09-30T14:12:18+02:00] INFO: Start handlers complete.
Resolving cookbooks for run list: ["gitlab::config", "postgresql::bin"]
[2025-09-30T14:12:19+02:00] INFO: Loading cookbooks [gitlab@0.0.1, postgresql@0.1.0, package@0.1.0, logrotate@0.1.0, redis@0.1.0, monitoring@0.1.0, registry@0.1.0, mattermost@0.1.0, consul@0.1.0, gitaly@0.1.0, praefect@0.1.0, gitlab-kas@0.1.0, gitlab-pages@0.1.0, letsencrypt@0.1.0, nginx@0.1.0, runit@5.1.7, acme@4.1.6, crond@0.1.0]
[2025-09-30T14:12:20+02:00] INFO: Removing cookbooks/gitlab/libraries/account_helper.rb from the cache; its is no longer in the cookbook manifest.
[2025-09-30T14:12:20+02:00] INFO: Removing cookbooks/gitlab/libraries/helpers/base_helper.rb from the cache; its is no longer in the cookbook manifest.
[2025-09-30T14:12:20+02:00] INFO: Removing cookbooks/gitlab/libraries/logfiles_helper.rb from the cache; its is no longer in the cookbook manifest.
[2025-09-30T14:12:20+02:00] INFO: Removing cookbooks/gitlab/libraries/redis_uri.rb from the cache; its is no longer in the cookbook manifest.
Synchronizing cookbooks:
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/libraries/gitlab_workhorse.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/libraries/gitlab_exporter.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/libraries/helpers/base_pg_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/libraries/helpers/gitlab_rails.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/libraries/helpers/pg_status_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/libraries/helpers/gitlab_workhorse_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/templates/default/gitconfig.erb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/libraries/redis.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/attributes/default.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/recipes/default.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab/recipes/users.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/certificate_helper.rb in the cache.
- gitlab (0.0.1)[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/account_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/config/gitlab.rb in the cache.
- postgresql (0.1.0)
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/helpers/base_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/helpers/redis_helper/base.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/helpers/redis_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/logfiles_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/redis_uri.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/omnibus_helper.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/package/libraries/deprecations.rb in the cache.
- package (0.1.0)
- redis (0.1.0)
- logrotate (0.1.0)
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/registry/attributes/default.rb in the cache.
- registry (0.1.0)
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/mattermost/attributes/default.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/monitoring/attributes/default.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/consul/attributes/default.rb in the cache.
- monitoring (0.1.0)
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitaly/libraries/gitaly.rb in the cache.
- mattermost (0.1.0)
- consul (0.1.0)
- nginx (0.1.0)
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab-kas/attributes/default.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitlab-pages/recipes/enable.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/praefect/recipes/enable.rb in the cache.
[2025-09-30T14:12:20+02:00] INFO: Storing updated cookbooks/gitaly/recipes/enable.rb in the cache.
- letsencrypt (0.1.0)
- gitlab-kas (0.1.0)
- praefect (0.1.0)
- gitlab-pages (0.1.0)
- gitaly (0.1.0)
- crond (0.1.0)
- runit (5.1.7)
- acme (4.1.6)
Installing cookbook gem dependencies:
Compiling cookbooks...
Loading Cinc Auditor profile files:
Loading Cinc Auditor input files:
Loading Cinc Auditor waiver files:
[2025-09-30T14:12:21+02:00] INFO: Generating default secrets
[2025-09-30T14:12:23+02:00] INFO: Generating /etc/gitlab/gitlab-secrets.json file
Converging 4 resources
Recipe: postgresql::bin
* ruby_block[check_postgresql_version] action run (skipped due to not_if)
* ruby_block[check_postgresql_version_is_deprecated] action run (skipped due to not_if)
* ruby_block[Link postgresql bin files to the correct version] action run (skipped due to only_if)
* template[/opt/gitlab/etc/gitlab-psql-rc] action create (up to date)
[2025-09-30T14:12:23+02:00] INFO: Cinc Client Run complete in 4.885706695 seconds
Running handlers:
[2025-09-30T14:12:23+02:00] INFO: Running report handlers
Running handlers complete
[2025-09-30T14:12:23+02:00] INFO: Report handlers complete
Infra Phase complete, 0/4 resources updated in 08 seconds
Checking PostgreSQL executables: OK
Shutting down all GitLab services except those needed for migrations
ok: down: alertmanager: 1s, normally up
ok: down: gitlab-exporter: 1s, normally up
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 1s, normally up
ok: down: nginx: 0s, normally up
ok: down: node-exporter: 0s, normally up
ok: down: postgres-exporter: 1s, normally up
ok: down: prometheus: 0s, normally up
timeout: run: puma: (pid 495173) 1696s, want down
ok: down: redis-exporter: 0s, normally up
ok: down: sidekiq: 0s, normally up
Ensuring the required services are running
ok: run: postgresql: (pid 495179) 1701s
ok: run: gitaly: (pid 495181) 1701s
run: postgresql: (pid 495179) 1701s; run: log: (pid 495170) 1701s
run: gitaly: (pid 495181) 1701s; run: log: (pid 495180) 1701s
Reconfigure GitLab to apply migrations
[2025-09-30T14:13:05+02: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-09-30T14:13:05+02:00] INFO: *** Cinc Client 18.3.0 ***
[2025-09-30T14:13:05+02:00] INFO: Platform: x86_64-linux
[2025-09-30T14:13:05+02:00] INFO: Cinc-client pid: 513803
/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-09-30T14:13:07+02:00] INFO: Setting the run_list to ["recipe[gitlab-base]"] from CLI options
[2025-09-30T14:13:07+02:00] INFO: Run List is [recipe[gitlab-base]]
[2025-09-30T14:13:07+02:00] INFO: Run List expands to [gitlab-base]
[2025-09-30T14:13:07+02:00] INFO: Starting Cinc Client Run for <REDACTED>
[2025-09-30T14:13:07+02:00] INFO: Running start handlers
[2025-09-30T14:13:07+02:00] INFO: Start handlers complete.
Resolving cookbooks for run list: ["gitlab-base"]
[2025-09-30T14:13:08+02:00] INFO: Loading cookbooks [gitlab-base@0.1.0, package@0.1.0, gitlab@0.0.1, runit@5.1.7, logrotate@0.1.0, postgresql@0.1.0, redis@0.1.0, monitoring@0.1.0, registry@0.1.0, mattermost@0.1.0, consul@0.1.0, gitaly@0.1.0, praefect@0.1.0, gitlab-kas@0.1.0, gitlab-pages@0.1.0, letsencrypt@0.1.0, nginx@0.1.0, acme@4.1.6, crond@0.1.0]
Synchronizing cookbooks:
[2025-09-30T14:13:08+02:00] INFO: Storing updated cookbooks/gitlab-base/recipes/default.rb in the cache.
[2025-09-30T14:13:08+02:00] INFO: Storing updated cookbooks/gitlab-base/metadata.rb in the cache.
- gitlab-base (0.1.0)
- package (0.1.0)
- gitlab (0.0.1)
- runit (5.1.7)
- logrotate (0.1.0)
- postgresql (0.1.0)
- redis (0.1.0)
- monitoring (0.1.0)
- registry (0.1.0)
- mattermost (0.1.0)
- consul (0.1.0)
- gitaly (0.1.0)
- praefect (0.1.0)
- gitlab-kas (0.1.0)
- gitlab-pages (0.1.0)
- letsencrypt (0.1.0)
- nginx (0.1.0)
- acme (4.1.6)
- crond (0.1.0)
Installing cookbook gem dependencies:
Compiling cookbooks...
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:2: warning: already initialized constant SELinuxDistroHelper::REDHAT_RELEASE_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:2: warning: previous definition of REDHAT_RELEASE_FILE was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:3: warning: already initialized constant SELinuxDistroHelper::OS_RELEASE_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/selinux_distro_helper.rb:3: warning: previous definition of OS_RELEASE_FILE was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/secrets_helper.rb:4: warning: already initialized constant SecretsHelper::SECRETS_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:4: warning: previous definition of SECRETS_FILE was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/secrets_helper.rb:5: warning: already initialized constant SecretsHelper::SECRETS_FILE_CHEF_ATTR
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:5: warning: previous definition of SECRETS_FILE_CHEF_ATTR was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/secrets_helper.rb:6: warning: already initialized constant SecretsHelper::SKIP_GENERATE_SECRETS_CHEF_ATTR
/opt/gitlab/embedded/cookbooks/package/libraries/helpers/secrets_helper.rb:6: warning: previous definition of SKIP_GENERATE_SECRETS_CHEF_ATTR was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/gitlab_cluster.rb:16: warning: already initialized constant GitlabCluster::CONFIG_PATH
/opt/gitlab/embedded/cookbooks/package/libraries/gitlab_cluster.rb:16: warning: previous definition of CONFIG_PATH was here
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/gitlab_cluster.rb:17: warning: already initialized constant GitlabCluster::JSON_FILE
/opt/gitlab/embedded/cookbooks/package/libraries/gitlab_cluster.rb:17: warning: previous definition of JSON_FILE was here
Loading Cinc Auditor profile files:
Loading Cinc Auditor input files:
Loading Cinc Auditor waiver files:
[2025-09-30T14:13:09+02:00] WARN: MissingCookbookDependency:
Recipe `gitlab-ee::default` is not in the run_list, and cookbook 'gitlab-ee'
is not a dependency of any cookbook in the run_list. To load this recipe,
first add a dependency of the cookbook 'gitlab-ee' into the metadata
of the cookbook which depends on 'gitlab-ee'.
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-base/recipes/default.rb
================================================================================
Chef::Exceptions::CookbookNotFound
----------------------------------
Cookbook gitlab-ee not found. If you're loading gitlab-ee from another cookbook, make sure you configure the dependency in your metadata
Cookbook Trace: (most recent call first)
----------------------------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-base/recipes/default.rb:4:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-base/recipes/default.rb:
1: if Dir.exist?(File.absolute_path(File.join(__dir__, "../../gitlab-jh")))
2: include_recipe 'gitlab-jh::default'
3: elsif Dir.exist?(File.absolute_path(File.join(__dir__, "../../gitlab-ee")))
4>> include_recipe 'gitlab-ee::default'
5: elsif Dir.exist?(File.absolute_path(File.join(__dir__, "../../gitlab")))
6: include_recipe 'gitlab::default'
7: end
8:
System Info:
------------
chef_version=18.3.0
platform=ubuntu
platform_version=22.04
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-09-30T14:13:09+02:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:
Cookbook gitlab-ee not found. If you're loading gitlab-ee from another cookbook, make sure you configure the dependency in your metadata
Running handlers complete
[2025-09-30T14:13:09+02:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 03 seconds
[2025-09-30T14:13:09+02:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2025-09-30T14:13:09+02:00] FATAL: ---------------------------------------------------------------------------------------
[2025-09-30T14:13:09+02:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2025-09-30T14:13:09+02:00] FATAL: ---------------------------------------------------------------------------------------
[2025-09-30T14:13:09+02:00] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook gitlab-ee not found. If you're loading gitlab-ee from another cookbook, make sure you configure the dependency in your metadata
===
There was an error running gitlab-ctl reconfigure. Please check the output above for more
details.
===
dpkg: error processing package gitlab-ce (--configure):
installed gitlab-ce package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
gitlab-ce
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Edited by 🤖 GitLab Bot 🤖