Bug 1395642 - Content view filter cannot distinguish between multiple packages with the same version but different release number
Summary: Content view filter cannot distinguish between multiple packages with the sam...
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Views
Version: 6.2.0
Hardware: x86_64
OS: Linux
medium vote
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: jcallaha
: 1465070 1491420 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2016-11-16 10:46 UTC by Marcel Gazdík
Modified: 2019-08-12 16:04 UTC (History)
13 users (show)

Fixed In Version: rubygem-katello-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1480360 (view as bug list)
Last Closed: 2017-09-25 18:59:44 UTC

Attachments (Terms of Use)
EL7 Hotfix packages (4.99 MB, application/x-tar)
2017-06-30 20:57 UTC, Mike McCune
no flags Details
EL6 Hotfix packages (5.59 MB, application/x-tar)
2017-06-30 20:57 UTC, Mike McCune
no flags Details
testing rpms (50.00 KB, application/x-tar)
2017-08-31 18:16 UTC, jcallaha
no flags Details
incorrectly filtered (84.06 KB, image/png)
2017-08-31 18:17 UTC, jcallaha
no flags Details
verification screenshot (67.74 KB, image/png)
2017-09-12 19:12 UTC, jcallaha
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2803 normal SHIPPED_LIVE Satellite 6.2.12 bug fix update 2017-10-12 19:22:49 UTC
Foreman Issue Tracker 11180 None None None 2017-09-08 14:18:05 UTC
Foreman Issue Tracker 17916 None None None 2017-01-03 23:54:27 UTC
Foreman Issue Tracker 20876 None None None 2017-09-07 18:24:43 UTC

Description Marcel Gazdík 2016-11-16 10:46:56 UTC
Description of problem:
  In case there are multiple packages of the same version but different package release version in a repository and if this repository is included in a content view with "rpm version filter" they are not being properly filtered and all the packages are being included in the cv regardless their release version.

List of packages in repo:

content-view filter list --organization-id 1 --content-view-id 4
1         | includepkg | rpm  | true     

content-view filter rule list --organization-id 1 --content-view-id 4 --content-view-filter-id 1
4       | 1         | test_rpm  | 0.0.1-4.el7* |                 |                 |           |            |         

With this setup, all the packages listed above will be included in the newly published CV

Version-Release number of selected component (if applicable):
6.2.x (6.1.x as well)

How reproducible:
  1) Create product, repository and some fake packages with same version but different release versions (see example above)
  2) Create content view, add the repo from step #1 into it and create filter based on the example above
  3) Publish the CV and check results

Actual results:
  All packages are being included

Expected results:
  Only specific version(s) should be included

Comment 3 Justin Sherrill 2017-01-03 22:02:02 UTC
Note that the version/release field does not support wildcards, only the name field.

there is a bug in the matching, and it is matching anything with the same version (ignoring the release).  Will fix this.

Comment 4 Justin Sherrill 2017-01-03 23:54:25 UTC
Created redmine issue http://projects.theforeman.org/issues/17916 from this bug

Comment 5 pm-sat@redhat.com 2017-01-10 21:09:00 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17916 has been resolved.

Comment 6 Mike McCune 2017-06-30 20:49:47 UTC
=== Satellite 6.2.10 Hotfix ===

To install this hotfix download the RPMs attached to this bug to your Satellite

1) rpm -Uvh tfm-rubygem-katello- fm-rubygem-katello_ostree-

2) katello-service restart

3) republish any Content Views that weren't properly filtering packages.

Comment 7 Mike McCune 2017-06-30 20:50:01 UTC
*** Bug 1465070 has been marked as a duplicate of this bug. ***

Comment 8 Mike McCune 2017-06-30 20:57:07 UTC
Created attachment 1293384 [details]
EL7 Hotfix packages

Comment 9 Mike McCune 2017-06-30 20:57:28 UTC
Created attachment 1293385 [details]
EL6 Hotfix packages

Comment 12 Edu Alcaniz 2017-07-04 06:53:54 UTC
Hotfix works perfectly. Thanks so much.

Comment 13 Brad Buckingham 2017-08-09 18:38:45 UTC
Verified with Satellite 6.3 SNAP 10 - satellite-6.3.0-16.0.beta.el7sat.noarch, tfm-rubygem-katello-3.4.4-1.el7sat.noarch

Tested a few variations with CV filters on 7Server RPMS and resultant CV version only included the rpms that matched.


name: 389-ds-base,*
name: 389-ds-base,*

Comment 18 jcallaha 2017-08-31 18:15:11 UTC
Failed QA in Satellite 6.2.12 Snap 1.

Most of the behavior is there, since it can now distinguish between release versions. However, the behavior is still bugged.

My first test partially passed, since my filter included all versions of the package greater than 1-3 and the packages published were 1-3, 1-4, 1-5, 1-6. The behavior here is actually 'greater than or equal to'. See attached screenshot.

However, two more content views with the 'less than' and 'greater than' filters worked as expected.

But the most troublesome issue is that an 'equal to' filter doesn't include any packages.

I will also attach the testing rpms for future testing.

Comment 19 jcallaha 2017-08-31 18:16:33 UTC
Created attachment 1320694 [details]
testing rpms

Comment 20 jcallaha 2017-08-31 18:17:35 UTC
Created attachment 1320695 [details]
incorrectly filtered

Comment 21 jcallaha 2017-09-12 19:12:11 UTC
Verified in Satellite 6.2.12 Snap 3.

Initial behavior was correct, since I was not including the ".fc26" in the filter. Taking that into account, all filters behaved correctly. See attached screenshot for a filter equal to only one package release version.

Comment 22 jcallaha 2017-09-12 19:12:51 UTC
Created attachment 1325000 [details]
verification screenshot

Comment 23 jcallaha 2017-09-15 14:41:13 UTC
*** Bug 1491420 has been marked as a duplicate of this bug. ***

Comment 25 errata-xmlrpc 2017-09-25 18:59:44 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.


Note You need to log in before you can comment on or make changes to this bug.