Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Execution of "foreman-rake katello:change_download_policy DOWNLOAD_POLICY=on_demand" or UI action "Content > products > select "Product" > select "repository" > select "Download Policy" > choose on_demand" to change the download policy fails for Red Hat repos if they had "Yum Metadata Checksum" value set to sha1 or sha256 instead of Default.
Version-Release number of selected component (if applicable):
Satellite 6.11 ( basically 6.10 and 6.13 as well )
How reproducible:
Always, when repository download policy is Immediate and checksum_type is set as sha1 or sha256 sum
Steps to Reproduce:
1. Install a Satellite 6.11 and enable a few Red Hat repos.
2. Change their download policy to Immediate and sync them.
3. Use any rake\DB hack to check checksum_type to sha1 or sha256 for any of those repos.
e.g. it should look like
# echo "select id,name,download_policy,checksum_type,pulp_scratchpad_checksum_type from katello_root_repositories;" | su - postgres -c "psql foreman"
. id | name | download_policy | checksum_type | pulp_scratchpad_checksum_type
-----+--------------------------------------------------------------------------------------------------------+-----------------+---------------+-------------------------------
4 | Red Hat Enterprise Linux 7 Server - RH Common RPMs x86_64 7Server | immediate | sha256 |
6 | Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64 | immediate | sha1 |
26 | Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server | immediate | sha1 |
4. Now either try executing "foreman-rake katello:change_download_policy DOWNLOAD_POLICY=on_demand"
Or, From Ui go to , Content > products > select "Product" > select "repository" > select "Download Policy" > choose on_demand" to change the download policy
Actual results:
2023-01-08T19:05:43 [I|bac|1cffb129] Task {label: , id: f99a7fa6-d705-4da6-8f94-8404f49df7f5, execution_plan_id: b1f66ded-3d58-405e-9326-9c62826b2302} state changed: pending
2023-01-08T19:05:43 [I|bac|1cffb129] Task {label: Actions::Katello::Repository::Update, id: f99a7fa6-d705-4da6-8f94-8404f49df7f5, execution_plan_id: b1f66ded-3d58-405e-9326-9c62826b2302} state changed: planning
2023-01-08T19:05:43 [E|bac|1cffb129] Validation failed: Checksum type Checksum type cannot be set for yum repositories with on demand download policy. (ActiveRecord::RecordInvalid)
And no way to change the "checksum_type" value from Satellite UI or hammer.
Expected results:
* We should be able to change the "checksum_type" in an acceptable way via UI or hammer.
* The "katello:change_download_policy" should be improved to handle the unsettling of checksum_type before changing the download_policy.
Additional info:
* This issue can be fixed for any custom repos as Satellite allows changing the checksum_type or "Yum Metadata Checksum" value to "Default"
* For Red Hat repos,
** From UI, we have no option to edit\set the "Yum Metadata Checksum"
** A command like "hammer repository update --id 79 --checksum-type 'sha1' --download-policy immediate" gets successfully executed but cannot set\unset the checksum ( here it's just an example to set sha1 as the value ).
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 (Important: Satellite 6.13 Release), 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-2023:2097
Description of problem: Execution of "foreman-rake katello:change_download_policy DOWNLOAD_POLICY=on_demand" or UI action "Content > products > select "Product" > select "repository" > select "Download Policy" > choose on_demand" to change the download policy fails for Red Hat repos if they had "Yum Metadata Checksum" value set to sha1 or sha256 instead of Default. Version-Release number of selected component (if applicable): Satellite 6.11 ( basically 6.10 and 6.13 as well ) How reproducible: Always, when repository download policy is Immediate and checksum_type is set as sha1 or sha256 sum Steps to Reproduce: 1. Install a Satellite 6.11 and enable a few Red Hat repos. 2. Change their download policy to Immediate and sync them. 3. Use any rake\DB hack to check checksum_type to sha1 or sha256 for any of those repos. e.g. it should look like # echo "select id,name,download_policy,checksum_type,pulp_scratchpad_checksum_type from katello_root_repositories;" | su - postgres -c "psql foreman" . id | name | download_policy | checksum_type | pulp_scratchpad_checksum_type -----+--------------------------------------------------------------------------------------------------------+-----------------+---------------+------------------------------- 4 | Red Hat Enterprise Linux 7 Server - RH Common RPMs x86_64 7Server | immediate | sha256 | 6 | Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64 | immediate | sha1 | 26 | Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server | immediate | sha1 | 4. Now either try executing "foreman-rake katello:change_download_policy DOWNLOAD_POLICY=on_demand" Or, From Ui go to , Content > products > select "Product" > select "repository" > select "Download Policy" > choose on_demand" to change the download policy Actual results: 2023-01-08T19:05:43 [I|bac|1cffb129] Task {label: , id: f99a7fa6-d705-4da6-8f94-8404f49df7f5, execution_plan_id: b1f66ded-3d58-405e-9326-9c62826b2302} state changed: pending 2023-01-08T19:05:43 [I|bac|1cffb129] Task {label: Actions::Katello::Repository::Update, id: f99a7fa6-d705-4da6-8f94-8404f49df7f5, execution_plan_id: b1f66ded-3d58-405e-9326-9c62826b2302} state changed: planning 2023-01-08T19:05:43 [E|bac|1cffb129] Validation failed: Checksum type Checksum type cannot be set for yum repositories with on demand download policy. (ActiveRecord::RecordInvalid) And no way to change the "checksum_type" value from Satellite UI or hammer. Expected results: * We should be able to change the "checksum_type" in an acceptable way via UI or hammer. * The "katello:change_download_policy" should be improved to handle the unsettling of checksum_type before changing the download_policy. Additional info: * This issue can be fixed for any custom repos as Satellite allows changing the checksum_type or "Yum Metadata Checksum" value to "Default" * For Red Hat repos, ** From UI, we have no option to edit\set the "Yum Metadata Checksum" ** A command like "hammer repository update --id 79 --checksum-type 'sha1' --download-policy immediate" gets successfully executed but cannot set\unset the checksum ( here it's just an example to set sha1 as the value ).