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.

Bug 2059726

Summary: 'os_title=' doesn't work
Product: Red Hat Satellite Reporter: Donald Berry <dberry>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.6CC: apatel, aruzicka, inecas, wpinheir
Target Milestone: UnspecifiedKeywords: Triaged, WorkAround
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-10-04 21:29:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Donald Berry 2022-03-01 20:28:30 UTC
Description of problem:
searching via API with 'os_title=' doesn't work

The docs say it should:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html/api_guide/index
5.5. Using Extended Searches
$ curl --insecure --user sat_username:sat_password https://satellite.example.com/api/v2/hosts?search=os_title=\"RedHat+7.7\",model=\"PowerEdge+R330\"

Version-Release number of selected component (if applicable):
[root@sat6 ~]# rpm -q satellite
satellite-6.9.6.1-1.el7sat.noarch

How reproducible:
fails on some, works on others

Steps to Reproduce:
$ curl -k -u admin:xxx https://sat6.example.com/api/hosts?search=os_title=\"RedHat+6.10\"
$ 

Actual results:
No output

Additional info:

- This works with hammer:
# hammer host list --search 'os_title = "RedHat 6.10"'
---|------|------------------|------------|--------------|-------------------|---------------|--------------|----------------------
ID | NAME | OPERATING SYSTEM | HOST GROUP | IP           | MAC               | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|------|------------------|------------|--------------|-------------------|---------------|--------------|----------------------
20 | db6a | RedHat 6.10      |            | 10.8.109.168 | 56:6f:9e:11:00:33 | Error         | 6Server      | Dev                  
---|------|------------------|------------|--------------|-------------------|---------------|--------------|----------------------

- It also works if you use match (~) instead of '='
This workaround is in https://access.redhat.com/solutions/2775671

- It also fails with 'v2' in the URL:
$ curl -k -u admin:xxx https://sat6.example.com/api/v2/hosts?search=os_title=\"RedHat+6.10\"
$ 

- It works if you use ASCII codes (note that the trailing double-quote (%22) is not required):
$ curl -k -u admin:xxx https://sat6.example.com/api/hosts?search=os_title=%22RedHat+6.10
{
  "total": 33,
  "subtotal": 1,
...

Comment 5 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 6 Brad Buckingham 2023-10-04 21:29:50 UTC
Thank you for your interest in Red Hat Satellite. 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 feel free to contact your Red Hat Account Team. Thank you.

Comment 7 Red Hat Bugzilla 2024-02-02 04:25:03 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days