Error upgrading from 15.3.3 to 15.4.6

Hello,

I’m trying to upgrade my Gitlab CE server to 15.3.3 to 15.4.6 following the Gitlab’s Upgrade Path Upgrade Path

The first time I tried the upgrade, appeared this error

> Public attributes file is missing, run gitlab-ctl reconfigure to re-create it".

So, I did it. However, after that, now appears this error when I try the upgrade.

[user_with_sudo@gitlab ~]$ sudo dnf install gitlab-ce-15.4.6
gitlab_gitlab-ce                                                                        636  B/s | 862  B     00:01
gitlab_gitlab-ce-source                                                                 672  B/s | 862  B     00:01
gitlab_gitlab-ee                                                                        626  B/s | 862  B     00:01
gitlab_gitlab-ee-source                                                                 631  B/s | 862  B     00:01
Dependencies resolved.
========================================================================================================================
Package                  Architecture          Version                           Repository                       Size
========================================================================================================================
Upgrading:
gitlab-ce                x86_64                15.4.6-ce.0.el8                   gitlab_gitlab-ce                1.1 G
 
Transaction Summary
========================================================================================================================
Upgrade  1 Package
 
Total download size: 1.1 G
Is this ok [y/N]: y
Downloading Packages:
gitlab-ce-15.4.6-ce.0.el8.x86_64.rpm                                                     49 MB/s | 1.1 GB     00:22
------------------------------------------------------------------------------------------------------------------------
Total                                                                                    49 MB/s | 1.1 GB     00:22
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Running scriptlet: gitlab-ce-15.4.6-ce.0.el8.x86_64                                                               1/2
gitlab preinstall: Checking for unmigrated data on legacy storage
gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!)
rake aborted!
Backup::Error: backup_information.yml not yet loaded
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:305:in `backup_information'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:495:in `list_env'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:490:in `skipped'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:486:in `skipped?'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:234:in `ensure in run_all_create_tasks'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:235:in `run_all_create_tasks'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:43:in `create'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in '
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `'
 
**Caused by:**
**Errno::ENOENT: No such file or directory - tar**
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/popen.rb:47:in `popen_with_detail'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/popen.rb:15:in `popen'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:481:in `tar_version'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:282:in `build_backup_information'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:219:in `run_all_create_tasks'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:43:in `create'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in '
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `'
Tasks: TOP => gitlab:backup:create
(See full trace by running task with --trace)
gitlab preinstall:
gitlab preinstall: Database backup failed! If you want to skip this backup, run the following command and try again:
gitlab preinstall:
gitlab preinstall:  sudo touch /etc/gitlab/skip-auto-backup
gitlab preinstall:
**error: %prein(gitlab-ce-15.4.6-ce.0.el8.x86_64) scriptlet failed, exit status 1**
** **
**Error in PREIN scriptlet in rpm package gitlab-ce**
  Verifying        : gitlab-ce-15.4.6-ce.0.el8.x86_64                                                               1/2
  Verifying        : gitlab-ce-15.3.3-ce.0.el8.x86_64

I have tested again with SELinux in permissive mode with the same result. Also, I’ve downloaded only the package, and I executed locally with rpm with the same result.

Specs:

System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.7.5p203
Gem Version: 3.1.6
Bundler Version:2.3.15
Rake Version: 13.0.6
Redis Version: 6.2.7
Sidekiq Version:6.4.0
Go Version: unknown

GitLab information
Version: 15.3.3
Revision: c629a47f87f
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 13.6
URL: ********
HTTP Clone URL: ********
SSH Clone URL: *******
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version: 14.10.0
Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories
    GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell

SO: Almalinux 8.9

I’ve recently updated other old gitlab 13.x instance to 16.x following the upgrade path and it was a piece of cake. I don’t understand why fails here.

Thanks in advance for your help.

  1. Does the file /var/opt/gitlab/backups/backup_information.yml exist?
  2. Is SELinux in enforcing mode, preventing file access? This should be logged to auth.log or syslog.
  3. Is skipping the backup an option?

Hello,

Does the file /var/opt/gitlab/backups/backup_information.yml exist?

It doesn’t. That directory is empty, and I can’t find a similar archive in the system.

Is SELinux in enforcing mode, preventing file access? This should be logged to auth.log or syslog.

I tried with SELinux in permissivemode with the same result and I didn’t find any suspicious in the logs

Is skipping the backup an option?

It is. I haven’t mentioned before but is a VM. I can make a snapshot and proceed with the upgrade.

Thanks with your help @dnsmichi