How do content filters work in Satellite 6?

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6

Issue

  • What does include and exclude mean when filtering Content Views in Red Hat Satellite?
  • In what order do the Content filters get processed, if adding multiple exclude rules?
  • How to view content view filters in hammer?

Resolution

Content View Filters

No filters
If you create a Content Views with no filters, then Red Hat Satellite 6 assumes Include Everything.
This means that if you publish a Content View with zero filters, then it gives all rpms and errata.

Exclude Filters
If you were to add an exclude filter, it will again start out with Include everything and then restrict the packages that you have.

For example: if you add one exclude filter saying Exclude all errata starting at April 29th,
Then errata having a release date after April 29th will not be included.

Include filters
When you add an Include filter, the content view no longer assumes you want to Include Everything and changes to only including exactly what you asked for.
If you only set an include filter to include the package bash then only the package bash would be included.
No other packages will be available.

Include vs Exclude Packages
If you were to have an exclude filter followed by an include filter, but even though you created the Exclude filter before the Include filter,
the code logic states that it will process all include rules first and then the exclude rules, example:

NOTE : Combination of include and exclude filters (in some use cases) is known to generate wrong repo content.

Filters: Packages Executed
No Filter All Packages 1
Exclude Filter by Date: Bash Package if date matches 3
Include Filter: Bash 2

NOTE : By Enabling the "Solve Dependencies" flag on a Content View:
If you want to solve dependencies automatically every time you publish this Content View, select the Solve dependencies check box. Dependency solving slows the publishing time and might ignore any Content View filters you use as Red Hat Satellite prioritizes resolving package dependencies over the rules in the filter. This can also cause errors when resolving dependencies for errata.

Filter single package using the solution [Satellite 6] How to use content view filters to restrict the kernel or any single package update being updated to the latest version?

Root Cause

  • For more information about content view filters, read through the documentation.

  • There is more information available on content views, filters, and its limitations on pages 109-115 from the pdf that is attached

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