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 2141810 - When working with CCV, include and exclude filters, eventually the number of packages in the CCV will not be as expected, causing problems to the customer
Summary: When working with CCV, include and exclude filters, eventually the number of ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.11.0
Hardware: All
OS: All
unspecified
high
Target Milestone: 6.13.0
Assignee: Ian Ballou
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-10 19:02 UTC by Waldirio M Pinheiro
Modified: 2024-02-08 19:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:22:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35740 0 Normal Closed Composite content view versions can be emptied out during same-repo merging 2023-01-05 17:00:38 UTC
Red Hat Issue Tracker SAT-13838 0 None None None 2022-12-15 14:27:16 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:22:56 UTC

Description Waldirio M Pinheiro 2022-11-10 19:02:39 UTC
Description of problem:
When working with ccv, cv, include and exclude filters, there are some situations where the total # of packages are not matching in the ccv at the end of the day.

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

How reproducible:
100%

Steps to Reproduce:
1. Create CV
2. Create CCV
3. Publish
4. Create the exclude filter, just a single package
5. Create the include filter, adding all the packages

Actual results:
Eventually, the # of packages in the ccv will not match with the expected

Expected results:
The total # of packages should be the sum of all the content views, packages and modules

Additional info:
Checking it with iballou

Comment 1 Ian Ballou 2022-11-10 19:11:32 UTC
the important thing that I noticed on the reproducer was that, at some point during the composite content view publish, the AppStream 8 repository gets all of its content removed. It appears that this is happening because one of the component content view versions has AppStream 8 with no content in it.  This part of the code is likely triggering and removing all previously copied content from the content view version: https://gitlab.cee.redhat.com/satellite/katello/-/blob/SATELLITE-6.11.0/app/services/katello/pulp3/repository/yum.rb#L214

For composites, if multiple component CV versions include the same repo, we merge the repositories together. So, the target repository is the same. The code above is likely telling Pulp to clear out the repo incorrectly.

Comment 2 Ian Ballou 2022-11-10 19:26:35 UTC
Reproducer steps from my testing:

1) Create two component content views with the same repository in it
2) Add a filter to one of the repositories to clear out all content
3) Publish both content views
4) Create a composite content view with both component content views in it
5) Publish that content view
6) If there is any content in the composite content view version, add `source_repositories = source_repositories.reverse` here: https://gitlab.cee.redhat.com/satellite/katello/-/blob/SATELLITE-6.11.0/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb#L21
7) The next publish of the composite version should result in no content being available in the component content view version

To fix the issue, we need to ensure that the "remove all content from repo" call above does not occur for composite content view "merge" copies of the same base repository.

Comment 3 Ian Ballou 2022-11-10 19:31:10 UTC
Created redmine issue https://projects.theforeman.org/issues/35740 from this bug

Comment 5 Bryan Kearney 2022-11-11 00:03:41 UTC
Upstream bug assigned to iballou

Comment 6 Bryan Kearney 2022-11-11 00:03:44 UTC
Upstream bug assigned to iballou

Comment 7 Bryan Kearney 2022-11-17 00:03:51 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35740 has been resolved.

Comment 8 Sam Bible 2023-02-21 17:53:33 UTC
Verified on 6.13 - Snap 11

Steps to Verify:
1) Create two component content views with the same repository in it
2) Add a filter to one of the repositories to clear out all content
3) Publish both content views
4) Create a composite content view with both component content views in it
5) Publish that content view

Expected results:
All content should be present.

Actual results:
All content is present.

Comment 11 errata-xmlrpc 2023-05-03 13:22:42 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 (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


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