This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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.
Bug 2265724 - Product level Verify checksum action spawns unessasary checksum tasks for cloned repositories of the root repository
Summary: Product level Verify checksum action spawns unessasary checksum tasks for clo...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.14.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: stream
Assignee: Samir Jha
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-23 19:37 UTC by Taft Sanders
Modified: 2024-06-06 17:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 17:04:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 37259 0 Normal New Product level Verify checksum action spawns unessasary checksum tasks for cloned repositories of the root repository 2024-03-13 20:05:35 UTC
Red Hat Issue Tracker   SAT-23544 0 None Migrated None 2024-06-06 17:04:26 UTC

Description Taft Sanders 2024-02-23 19:37:49 UTC
Description of problem:
When running a task to verify the checksum of a single repository from the WebUI (WebUI > Content > Product > [click a product name] > [click a repo name] > Select Action > Verify Content Checksum) a single task to verify the checksum of the root repository in that organization, as expected.

When running a task to verify the checksum of a single PRODUCT from the WebUI (WebUI > Content > Product > [select a checkbox for a product] > Select Action > Verify Content Checksum) every repository under that product, along with every cloned version of those repositories (cloned repos being those pulp repos for content views and composite content views that get created) get a verify checksum task run against it in no particular order.


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

How reproducible:
Every time

Steps to Reproduce:
1. Sync a repository
2. Add this repo to a content view
3. Create 1 or more content view versions with different filters to exclude any package to cause pulp to create a clone of the repository
4. Using the 2 methods mentioned above, execute a verify checksum action on the product and the individual repository
5. Watch the tasks that spawn in foreman-tasks

Actual results:
This is a problem for the following 3 reasons:
1. As the RPMs only exist once on the filesystem for any number of repositories, only the reference for the foreman root repository should ever be applicable for the methods mentioned above.
2. Inconsistency of expectations when executing for a product or a repo.
3. Verifying Checksum a clone repository is most likely never going to be the expected use case. Likely the reason for running the verify checksum is that a package available to a client doesn't exist, match with what the repodata says it should be, or the package is corrupted/unusable. Since clones don't have pulpcore remote objects, these can't be fixed. (Unless there is some feature to refer back to the foreman's root repository that I didn't see).

Expected results:
- Short-term:
Have the verify checksum action for both the product and individual repository only take action on the foreman root repository version and not the repositories cloned into content views.

- Long-term: Include short-term goal, and have the verify checksum flag a repository if a change occurred. Then for each flagged repository, republish repodata on all instances of the repository for the organization.

Additional info:

Comment 3 Ian Ballou 2024-02-26 14:57:49 UTC
The issue is here: https://github.com/Katello/katello/blob/KATELLO-4.9/app/controllers/katello/api/v2/products_bulk_actions_controller.rb#L58

The repositories need to be filtered further to ignore the CV copies.

Doing this filtering will technically halt the ability to repair older content view versions via the UI, however I'd argue the bug here for large environments is more inconvenient than triggering a repair from the "/repositories/:id/verify_checksum" endpoint.

Perhaps as part of the bug fix we could offer a repair endpoint for content view versions.

Comment 7 Samir Jha 2024-03-13 20:05:34 UTC
Created redmine issue https://projects.theforeman.org/issues/37259 from this bug

Comment 8 Bryan Kearney 2024-03-20 20:15:07 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/37259 has been resolved.

Comment 9 Vladimír Sedmík 2024-04-12 12:30:41 UTC
Reproduced in 6.15.0 snap 10.1, verified in Stream snap 53.0 (rubygem-katello-4.13.0-0.1.pre.master.20240409152503gitd8b7638.el9sat.noarch):

Product -> Select Action -> Verify Content Checksum - now spins only one task per repository present in the product (no matter the count of filtered CV versions).

Two repos in product, 4 CV versions, dynflow bulk action task before fix:
---
action_class: Actions::Katello::Repository::VerifyChecksum
target_ids:
- 211
- 212
- 214
- 217
- 215
- 219
- 216
- 218
- 213
- 220
target_class: Katello::Repository

After fix:
---
action_class: Actions::Katello::Repository::VerifyChecksum
target_ids:
- 6
- 1
target_class: Katello::Repository

Comment 10 Eric Helms 2024-06-06 17:04:27 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.