Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionVedashree Deshpande
2021-11-15 11:32:10 UTC
Description of problem:
We try to search hosts not in specified host collection using !=, example:
host_collection != AnsibleTower-PR
this does not work.
Version-Release number of selected component (if applicable):
Satellite 6.x
Actual results:
When we search for any host which does not belong to any host_collection using the filter host_collection != it does not give any answer.
Expected results:
It should give the right answer.
Additional info / workaround:
"not host_collection = Test" instead of "host_collection != Test" to make it work
If you search with the != expression, every event that has a value in the field, where that value does not match the value you specify, is returned. Events that do not have a value in the field are not included in the results.
If you search with the NOT operator, every event is returned except the events that contain the value you specify. This includes events that do not have a value in the field.
For more information, please check: https://docs.splunk.com/Documentation/SplunkCloud/latest/Search/NOTexpressions.
So the search filter is working as designed.
Hi Lucy,
I previously opened bz 2158849 which was closed in favor of this one. In https://bugzilla.redhat.com/show_bug.cgi?id=2158849#c1 you can see that when using != in the search the query is built in such a way as to fail. To highlight the line;
~~~
WHERE "katello_host_collections"."name" <> 'test3' )))) ORDER BY "hosts".""name ASC LIMIT $2 OFFSET $3
~~~
You can see there Satellite builds the query with this "hosts".""name bit, where name is not closed by a ". These queries can be ambiguous in nature when trying to know what to expect for a return, but surely we should expect the query to be built correctly before trusting what was returned?