Description of problem: Upgrading Red Hat Satellite from version 6.3.4 to 6.4.0 following procedure from https://access.redhat.com/documentation/en-us/red_hat_satellite/6.4/html-single/upgrading_and_updating_red_hat_satellite/#upgrading_red_hat_satellite fails: ... Upgrade Step: clear_checksum_type... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here rake aborted! ActiveRecord::RecordInvalid: Validation failed: Upstream password requires upstream username be set. /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/validations.rb:78:in `raise_validation_error' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/validations.rb:50:in `save!' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/attribute_methods/dirty.rb:43:in `save!' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:313:in `block in save!' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210:in `transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:381:in `with_transaction_returning_status' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:313:in `save!' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/suppressor.rb:46:in `save!' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/lib/katello/lazy_accessor.rb:87:in `save!' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/persistence.rb:294:in `block in update!' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210:in `transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:381:in `with_transaction_returning_status' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/persistence.rb:292:in `update!' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake:21:in `block (6 levels) in <top (required)>' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210:in `transaction' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/transactions.rb:299:in `transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake:9:in `block (5 levels) in <top (required)>' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:63:in `block (2 levels) in find_each' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:63:in `each' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:63:in `block in find_each' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:129:in `block in find_in_batches' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:230:in `block in in_batches' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:214:in `loop' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:214:in `in_batches' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:128:in `find_in_batches' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/batches.rb:62:in `find_each' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake:8:in `block (4 levels) in <top (required)>' /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>' Tasks: TOP => katello:upgrades:3.8:clear_checksum_type (See full trace by running task with --trace) foreman-rake katello:upgrades:3.8:clear_checksum_type failed! Check the output for error! Upgrade step clear_checksum_type failed. Check logs for more information. [FAIL] Failed executing LANG=en_US.utf-8 satellite-installer --upgrade, exit status 1 -------------------------------------------------------------------------------- Scenario [Migration scripts to Satellite 6.4] failed. The following steps ended up in failing state: [installer-upgrade] Resolve the failed steps and rerun the command. In case the failures are false positives, use --whitelist="installer-upgrade" [root@satellite6 ~]# Version-Release number of selected component (if applicable): 6.4.0 How reproducible: Always Steps to Reproduce: 1. Update Satellite to 6.3.4 2. Try to upgrade to 6.4.0 3. Actual results: Upgrade fails Expected results: Upgrade completes successfully Additional info:
Created redmine issue https://projects.theforeman.org/issues/25518 from this bug
Verified: @Satellite 6.5.0 Snap 12.0 Steps/Observation: - Installed Satellite on 6.4.1 GA version - Create repo and updated upstream username only - Upgraded Satellite @Satellite 6.5.0 Snap 12.0 - Post-upgrade upstream username does not exists - Post upgrade tried below on a different repo and invalid credentials getting clean too with "katello:upgrades:3.10:clear_invalid_repo_credentials" # foreman-rake console irb(main):001:0> repo = Katello::RootRepository.last irb(main):002:0> repo.upstream_username = 'potato' => "potato" irb(main):003:0> repo.save!(validate: false) => true irb(main):004:0> exit # katello:upgrades:3.10:clear_invalid_repo_credentials
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:1222