I am using Upgrading Foreman to 3.12 that instructions but get an error. The preupgrade is Ok but upgrade has then a problem by downloading.
ERROR:
Following errors occurred and the upgrade cannot continue:
1. Actor: dnf_package_download
Message: DNF execution failed with non zero exit code.
No i get that error by foreman-installer by upgrading to Foreman 14 - katello 4.16: Error 1: Puppet Exec resource ‘foreman-rake-db:migrate’ failed. Logs:
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]
Error 1: Puppet Exec resource 'foreman-rake-db:migrate' failed. Logs:
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]
Adding autorequire relationship with User[foreman]
Starting to evaluate the resource (5269 of 5553)
Evaluated in 60.80 seconds
Exec[foreman-rake-db:migrate](provider=posix)
Executing check '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
Executing '/usr/sbin/foreman-rake db:migrate'
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless
Run `bin/rails db:migrate` to update your database then try again.
You have 9 pending migrations:
20240924161240 KatelloRecreateEvrConstructs
20241022121706 AddSyncDependenciesOption
20241101144625 RemoveSystemPurposeAddons
20241107002541 AddRegistryURLToKatelloFlatpakRemotes
20241112145802 AddManifestEntityToContentFacets
20241120213713 AddAllowOtherTypesToContentViewErratumFilterRules
20241126150849 RemoveRemoteExecutionWorkersPoolSize
20241206183052 AddContentTypeToContainerManifestsAndLists
20250309121956 RenameAnsibleTowerFqdnToApiURL
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_installed_packages_on_nvrea"
DETAIL: Key (nvrea)=(gcc-objc-4.4.7-23.el6.x86_64) already exists.
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:965:in `block in method_missing'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:935:in `block in say_with_time'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:935:in `say_with_time'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:954:in `method_missing'
/usr/share/gems/gems/katello-4.16.1/db/migrate/20240924161240_katello_recreate_evr_constructs.rb:140:in `up'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:908:in `public_send'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:908:in `exec_migration'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:889:in `block (2 levels) in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:888:in `block in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:887:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1095:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1409:in `block in execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/transactions.rb:209:in `transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1460:in `ddl_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1408:in `execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1382:in `each'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1382:in `migrate_without_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1331:in `block in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1481:in `block in with_advisory_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1496:in `with_advisory_lock_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1477:in `with_advisory_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1331:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1166:in `up'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1141:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/railties/databases.rake:92:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Caused by:
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_installed_packages_on_nvrea"
DETAIL: Key (nvrea)=(gcc-objc-4.4.7-23.el6.x86_64) already exists.
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:965:in `block in method_missing'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:935:in `block in say_with_time'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:935:in `say_with_time'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:954:in `method_missing'
/usr/share/gems/gems/katello-4.16.1/db/migrate/20240924161240_katello_recreate_evr_constructs.rb:140:in `up'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:908:in `public_send'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:908:in `exec_migration'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:889:in `block (2 levels) in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:888:in `block in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:887:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1095:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1409:in `block in execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/transactions.rb:209:in `transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1460:in `ddl_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1408:in `execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1382:in `each'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1382:in `migrate_without_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1331:in `block in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1481:in `block in with_advisory_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1496:in `with_advisory_lock_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1477:in `with_advisory_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1331:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1166:in `up'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1141:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/railties/databases.rake:92:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Caused by:
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_installed_packages_on_nvrea"
DETAIL: Key (nvrea)=(gcc-objc-4.4.7-23.el6.x86_64) already exists.
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:965:in `block in method_missing'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:935:in `block in say_with_time'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:935:in `say_with_time'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:954:in `method_missing'
/usr/share/gems/gems/katello-4.16.1/db/migrate/20240924161240_katello_recreate_evr_constructs.rb:140:in `up'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:908:in `public_send'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:908:in `exec_migration'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:889:in `block (2 levels) in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:888:in `block in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:887:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1095:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1409:in `block in execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/transactions.rb:209:in `transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1460:in `ddl_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1408:in `execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1382:in `each'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1382:in `migrate_without_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1331:in `block in migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1481:in `block in with_advisory_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1496:in `with_advisory_lock_connection'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1477:in `with_advisory_lock'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1331:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1166:in `up'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/migration.rb:1141:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/railties/databases.rake:92:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20240924161240 KatelloRecreateEvrConstructs: migrating =====================
-- extension_enabled?("evr")
-> 0.0014s
-- execute("DROP EXTENSION evr CASCADE;\n")
-> 0.0021s
-- execute(" create type evr_array_item as (\n n NUMERIC,\n s TEXT\n);\n\ncreate type evr_t as (\n epoch INT,\n version evr_array_item[],\n release evr_array_item[]\n);\n\nCREATE FUNCTION evr_trigger() RETURNS trigger AS $$\n BEGIN\n NEW.evr = (select ROW(coalesce(NEW.epoch::numeric,0),\n rpmver_array(coalesce(NEW.version,'empty'))::evr_array_item[],\n rpmver_array(coalesce(NEW.release,'empty'))::evr_array_item[])::evr_t);\n RETURN NEW;\n END;\n$$ language 'plpgsql';\n\ncreate or replace FUNCTION empty(t TEXT)\n\tRETURNS BOOLEAN as $$\n\tBEGIN\n\t\treturn t ~ '^[[:space:]]*$';\n\tEND;\n$$ language 'plpgsql';\n\ncreate or replace FUNCTION isalpha(ch CHAR)\n RETURNS BOOLEAN as $$\n BEGIN\n if ascii(ch) between ascii('a') and ascii('z') or\n ascii(ch) between ascii('A') and ascii('Z')\n then\n return TRUE;\n end if;\n return FALSE;\n END;\n$$ language 'plpgsql';\n\ncreate or replace FUNCTION isalphanum(ch CHAR)\n\tRETURNS BOOLEAN as $$\n\tBEGIN\n\t\tif ascii(ch) between ascii('a') and ascii('z') or\n\t\t\tascii(ch) between ascii('A') and ascii('Z') or\n\t\t\tascii(ch) between ascii('0') and ascii('9')\n\t\tthen\n\t\t\treturn TRUE;\n\t\tend if;\n\t\treturn FALSE;\n\tEND;\n$$ language 'plpgsql';\n\ncreate or replace function isdigit(ch CHAR)\n\tRETURNS BOOLEAN as $$\n\tBEGIN\n\t if ascii(ch) between ascii('0') and ascii('9')\n\t then\n\t\treturn TRUE;\n\t end if;\n\t return FALSE;\n\tEND ;\n$$ language 'plpgsql';\n\ncreate or replace FUNCTION rpmver_array (string1 IN VARCHAR)\n\tRETURNS evr_array_item[] as $$\n\tdeclare\n\t\tstr1 VARCHAR := string1;\n\t\tdigits VARCHAR(10) := '0123456789';\n\t\tlc_alpha VARCHAR(27) := 'abcdefghijklmnopqrstuvwxyz';\n\t\tuc_alpha VARCHAR(27) := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\talpha VARCHAR(54) := lc_alpha || uc_alpha;\n\t\tone VARCHAR;\n\t\tisnum BOOLEAN;\n\t\tver_array evr_array_item[] := ARRAY[]::evr_array_item[];\n\tBEGIN\n\t\tif str1 is NULL\n\t\tthen\n\t\t\tRAISE EXCEPTION 'VALUE_ERROR.';\n\t\tend if;\n\n\t\tone := str1;\n\t\t<<segment_loop>>\n\t\twhile one <> ''\n\t\tloop\n\t\t\tdeclare\n\t\t\t\tsegm1 VARCHAR;\n\t\t\t\tsegm1_n NUMERIC := 0;\n\t\t\tbegin\n\t\t\t\t-- Throw out all non-alphanum characters\n\t\t\t\twhile one <> '' and not isalphanum(one)\n\t\t\t\tloop\n\t\t\t\t\tone := substr(one, 2);\n\t\t\t\tend loop;\n\t\t\t\tstr1 := one;\n\t\t\t\tif str1 <> '' and isdigit(str1)\n\t\t\t\tthen\n\t\t\t\t\tstr1 := ltrim(str1, digits);\n\t\t\t\t\tisnum := true;\n\t\t\t\telse\n\t\t\t\t\tstr1 := ltrim(str1, alpha);\n\t\t\t\t\tisnum := false;\n\t\t\t\tend if;\n\t\t\t\tif str1 <> ''\n\t\t\t\tthen segm1 := substr(one, 1, length(one) - length(str1));\n\t\t\t\telse segm1 := one;\n\t\t\t\tend if;\n\n\t\t\t\tif segm1 = '' then return ver_array; end if; /* arbitrary */\n\t\t\t\tif isnum\n\t\t\t\tthen\n\t\t\t\t\tsegm1 := ltrim(segm1, '0');\n\t\t\t\t\tif segm1 <> '' then segm1_n := segm1::numeric; end if;\n\t\t\t\t\tsegm1 := NULL;\n\t\t\t\telse\n\t\t\t\tend if;\n\t\t\t\tver_array := array_append(ver_array, (segm1_n, segm1)::evr_array_item);\n\t\t\t\tone := str1;\n\t\t\tend;\n\t\tend loop segment_loop;\n\n\t\treturn ver_array;\n\tEND ;\n$$ language 'plpgsql';\n\n")
-> 0.0030s
-- add_column(:katello_rpms, :evr, :evr_t)
-> 0.0006s
-- add_column(:katello_installed_packages, :evr, :evr_t)
-> 0.0004s
-- execute(" update katello_rpms SET evr = (ROW(coalesce(epoch::numeric,0),\n rpmver_array(coalesce(version,'empty'))::evr_array_item[],\n rpmver_array(coalesce(release,'empty'))::evr_array_item[])::evr_t);\n\n update katello_installed_packages SET evr = (ROW(coalesce(epoch::numeric,0),\n rpmver_array(coalesce(version,'empty'))::evr_array_item[],\n rpmver_array(coalesce(release,'empty'))::evr_array_item[])::evr_t);\n")
change from 'notrun' to ['0'] failed: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
1 error was detected during installation.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.
Create a backup/snapshot of the Satellite server, as we are going to merge the duplicate records.
It is recommended to stop all the services of the affected satellite server except the Postgresql server before proceeding to the next step, especially for a heavy\busy Red Hat Satellite server.
This will ensure that no duplicate records will be re-created before the database indexes are being fixed.
Just checking for my own sanity: this machines was updated from EL7 to EL8 in the past?
(Otherwise, you should not run into this index corruption, or we have a bug somewhere)
No i have problem on smart proxies by leapp preupgrade:
cat /var/log/leapp/leapp-report.txt
Risk Factor: high (error)
Title: DNF execution failed with non zero exit code.
Summary: {"STDOUT": "Red Hat Enterprise Linux 9 for x86_64 - AppStre 41 kB/s | 4.5 kB 00:00 \nRed Hat Enterprise Linux 9 for x86_64 - BaseOS 39 kB/s | 4.1 kB 00:00 \nPackage foreman-installer-1:3.12.1-1.el8.noarch is already installed.\nPackage foreman-installer-katello-1:3.12.1-1.el8.noarch is already installed.\nPackage foreman-proxy-3.12.1-1.el8.noarch is already installed.\nPackage postgresql-13.20-1.module+el8.10.0+22878+46d41b73.x86_64 is already installed.\nPackage postgresql-contrib-13.20-1.module+el8.10.0+22878+46d41b73.x86_64 is already installed.\nPackage postgresql-server-13.20-1.module+el8.10.0+22878+46d41b73.x86_64 is already installed.\nPackage python3.11-pulp-ansible-1:0.21.8-1.el8.noarch is already installed.\nPackage python3.11-pulp-container-2.20.3-1.el8.noarch is already installed.\nPackage python3.11-pulp-deb-3.2.1-1.el8.noarch is already installed.\nPackage python3.11-pulp-glue-0.29.2-2.el8.noarch is already installed.\nPackage python3.11-pulp-python-3.11.3-1.el8.noarch is already installed.\nPackage python3.11-pulp-rpm-3.26.1-1.el8.noarch is already installed.\nPackage python3.11-pulpcore-3.49.22-1.el8.noarch is already installed.\nPackage rubygem-foreman_maintain-1:1.7.6-1.el8.noarch is already installed.\nPackage rubygem-smart_proxy_container_gateway-3.1.0-1.fm3_12.el8.noarch is already installed.\nPackage rubygem-smart_proxy_pulp-3.3.0-1.fm3_10.el8.noarch is already installed.\n", "STDERR": "warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.\nwarning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.\nWarning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp leapp-upgrade-el8toel9 python3-leapp\nTransaction check: \n\n Problem 1: package python3.11-pulp-rpm-3.26.1-1.el8.noarch from @System requires python3.11-createrepo_c >= 1.1.0, but none of the providers can be installed\n - package python3.11-createrepo_c-1.1.3-1.el8.x86_64 from @System requires libdrpm.so.0()(64bit), but none of the providers can be installed\n - conflicting requests\n Problem 2: package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-cryptography >= 38.0.1, but none of the providers can be installed\n - python3.11-cryptography-42.0.8-1.el8.x86_64 from @System does not belong to a distupgrade repository\n - conflicting requests\n Problem 3: package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-pyparsing >= 3.1.0, but none of the providers can be installed\n - package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed\n - package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch from @System requires python3.11-pulpcore >= 3.49.0, but none of the providers can be installed\n - python3.11-pyparsing-3.1.1-4.el8.noarch from @System does not belong to a distupgrade repository\n - conflicting requests\n Problem 4: cannot install the best update candidate for package python3.11-cryptography-42.0.8-1.el8.x86_64\n - cannot install both python3.11-cryptography-37.0.2-6.el9.x86_64 from rhel-9-for-x86_64-appstream-rpms and python3.11-cryptography-42.0.8-1.el8.x86_64 from @System\n - package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-cryptography >= 38.0.1, but none of the providers can be installed\n - package python3.11-pulp-container-2.20.3-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed\n - package python3.11-pulp-container-2.20.3-1.el8.noarch from @System requires python3.11-pulpcore >= 3.49.0, but none of the providers can be installed\n - conflicting requests\n Problem 5: cannot install the best update candidate for package python3.11-pyparsing-3.1.1-4.el8.noarch\n - cannot install both python3.11-pyparsing-2.4.7-4.el9.noarch from leapp-foreman-plugins and python3.11-pyparsing-3.1.1-4.el8.noarch from @System\n - package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-pyparsing >= 3.1.0, but none of the providers can be installed\n - package python3.11-pulp-deb-3.2.1-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed\n - package python3.11-pulp-deb-3.2.1-1.el8.noarch from @System requires python3.11-pulpcore >= 3.45.1, but none of the providers can be installed\n - conflicting requests\n", "hint": "If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process."}
Key: 1e26c8b86cec72c25c04ca045d2b0ed3e8ca2df5
----------------------------------------
Risk Factor: high (inhibitor)
Title: Detected unknown GPG keys for target system repositories
Summary: Some of the target repositories require GPG keys that are not installed in the current RPM DB or are not stored in the /etc/leapp/repos.d/system_upgrade/common/files/rpm-gpg/9 directory. Leapp is not able to guarantee validity of such gpg keys and manual review is required, so any spurious keys are not imported in the system during the in-place upgrade. The following additional gpg keys are required to be imported during the upgrade:
- /var/lib/leapp/el9userspace/etc/pki/rpm-gpg/RPM-GPG-KEY-candlepin
Remediation: [hint] Check the path to the listed GPG keys is correct, the keys are valid and import them into the host RPM DB or store them inside the /etc/leapp/repos.d/system_upgrade/common/files/rpm-gpg/9 directory prior the upgrade. If you want to proceed the in-place upgrade without checking any RPM signatures, execute leapp with the `--nogpgcheck` option.
Key: e7e3f34a530e861b14f1cdd759cb62f92677066f
Message: DNF execution failed with non zero exit code.
Summary:
Stdout: Red Hat Enterprise Linux 9 for x86_64 - AppStre 41 kB/s | 4.5 kB 00:00
Red Hat Enterprise Linux 9 for x86_64 - BaseOS 39 kB/s | 4.1 kB 00:00
Package foreman-installer-1:3.12.1-1.el8.noarch is already installed.
Package foreman-installer-katello-1:3.12.1-1.el8.noarch is already installed.
Package foreman-proxy-3.12.1-1.el8.noarch is already installed.
Package postgresql-13.20-1.module+el8.10.0+22878+46d41b73.x86_64 is already installed.
Package postgresql-contrib-13.20-1.module+el8.10.0+22878+46d41b73.x86_64 is already installed.
Package postgresql-server-13.20-1.module+el8.10.0+22878+46d41b73.x86_64 is already installed.
Package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch is already installed.
Package python3.11-pulp-container-2.20.3-1.el8.noarch is already installed.
Package python3.11-pulp-deb-3.2.1-1.el8.noarch is already installed.
Package python3.11-pulp-glue-0.29.2-2.el8.noarch is already installed.
Package python3.11-pulp-python-3.11.3-1.el8.noarch is already installed.
Package python3.11-pulp-rpm-3.26.1-1.el8.noarch is already installed.
Package python3.11-pulpcore-3.49.22-1.el8.noarch is already installed.
Package rubygem-foreman_maintain-1:1.7.6-1.el8.noarch is already installed.
Package rubygem-smart_proxy_container_gateway-3.1.0-1.fm3_12.el8.noarch is already installed.
Package rubygem-smart_proxy_pulp-3.3.0-1.fm3_10.el8.noarch is already installed.
Stderr: warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp leapp-upgrade-el8toel9 python3-leapp
Transaction check:
Problem 1: package python3.11-pulp-rpm-3.26.1-1.el8.noarch from @System requires python3.11-createrepo_c >= 1.1.0, but none of the providers can be installed
- package python3.11-createrepo_c-1.1.3-1.el8.x86_64 from @System requires libdrpm.so.0()(64bit), but none of the providers can be installed
- conflicting requests
Problem 2: package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-cryptography >= 38.0.1, but none of the providers can be installed
- python3.11-cryptography-42.0.8-1.el8.x86_64 from @System does not belong to a distupgrade repository
- conflicting requests
Problem 3: package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-pyparsing >= 3.1.0, but none of the providers can be installed
- package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed
- package python3.11-pulp-ansible-1:0.21.8-1.el8.noarch from @System requires python3.11-pulpcore >= 3.49.0, but none of the providers can be installed
- python3.11-pyparsing-3.1.1-4.el8.noarch from @System does not belong to a distupgrade repository
- conflicting requests
Problem 4: cannot install the best update candidate for package python3.11-cryptography-42.0.8-1.el8.x86_64
- cannot install both python3.11-cryptography-37.0.2-6.el9.x86_64 from rhel-9-for-x86_64-appstream-rpms and python3.11-cryptography-42.0.8-1.el8.x86_64 from @System
- package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-cryptography >= 38.0.1, but none of the providers can be installed
- package python3.11-pulp-container-2.20.3-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed
- package python3.11-pulp-container-2.20.3-1.el8.noarch from @System requires python3.11-pulpcore >= 3.49.0, but none of the providers can be installed
- conflicting requests
Problem 5: cannot install the best update candidate for package python3.11-pyparsing-3.1.1-4.el8.noarch
- cannot install both python3.11-pyparsing-2.4.7-4.el9.noarch from leapp-foreman-plugins and python3.11-pyparsing-3.1.1-4.el8.noarch from @System
- package python3.11-pulpcore-3.49.22-1.el8.noarch from @System requires python3.11-pyparsing >= 3.1.0, but none of the providers can be installed
- package python3.11-pulp-deb-3.2.1-1.el8.noarch from @System requires python3.11-pulpcore < 3.55, but none of the providers can be installed
- package python3.11-pulp-deb-3.2.1-1.el8.noarch from @System requires python3.11-pulpcore >= 3.45.1, but none of the providers can be installed
- conflicting requests