Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1269021 - Searching an errata with "!" displays incorrect results
Summary: Searching an errata with "!" displays incorrect results
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Errata Management
Version: 6.1.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-06 03:36 UTC by tkubota
Modified: 2019-09-12 09:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-23 19:10:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 19356 0 High New Searching an errata with "!" displays incorrect results 2020-07-21 08:58:13 UTC

Description tkubota 2015-10-06 03:36:04 UTC
Description of problem:
-----------------------

I tried to exclude a or some package(s) by searching but got incorrect results.
There are 587 installable errata in my test Satellite client.
When I try to exclude kernel by searching with 'package_name != kernel',
kernel erratas are not excluded.

However, when I try to exclude bind by searching with 'package_name != bind',
bind erratas are excluded.  

I tried some of packages to exclude.
I tried these below and it looked they worked fine as I expected.

'package_name !~ bind'
'package_name !~ bind or ~ ypbind'
'package_name !~ pam'
'package_name !~ pam or ~ spamassassin or ~ pam_passwdqc'
'package_name !~ net-snmp'
'package_name !~ tzdata'
'package_name !~ sqlite'
'package_name !~ selinux-policy'
'package_name !~ python'
'package_name !~ sudo'
'package_name !~ dovecot'
'package_name !~ grep'
'package_name !~ openssl'
'package_name !~ cpuspeed'
   :
   :

I tired these below and it didn't look they worked.  I don't know
why those erratas are not excluded.

'package_name !~ lvm2'
'package_name !~ kernel'
'package_name !~ sssd'


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

Red Hat Satellite Version 6.1.2 


How reproducible:
-----------------
always


Steps to Reproduce:
-------------------
1.Navigate to Web UI -> Content -> Errata Tab (or)
  Navigate to Hosts -> Content Hosts -> Select a Content host -> Errata Tab
2.Search for package_name !~ kernel


Actual results:
---------------
kernel erratas are not excluded.


Expected results:
-----------------
kernel erratas are excluded.


Additional info:
----------------

Comment 4 Justin Sherrill 2016-02-26 22:04:11 UTC
The reason for this is the way that the search works via simple sql joins.  For example in this case a particular errata (RHSA-2016:0185) contains these packages:

kernel-3.10.0-327.10.1.el7.x86_64
kernel-abi-whitelists-3.10.0-327.10.1.el7.noarch
kernel-debug-3.10.0-327.10.1.el7.x86_64
kernel-debug-devel-3.10.0-327.10.1.el7.x86_64
kernel-devel-3.10.0-327.10.1.el7.x86_64
kernel-doc-3.10.0-327.10.1.el7.noarch
kernel-headers-3.10.0-327.10.1.el7.x86_64
kernel-tools-3.10.0-327.10.1.el7.x86_64
kernel-tools-libs-3.10.0-327.10.1.el7.x86_64
perf-3.10.0-327.10.1.el7.x86_64
python-perf-3.10.0-327.10.1.el7.x86_64 

What the query 'package_name !~ kernel' actually is saying is 'return me all errata where every package in the errata's package list does not contain the word 'kernel'.  

For the above errata the following query works:

package_name !~ kernel and package_name !~ perf


This is not ideal I agree and will have to think about a possible solution

Comment 8 Bryan Kearney 2017-03-23 19:10:26 UTC
There is a an upstream issue opened for this. We will no longer be tracking this downstream. If you believe this was closed in error please feel free to re-open with additional information.

Comment 12 Bryan Kearney 2017-04-03 16:47:50 UTC
Actually, I was incorrect in my previous comment. This is not fixed upstream, but given priorties I do not believe we will be addressing this in the near term.

Comment 19 Satellite Program 2017-04-23 21:41:17 UTC
Created redmine issue http://projects.theforeman.org/issues/19356 from this bug

Comment 22 Justin Sherrill 2017-05-16 13:27:55 UTC
While reviewing some scoped search documentation (the library we use for searching), I realized that this is possible to do in 6.2:

Simply search for: 

"not package_name = nss"

And this will return you all errata that do not have the package 'nss' in it.  I believe this resolves this request.  Apologies for not realizing this earlier.


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