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.
DescriptionManikandan Somasundaram
2017-11-09 00:33:21 UTC
Description of problem:
AND and OR operation is not working on satellite as expected, when trying to filtering host with single filter like “facts.bios_vendor = SeaBIOS” it works fine, but when your try to filter using AND and OR operator its not working as expected, when filtering using AND it gives zero result “facts.bios_vendor = SeaBIOS and facts.architecture = x86_64”, when trying to filter using OR result is unstable as it gives around 1700 number of results even through there is only 10 machines registered with satellite.
How reproducible:
- Under Satellite UI - > Hosts → All Hosts → in search tab
- Try to filter host using any fact ex. “facts.bios_vendor = SeaBIOS”
- Also try to filter using any other fact ex. “facts.architecture = x86_64”
- Now combine search filter using AND and OR operator like below and check the result.
Ex. “facts.bios_vendor = SeaBIOS and facts.architecture = x86_64”
Ex. “facts.bios_vendor = SeaBIOS or facts.architecture = x86_64”
Actual results:
- Observe there is no result when using AND operator
- Observe there is N number of results when using OR operator which is regardless of number of registered clients.
Expected results:
- Should be able to search hosts using AND and OR
Additional info:
Also tried to search using the query structure given on the link “https://github.com/wvanbergen/scoped_search/wiki/Query-language” but still result is not as expected.
This works fine with 6.3, moving to ON_QA. Note that the variant with or does not make sense. That would find also hosts that have only bios vendor SeaBIOS and also different hosts which has architecture x86_64. So you could end up with SeaBIOS hosts with i386 arch.
The correct syntax is
> “facts.bios_vendor = SeaBIOS and facts.architecture = x86_64”
I could not find exact upstream fix but it might have changed by the scoped_search update.
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.
*** Satellite 6.5.3 Patch ***
This bug will be resolved in 6.6 but if users wish to patch their 6.5 Satellite feel free to apply the attached patch.
1) Download BZ1511254.patch to your Satellite 6.5 Satellite
2) Copy to /usr/share/foreman/BZ1511254.patch
3) cd /usr/share/foreman
4) Patch:
# patch -p1 < BZ1511254.patch
patching file app/models/concerns/hostext/search.rb
5) restart
satellite-maintain service restart
Created attachment 1640632[details]
Both 'OR' and 'AND' operators are working
Verified this on Satellite 6.7 with Snap 3. Both logical operators are working as expected
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.
https://access.redhat.com/errata/RHSA-2020:1454