Bug #34299
closedUpgrade fails during db:seed with ActiveRecord::RecordNotDestroyed: Failed to destroy the record
Description
Upgrade from Katello 4.1 to 4.3 fails during db:seed with ActiveRecord::RecordNotDestroyed: Failed to destroy the record
Empty satellite was used.
How reproducible:
100%
Steps to Reproduce:
1. Have a empty and registered foreman/katello 4.1
2. Upgrade to 4.3 directly
- satellite-maintain upgrade run --target-version 7.0 -w repositories-validate,repositories-setup -y
...
Running Migration scripts to Satellite 7.0
================================================================================
Setup repositories: [SKIPPED]
--------------------------------------------------------------------------------
Unlock packages: [OK]
--------------------------------------------------------------------------------
Update package(s) : [OK]
--------------------------------------------------------------------------------
Procedures::Installer::Upgrade: [FAIL]
Failed executing LANG=en_US.utf-8 satellite-installer --disable-system-checks, exit status 6:
...
2022-01-20 17:18:28 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
2022-01-20 17:18:28 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
...
Scenario [Migration scripts to Satellite 7.0] failed.
The following steps ended up in failing state:
[installer-upgrade]
Actual results:
failed upgrade due to failing db:seed
Expected results:
successful upgrade"