Package-based content-view filters do not work for Source RPMs in Red Hat Satellite 6
Environment
- Red Hat Satellite 6
Issue
-
If any Package/RPM based filters have been applied on a content-view, the Source RPMs (if any) part of the same content-view remains unaffected.
-
Those Source RPMs would then also be listed by yum on the client system, giving a wrong impression about available packages from the filtered content-view content.:
# yum repolist -v ... ... Repo-pkgs : 153 Repo-available-pkgs: 153 << Package count does not match with the filter configuration ...
Resolution
To remediate this issue, the repositories having Source RPMs can be configured to exclude such contents in the Red Hat Satellite.
-
Follow the below steps on the Red Hat Satellite server and change Ignore SRPMs to True and update the repository to exclude Source RPMs:
-
Execute the below command and note down the ID of the repository:
# hammer repository list -
Replace
xxwith therepository IDnoted above in the below command:# hammer repository update --ignorable-content 'srpm' --id xx
-
-
To make this change effective,
- Resynchronize the concerned repository.
- Publish a new version of the Content Views that have the repository included.
Reach out to the Red Hat Technical Support should any further assistance be required.
Root Cause
- Source RPMs are not affected by Package-based content-view filters and will continue to be available in the Content View.
Diagnostic Steps
-
Below command can be used to check the
Package/Source RPMscount for a repository on the Red Hat Satellite server:# hammer repository info --id 16 | grep -A5 'Content Counts' Content Counts: Packages: 335 Source RPMS: 152 Package Groups: 0 Errata: 165 Module Streams: 0 -
To check filter configuration and rule on Red Hat Satellite with
hammeruse the below command:# hammer content-view filter list --content-view-id 3 ----------|-------------------------|-------------|----------|---------- FILTER ID | NAME | DESCRIPTION | TYPE | INCLUSION ----------|-------------------------|-------------|----------|---------- 19 | Filter_Name | | rpm | true ----------|-------------------------|-------------|----------|---------- # hammer content-view filter info --id 19 Filter ID: 19 ... Inclusion: true << Include filter is configured ... Rules: 1) Id: 9 Name: Rule Name Created: 2023/02/14 10:41:51 Updated: 2023/02/14 10:41:51 -
Newly published version of
Content viewafter filter configuration will show the package count on Red Hat Satellite as below:1 RPM packages 17 Errata 152 Source RPMs -
On the Client system the
Package/Source RPMscount will include 1 RPM package and 152 Source RPMs:# yum repolist -v ... ... Repo-pkgs : 153 Repo-available-pkgs: 153 ...
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments