Bug #37050
closedModule stream filter adds all modules to all repositories
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2255546
Description of problem:
When publishing a content view containing 1 module containing repository and 1 non-module containing repository, the non-module containing repository is created with all modules from the module containing repository.
Version-Release number of selected component (if applicable):
Likely Katello 4.3+
How reproducible:
Every time
Steps to Reproduce:
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')
- hammer content-view version info --content-view '03676447-dup-test' --id 2 --include-applied-filters true
Id: 2
Name: 03676447-dup-test 1.0
Version: 1.0
Description:
Content View ID: 2
Content View Name: 03676447-dup-test
Content View Label: 03676447-dup-test
Lifecycle Environments:
1) Id: 1
Name: Library
Label: Library
Repositories:
1) Id: 29
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: 30
Name: Red Hat Ansible Engine 2 for RHEL 8 x86_64 RPMs
Label: Red_Hat_Ansible_Engine_2_for_RHEL_8_x86_64_RPMs
Has Applied Filters: yes
Applied Filters:
1) Id: 1
Name: module stream lockdown
Type: modulemd
Inclusion: yes
Original packages: no
Original module streams: no
Rules:
1) Id: 1
Module stream Id: 2154
Content view filter Id: 1
2) Id: 2
Module stream Id: 771
Content view filter Id: 1
--snip--
749)Id: 749
Module stream Id: 23
Content view filter Id: 1
Dependency Solving: false ===========================================
[root@potato ~]# hammer repository info --id 30
Id: 30
Name: Red Hat Ansible Engine 2 for RHEL 8 x86_64 RPMs
Label: Red_Hat_Ansible_Engine_2_for_RHEL_8_x86_64_RPMs
Description:
Organization: Default Organization
Red Hat Repository: yes
Content Type: yum
Content Label: ansible-2-for-rhel-8-x86_64-rpms
Mirroring Policy: Complete Mirroring
Url: https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/ansible/2/os
Publish Via HTTP: no
Published At: https://katello.example.com/pulp/content/Default_Organization/content_views/03676447-dup-test/1.0/content/dist/layered/rhel8/x86_64/ansible/2/os/
Relative Path: Default_Organization/content_views/03676447-dup-test/1.0/content/dist/layered/rhel8/x86_64/ansible/2/os
Download Policy: on_demand
HTTP Proxy:
HTTP Proxy Policy: global_default_http_proxy
Product:
Id: 213
Name: Red Hat Ansible Engine
GPG Key:
Sync:
Status: Not Synced
Created: 2023/12/21 17:20:43
Updated: 2023/12/21 17:20:43
Content Counts:
Packages: 11183
Source RPMS: 0
Package Groups: 0
Errata: 32
Module Streams: 749
[root@potato ~]# hammer repository info --id 28
Id: 28
Name: Red Hat Ansible Engine 2 for RHEL 8 x86_64 RPMs
Label: Red_Hat_Ansible_Engine_2_for_RHEL_8_x86_64_RPMs
Description:
Organization: Default Organization
Red Hat Repository: yes
Content Type: yum
Content Label: ansible-2-for-rhel-8-x86_64-rpms
Mirroring Policy: Complete Mirroring
Url: https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/ansible/2/os
Publish Via HTTP: no
Published At: https://katello.example.com/pulp/content/Default_Organization/Library/content/dist/layered/rhel8/x86_64/ansible/2/os/
Relative Path: Default_Organization/Library/content/dist/layered/rhel8/x86_64/ansible/2/os
Download Policy: on_demand
HTTP Proxy:
HTTP Proxy Policy: global_default_http_proxy
Product:
Id: 213
Name: Red Hat Ansible Engine
GPG Key:
Sync:
Status: Success
Last Sync Date: about 1 hour
Created: 2023/12/21 17:20:43
Updated: 2023/12/21 17:20:43
Content Counts:
Packages: 58
Source RPMS: 0
Package Groups: 0
Errata: 32
Module Streams: 0
Expected results:
Module content should only be in repositories that contain module content after the publish.
Additional info:
Updated by Ian Ballou 11 months ago
- Subject changed from Module stream filter adds all modules to all repositories to Module stream filter adds all modules to all repositories
- Target version set to Katello 4.10.1
Updated by The Foreman Bot 11 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/10848 added
Updated by Anonymous 11 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|edd534121b047e470bde4bcd250acbf478bbbe5d.
Updated by The Foreman Bot 10 months ago
- Pull request https://github.com/Katello/katello/pull/10920 added