Bug 1662381 - Content view filter is not working as expected
Summary: Content view filter is not working as expected
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-28 04:35 UTC by Anand Agrawal
Modified: 2023-03-24 14:27 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-30 19:51:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Anand Agrawal 2018-12-28 04:35:39 UTC
Description of problem:
We have repositories 'rhel-7-server-extras-rpms' enabled in the content view.

When adding a below filter, it skips the package `python-werkzeug`
~~~
Filter-> Content-Type(Errata -Date and Type) -> 
Inclusion Type(Exclude)
Errata Type: Security, Enhancement and Bugfix
Date Type: Updated on
Start Date: 10/29/2018
End Date: mm/dd/yyy
~~~

I have confirmed, `python-werkzeug` package is available from below errata's
~~~
RHEA-2014:0698 Released on 2014-06-10 00:00:00
RHEA-2017:2955 Released on 2017-10-19 14:30:38 UTC
RHEA-2018:3365 Released on 2018-10-30
~~~

Now customer does not want to include any errata after 2018-10-29. which means the errata RHEA-2018:3365 should not be included. But since the package `python-werkzeug` is available from other two Errata's, I expect this to be available.

Version-Release number of selected component (if applicable):
6.4

How reproducible:
Always

Steps to Reproduce:
1. Create a content view with repositories `rhel-7-server-extras-rpms` and `rhel-7-server-rpms`
2.Create a filter as below:
~~~
Filter-> Content-Type(Errata -Date and Type) -> 
Inclusion Type(Exclude)
Errata Type: Security, Enhancement and Bugfix
Date Type: Updated on
Start Date: 10/29/2018
End Date: mm/dd/yyy
~~~
3.Publish the content view

4. check for package `python-werkzeug`

Actual results:
Package is missing.

Expected results:
Package should be present

Additional info:

When the filter is modified to Start date as 10/31/2018 both errata and package is available, but it has other *not required* packages available as well.

Comment 10 Partha Aji 2019-11-06 19:21:27 UTC
IMO this is not a bug and working as designed. The way filters are designed the "excludes" always win. For example if you said "include package foo" and then "exclude package foo" no rpms are going to get copied over. 
The workaround for what the customer wants should be instead an includes filter
i.e. change
~~~
Filter-> Content-Type(Errata -Date and Type) -> 
Inclusion Type(Exclude)
Errata Type: Security, Enhancement and Bugfix
Date Type: Updated on
Start Date: 10/29/2018
End Date: mm/dd/yyy
~~~

to 

~~~
Filter-> Content-Type(Errata -Date and Type) -> 
Inclusion Type(Include)
Errata Type: Security, Enhancement and Bugfix
Date Type: Updated on
Start Date: mm/dd/yyyy
End Date: 10/29/2018
~~~

That should get the desired output.

Comment 11 Brad Buckingham 2019-11-06 19:29:09 UTC
Hello Anand,

Can you work with the customer to confirm that the scenario provided by Partha in comment 10 addresses their needs?

thanks,
Brad

Comment 12 Partha Aji 2019-11-06 19:47:45 UTC
Slight update to my previous comment. An additional step -> Add an includes filter  for packages without errtata

i.e. change
~~~
Filter-> Content-Type(Errata -Date and Type) -> 
Inclusion Type(Exclude)
Errata Type: Security, Enhancement and Bugfix
Date Type: Updated on
Start Date: 10/29/2018
End Date: mm/dd/yyy
~~~

to 

~~~
Filter-> Content-Type(Errata -Date and Type) -> 
Inclusion Type(Include)
Errata Type: Security, Enhancement and Bugfix
Date Type: Updated on
Start Date: mm/dd/yyyy
End Date: 10/29/2018
~~~
+
~~~
Filter-> Content-Type(Package) -> 
Inclusion Type(Include)
Check Include all RPMs with no errata.
~~~


That should get the desired output.

Comment 13 Anand Agrawal 2019-11-13 11:52:25 UTC
Hello Brad & Partha,

Thank you for sharing the scenario. I have shared the same with the customer and awaiting the reply from them.

I will update you with the customer's response in the Bugzilla as soon as I hear from them.

Regards,
Anand


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