This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2058660 - The search functionality and logics for the "Administer --> Settings" page are completely broken in Satellite 6.11
Summary: The search functionality and logics for the "Administer --> Settings" page ar...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Settings
Version: 6.11.0
Hardware: All
OS: All
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
: 2090799 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-25 14:41 UTC by Sayan Das
Modified: 2024-06-06 11:33 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 11:33:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34864 0 Normal New Settings - Operators ":and" and ":or" doesn't work 2022-07-22 05:07:05 UTC
Red Hat Issue Tracker   SAT-20576 0 None Migrated None 2024-06-06 11:33:31 UTC

Internal Links: 2082076

Description Sayan Das 2022-02-25 14:41:16 UTC
Description of problem:

The search logic in the "Administer --> Settings" page is completely broken in the UI of Satellite 7.0. Even the conditional searches are giving unexpected and incorrect outputs. 



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

satellite-7.0.0-0.5.beta.el8sat.noarch
foreman-3.1.1.6-1.el8sat.noarch


How reproducible:

Always


Steps to Reproduce:

1. Install Satellite 7.0 on RHEL 8, with first organization name set as RedHat and location name set as GSS

2. Run following commands in Satellite CLI or else make use of the same search queries in Satellite UI --> Administer --> Settings page. 

# hammer settings list --search "remote_execution"
# hammer settings list --search "remote_execution_by_default or remote_execution_ssh_user"
# hammer settings list --search "name ~ remote_execution"
# hammer settings list --search "name = remote_execution_by_default or name = remote_execution_ssh_user"
# hammer settings list --search "name ~ remote_execution_by_default or name ~ remote_execution_ssh_user"
# hammer settings list --search "name = remote_execution_by_default and name = remote_execution_ssh_user"
# hammer settings list --search "name = remote_execution_by_default or name ~ remote_execution_ssh_user"
# hammer settings list --search "name ~ remote_execution_by_default or name = remote_execution_ssh_user"



Actual results:

** Right output
# hammer settings list --search "remote_execution"
-------------------------------------------------|------------------------------------------------------|-----------------------------------|---------------------------------------------------------------------------------
NAME                                             | FULL NAME                                            | VALUE                             | DESCRIPTION                                                                     
-------------------------------------------------|------------------------------------------------------|-----------------------------------|---------------------------------------------------------------------------------
remote_execution_by_default                      | Use remote execution by default                      | false                             | If this is enabled, remote execution is used instead of katello-agent for rem...
remote_execution_prefer_registered_through_proxy | Prefer registered through proxy for remote execution | false                             | Prefer using a proxy to which a host is registered when using remote execution  
remote_execution_fallback_proxy                  | Fallback to Any Proxy                                | false                             | Search the host for any proxy with Remote Execution, useful when the host has...
remote_execution_global_proxy                    | Enable Global Proxy                                  | true                              | Search for remote execution proxy outside of the proxies assigned to the host...
remote_execution_ssh_user                        | SSH User                                             | root                              | Default user to use for SSH.  You may override per host by setting a paramete...
..
..
..


** Free form search broken
# hammer settings list --search "remote_execution_by_default or remote_execution_ssh_user"
-----|-----------|-------|------------
NAME | FULL NAME | VALUE | DESCRIPTION
-----|-----------|-------|------------

** The 'LIKE' conditional is not working 

# hammer settings list --search "name ~ remote_execution"
-----|-----------|-------|------------
NAME | FULL NAME | VALUE | DESCRIPTION
-----|-----------|-------|------------


# hammer settings list --search "name = remote_execution_by_default or name = remote_execution_ssh_user"
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
NAME                        | FULL NAME                       | VALUE | DESCRIPTION                                                                     
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
remote_execution_by_default | Use remote execution by default | false | If this is enabled, remote execution is used instead of katello-agent for rem...
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------


** Or logic broken or I should say, Only the first declaration is always honored

# hammer settings list --search "name ~ remote_execution_by_default or name ~ remote_execution_ssh_user"
-----|-----------|-------|------------
NAME | FULL NAME | VALUE | DESCRIPTION
-----|-----------|-------|------------


# hammer settings list --search "name = remote_execution_by_default or name ~ remote_execution_ssh_user"
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
NAME                        | FULL NAME                       | VALUE | DESCRIPTION                                                                     
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
remote_execution_by_default | Use remote execution by default | false | If this is enabled, remote execution is used instead of katello-agent for rem...
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------


