Bug 2255546
| Summary: | Module stream filter adds all modules to all repositories | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Taft Sanders <tasander> | ||||
| Component: | Content Views | Assignee: | Ian Ballou <iballou> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Sam Bible <sbible> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.15.0 | CC: | ahumbe, iballou, jpasqual, rlavi, sbible, zhunting | ||||
| Target Milestone: | 6.15.0 | Keywords: | Triaged, WorkAround | ||||
| Target Release: | Unused | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | rubygem-katello-4.11.0.5-1 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 2255548 2255549 (view as bug list) | Environment: | |||||
| Last Closed: | 2024-04-23 17:16:36 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 2255548, 2255549 | ||||||
| Attachments: |
|
||||||
|
Description
Taft Sanders
2023-12-21 18:49:11 UTC
A workaround to this issue is to update the CV filter for the module stream to refine the scope of the affected repositories to only the repository that contains module data. The below hammer command will change the affected repository for the rules in the CV filter:
# '7' is the Appstream root repository ID for this test satellite
[root@bombsat615 ~]# hammer content-view filter update --content-view '03676447-dup-test' --name 'module stream lockdown' --repository-ids 7 --organization-id 1
Filter updated.
//Steps to verify the new package count for version 2 of the CV:
[root@bombsat615 ~]# hammer content-view publish --name '03676447-dup-test' --organization-id 1
[..................................................................................................................................................................] [100%]
[root@bombsat615 ~]# hammer content-view version list --content-view '03676447-dup-test' --organization-id 1
---|-----------------------|---------|-------------|-----------------------
ID | NAME | VERSION | DESCRIPTION | LIFECYCLE ENVIRONMENTS
---|-----------------------|---------|-------------|-----------------------
3 | 03676447-dup-test 2.0 | 2.0 | | Library
2 | 03676447-dup-test 1.0 | 1.0 | |
---|-----------------------|---------|-------------|-----------------------
[root@bombsat615 ~]# hammer content-view version info --id 3 --fields Repositories
Repositories:
1) Id: 33
Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8
Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_AppStream_RPMs_8
2) Id: 34
Name: Red Hat Ansible Engine 2 for RHEL 8 x86_64 RPMs
Label: Red_Hat_Ansible_Engine_2_for_RHEL_8_x86_64_RPMs
[root@bombsat615 ~]# for i in {33,34}; do hammer repository info --id $i --fields "Content counts","Name"; done
Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8
Content Counts:
Packages: 35090
Source RPMS: 0
Package Groups: 58
Errata: 3424
Module Streams: 749
Name: Red Hat Ansible Engine 2 for RHEL 8 x86_64 RPMs
Content Counts:
Packages: 58
Source RPMS: 0
Package Groups: 0
Errata: 32
Module Streams: 0
*** Bug 2255548 has been marked as a duplicate of this bug. *** *** Bug 2255549 has been marked as a duplicate of this bug. *** This is only reproducible with dependency solving off -- with dependency solving on, the module streams don't get copied erroneously. Pulp-rpm has two different copy APIs, one that is more complicated for dependency solving, and one that is quicker for non-dependency solving. The dependency-solving copy API accepts a source repository as input. However, the generic copy api does not take a source repository version as input. I think this bug is probably fallout from us starting to use the generic copy api. The fix will involve us filtering out Pulp hrefs to copy that don't already exist in the source repository. Note: this is not an issue for container content because we use a container-specific copy api for container image filters. The container copy api does accept a source repository. Created redmine issue https://projects.theforeman.org/issues/37050 from this bug Our code for determining what packages to add from filters does take into account the source repository for all types accept module streams, so the issue isn't as wide-spread as I thought when writing Comment 5. `content_unit_pulp_ids` in app/models/katello/content_view_module_stream_filter.rb just needs to begin filtering module streams by the source repository. Moving to POST since the upstream PR is merged. Verified on 6.15 - Snap 8 Steps to Verify: 1. Create a content view containing 1 module and 1 non-module repository (IE: 'Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8' & 'Red Hat Ansible Engine 2 for RHEL 8 x86_64 RPMs' 2. Create a content-view filter for module streams with the following settings: - Include: true 3. Add a rule to this CV filter to: - include all module streams - original-module-streams: false - Apply to all repositories in the CV: true 4. Publish a new version 5. Observe the package count for the non-module containing repository (IE: 'Red Hat Ansible Engine 2 for RHEL 8 x86_64 RPMs') Expected Results: The non-module repository should contain no module streams, and match the package count it has outside of the CV Expected Results: The non-module repository contains no module streams, and matches the package count it has outside of the CV. 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.15.0 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-2024:2010 |