Project

General

Profile

Actions

Bug #25897

closed

Using search query for listing content hosts produces unexpected output

Added by Moti Asayag about 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

While trying to use the search query with 'or' option to list two content hosts with FQDN, the result is long duplicated list of host entries.

The search query is: facts.network::hostname = "host_1" or facts.network::hostname = "host_2"
The result of each part of the search is as follow:
facts.network::hostname = "host_1" - returns only one record
facts.network::hostname = "host_2" - returns no record (no matches)

The combined query produces a duplicated list of 20 records of host_1.

curl -k -u admin:123456 "https://katello.example.com/api/v2/hosts?search=facts.network::hostname=host_1.example.com%20or%20facts.network::hostname=host_2.example.com&format=json" {
"total": 3,
"subtotal": 20,
"page": 1,
"per_page": 20,
"search": "facts.network::hostname=host_1.example.com or facts.network::hostname=host_2.example.com",
"sort": {
"by": null,
"order": null
},
"results": [{...}]
}

Actions #1

Updated by John Mitsch about 5 years ago

  • Target version set to Katello Backlog
  • Triaged changed from No to Yes

we can look into this, it may be a issue in foreman rather than katello but we will double check before re-assigning

Actions #2

Updated by Partha Aji almost 5 years ago

  • Project changed from Katello to Foreman
  • Category changed from API to API
  • Assignee set to Partha Aji
  • Target version deleted (Katello Backlog)
Actions #3

Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6777 added
Actions #4

Updated by Timo Goebel over 4 years ago

  • Fixed in Releases 1.23.0 added
Actions #5

Updated by Partha Aji over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Bryan Kearney over 4 years ago

  • Bugzilla link set to 1511254
Actions

Also available in: Atom PDF