# hammer settings list --search "name ~ remote_execution_by_default or name = remote_execution_ssh_user"
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
NAME                        | FULL NAME                       | VALUE | DESCRIPTION                                                                     
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
remote_execution_by_default | Use remote execution by default | false | If this is enabled, remote execution is used instead of katello-agent for rem...
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------

** And logic should have given blank output but again it seems, anything from\after "and" is being ignored

# hammer settings list --search "name = remote_execution_by_default and name = remote_execution_ssh_user"
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
NAME                        | FULL NAME                       | VALUE | DESCRIPTION                                                                     
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------
remote_execution_by_default | Use remote execution by default | false | If this is enabled, remote execution is used instead of katello-agent for rem...
----------------------------|---------------------------------|-------|---------------------------------------------------------------------------------


The exact same results will be observed from Satellite UI as well.


Expected results:

They should give expected outputs and honor the logical operators as well. 



Additional info:

This works fine on Satellite 6.10.

Comment 2 Leos Stejskal 2022-05-05 07:17:54 UTC
Hi,
This issue is coming from the refactoring of the code responsible for handling settings, there were some major changes in how we store and access settings data.

Due to these changes we implement a scope search method by our own [0] and right now this implementation doesn't support  ":or" and ":and" operators.

The problem is that with current implementation it would be really difficult to implement ":and" and ":or" operators, and I'm quite sure it is impossible to make it in the 6.11 release.

But that doesn't mean we can't do anything, I’ve been thinking about possible solution how to make it more user-friendly, here is my proposal what we can do:

1) Implement "name ~ value" for :name (and :full_name)
2) Ban “:and” and ":or" operators - If users try to search with these operators, Satellite will raise exception with forbidden search query.
3) Update API documentation and describe allowed search method
4) Create BZ for the issue with ":and" ":or" operators

I know that in optimal case we should allow user to scope multiple queries,
but sadly that  would require a lot of refactoring in our code base for which we don’t have time now.

Please let me know what you think, feel free to ping me on the google chat, we can meet and discuss the possible solutions that would fit best for customers.

Comment 3 Leos Stejskal 2022-05-05 07:21:06 UTC
Created redmine issue https://projects.theforeman.org/issues/34864 from this bug

Comment 4 Sayan Das 2022-05-05 07:38:44 UTC
Hello Leos,

Thanks for reaching out and also sharing your opinion about the concern reported.

I have no issues even if this does not gets into 6.11 GA. It's not something major that will break any Administrative functionalities in Satellite but the glitch is there and it is a regression.

It's unrelated to this BZ but if you see https://bugzilla.redhat.com/show_bug.cgi?id=1872041#c3 , you can come to know how some users will report this kind of glitches even if they have a work around with them.
 

My point of view:

1. I would expect the search functionality in all pages of satellite should remain the same i.e. from the perspective of the way we search things and the operators we use.

2. Or / Like (~) / Equals (=) are three very important operators\search factors and should be present as well as working on this Settings page along with the free form search(which already works). 

   We don't know how customers are used to searching and hence we cannot neglect the possibility of someone will definitely use one or more of the methods mentioned above. 


Keeping these two points under consideration, please see what can be done to fix this glitch. 


And as I had mentioned before, It need not explicitly land on 6.11.0 but it can go in 6.11.z If that helps anyway.

Comment 5 Leos Stejskal 2022-05-05 11:19:37 UTC
I created new BZ (https://bugzilla.redhat.com/show_bug.cgi?id=2082076) for 6.11, where I fix following cases:

* Allow '~' operator for name
* Fix issue with double quote in search
* Raise exception for unsupported operators :and / :or

Issue with ":and" / ":or" operators will be fixed later in this BZ.

I propose then to remove this BZ from 6.11 scope, the code change required for fix of ":and/:or" is not doable in 6.11 deadline.

Comment 7 Adam Ruzicka 2022-05-31 11:48:46 UTC
*** Bug 2090799 has been marked as a duplicate of this bug. ***

Comment 9 Brad Buckingham 2023-09-01 21:10:52 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 11 Brad Buckingham 2023-10-04 20:56:12 UTC
Based upon feedback during auto-closure, leaving this bugzilla open a while longer for additional investigation; however, it may be closed in a future iteration.

Comment 12 Eric Helms 2024-06-06 11:33:33 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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