-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
False
-
sat-endeavour
-
None
-
None
-
None
-
None
Environment:
- Satellite 6.15 , 6.16, 6.17 and 6.18
Description of problem:
When using the parent_hostgroup parameter with the ^ operator, the request fails with a database syntax error.
--------------------------------------------------------
Error: external method 'search_by_hostgroup_and_descendants' failed with error: PG::SyntaxError: ERROR: syntax error at or near "'hostgroup_name1/abc'"
LINE 1: ...ostgroups.id IN (1,3,4)) AND (hostgroups.title IN 'test_rhel...
^
-------------------------------------------------------
How reproducible:
Satellite Web UI --> Hosts --> All Hosts --> search for the query " parent_hostgroup ^ name_of_any_hostgroup" or "parent_hostgroup ^ (hostgroup_name1,hostgroup_name2,...hostgroup_nameN)"
Actual behavior:
The search not return hosts or hostgroups matching the specified parent hostgroup and its descendants and gives error as below.
--------------------------------------------------------
Error: external method 'search_by_hostgroup_and_descendants' failed with error: PG::SyntaxError: ERROR: syntax error at or near "'hostgroup_name1/abc'"
LINE 1: ...ostgroups.id IN (1,3,4)) AND (hostgroups.title IN 'test_rhel...
^
-------------------------------------------------------
Expected behavior:
The search should correctly return hosts or hostgroups matching the specified parent hostgroup and its descendants.
Business Impact / Additional info:
This prevents users from querying hostgroups using the parent_hostgroup parameter with the ^ operator. Inconsistent search behavior complicates administrative tasks, leading to additional time spent verifying query results and manually identifying the correct hosts.