Bug 1722968

Summary: Duplicate content views with same filter criteria in a CCV doesn't show full packages count
Product: Red Hat Satellite Reporter: Lai <ltran>
Component: Content ViewsAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: egolov, iballou
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.12.0.9-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:49:45 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:
Attachments:
Description Flags
Publish Message none

Description Lai 2019-06-21 21:02:36 UTC
Description of problem:
Creating 2 content views with the same exclusion filter on a package and adding it to a CCV still applies the exclusion filter to the CCV.

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

How reproducible:
100%

Steps to Reproduce:
1. sync a repo (e.g. sat6tool7)
2. create a CV, attach the repo and apply a filter (e.g. exclude tracer-common)
3. create another CV with same filter.
4. publish the two CVs
5. create CCV containing those 2 CVs, and publish it
6. Check the CCV content in WebUI
7. Check the CCV content via yum / directly under /var/lib/pulp/published/yum/master/yum_distributor/<OrgID>-<CCVName>-Library-<repo-uuid> directory

Actual results:
6. 60 packages shown
7. 60 packages shown

Expected results:
Steps 6 and 7 should have the full package of 61.

Actual Results:
Steps 6 and 7 has 60 packages.

Additional info:
Please note that in sat6tool7, there's a total of 61 packages.  When you publish a CCV with the 2 duplicate CV, there's a message that states:
"For the duplicate repositories, the packages in each Content View Version will combine regardless of the filters that were applied to the individual Content View Version."

Even though the message says "regardless of the filters that were applied", it seems the filters were still in effect.  We either need to update the message or actually make sure that even duplicate CV with the same filters are taken into account to show the full number of packages.

Comment 3 Ian Ballou 2019-07-05 17:31:46 UTC
Created redmine issue https://projects.theforeman.org/issues/27241 from this bug

Comment 4 Ian Ballou 2019-07-05 17:59:33 UTC
The expected result here is that the resulting composite content view will have the 60 packages.  This is because a composite content view is a merger of two content view versions; there is no concept of filters there.  The composite content view will have universal set of whatever is in the two merging content view versions.

With that said, the fix here will be to update the information message and remove the "regardless of the filters that were applied" part.

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

Comment 7 Lai 2019-08-16 17:36:35 UTC
Steps to Reproduce:
1. sync a repo (e.g. sat6tool7)
2. create a CV, attach the repo and apply a filter (e.g. exclude tracer-common)
3. create another CV with same filter.
4. publish the two CVs
5. create CCV containing those 2 CVs, and publish it

Expected results:
Duplicate repositories between the selected Content View Versions will merge, resulting in a Composite Content View with all packages that exist among the duplicates.

Actual Results:
Duplicate repositories between the selected Content View Versions will merge, resulting in a Composite Content View with all packages that exist among the duplicates.

Please note that there's still 60 packages shown.  The behavior is expected and the only thing changed is the message when publishing the CVV.

Marking issue as verified.

Tested on 6.6.0 snap 16.

Comment 8 Lai 2019-08-16 17:37:22 UTC
Created attachment 1604703 [details]
Publish Message

Screenshot of UI result.

Comment 9 Bryan Kearney 2019-10-22 19:49:45 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:3172