Bug 1656425

Summary: Upgrade step katello:upgrades:3.8:clear_checksum_type from 6.3 to 6.4 failed - Download policy Cannot sync file:// repositories with On Demand or Background Download Policies
Product: Red Hat Satellite Reporter: Michal Dekan <mdekan>
Component: RepositoriesAssignee: Samir Jha <sajha>
Status: CLOSED ERRATA QA Contact: vijsingh
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: ehelms, mlinden, pdwyer, sajha, vijsingh
Target Milestone: 6.5.0Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.10.0.24-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1686798 (view as bug list) Environment:
Last Closed: 2019-05-14 12:39:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Dekan 2018-12-05 13:49:13 UTC
Description of problem:

Local custom yum repositories with Upstream Repository URL file:// is causing foreman-rake katello:upgrades:3.8:clear_checksum_type to fail:

# foreman-rake katello:upgrades:3.8:clear_checksum_type --trace
/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
/usr/share/foreman/lib/tasks/repair_repos_62.rake:2: warning: already initialized constant PULP_IDS_FILE
/usr/share/foreman/lib/tasks/repair_repos.rake:2: warning: previous definition of PULP_IDS_FILE was here
** Invoke katello:upgrades:3.8:clear_checksum_type (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute katello:upgrades:3.8:clear_checksum_type
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Download policy Cannot sync file:// repositories with On Demand or Background Download Policies
/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!'
...
...
...

Version-Release number of selected component (if applicable):

Satellite 6.4.0

How reproducible: 100%


Steps to Reproduce:
1. Have a custom repository with Upstream URL repository pointing to file://
2. Try to upgrade to 6.4.0
3. It fails with above

Actual results:

katello:upgrades:3.8:clear_checksum_type is trying to forcefully set on Demand or Background download policy on locally hosted repos

Expected results:

katello:upgrades:3.8:clear_checksum_type will not try to change download policy on locally hosted yum repositories (Upstream Repository URL file://)

Comment 4 Samir Jha 2019-02-01 18:56:03 UTC
Created redmine issue http://projects.theforeman.org/issues/25968 from this bug

Comment 5 Bryan Kearney 2019-02-12 23:02:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25968 has been resolved.

Comment 13 vijsingh 2019-03-08 10:42:44 UTC
ON_QA Verified

Comment 14 Brad Buckingham 2019-04-23 15:50:32 UTC
*** Bug 1686798 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2019-05-14 12:39:23 UTC
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