Bug 1584785
Summary: | Filtering of some entities does not work | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Lukáš Hellebrandt <lhellebr> |
Component: | Hammer - Content | Assignee: | Christine Fouant <cfouant> |
Status: | CLOSED ERRATA | QA Contact: | Lukáš Hellebrandt <lhellebr> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.4 | CC: | akarsale, apatel, bbuckingham, cfouant, dhlavacd, egolov, inecas, kgaikwad, lhellebr, lpramuk, mhulan, pcreech, rabajaj, sjagtap, tstrachota, zhunting |
Target Milestone: | 6.4.0 | Keywords: | Regression, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | tfm-rubygem-hammer_cli_katello-0.13.4.3-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-16 18:54:12 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
Lukáš Hellebrandt
2018-05-31 16:22:42 UTC
Surprisingly, yes, this is a regression. On 6.3: # hammer -d host create --compute-resource-id 1 --architecture x86_64 --domain example.com --operatingsystem-id 1 --partition-table-id 1 --location-id 2 --organization-id 1 --name fish --root-password toortoor --image image1 Params: { "operatingsystem_id" => 1, :search => "name = \"image1\"" } [DEBUG 2018-06-14 09:37:14 API] Headers: { :params => { "operatingsystem_id" => 1, :search => "name = \"image1\"" } } Response: { "total" => 2, "subtotal" => 1, "page" => 1, "per_page" => 20, "search" => "name = \"image1\"", "sort" => { "by" => nil, "order" => nil }, "results" => [ [0] { "operatingsystem_id" => 1, "operatingsystem_name" => "RHEL Server 7.5", "compute_resource_id" => 1, "compute_resource_name" => "rhev3", "architecture_id" => 1, "architecture_name" => "x86_64", "uuid" => "7c5cc85e-a5be-4c7b-84a1-9dafbd556a14", "username" => "root", "created_at" => "2018-06-14 13:36:02 UTC", "updated_at" => "2018-06-14 13:36:02 UTC", "user_data" => false, "id" => 1, "name" => "image1" } ] } Created redmine issue http://projects.theforeman.org/issues/23993 from this bug Hi Lukas, it's not mentioned in the original bug description, but from your subsequent comment I guess it's the host create command that doesn't work. Have you observed the issue in some other commands too? If yes, could you name them please? It would be helpful if you could attach full -d log of the commands that are affected by this. I was too harsh with devel triage, I was able to reproduced with foreman+katello, when I disabled the katello hammer plugin, it started working again, so it seems something from hammer-cli-katello is causing the troubles: The corresponding debug output is this: ``` ESC[32m INFOESC[0m ESC[34m2018-06-25T12:42:14ESC[0m ESC[36mAPIESC[0m] GET /api/compute_resources [DEBUG ESC[34m2018-06-25T12:42:14ESC[0m ESC[36mAPIESC[0m] Params: { "name" => "blacr" } [DEBUG ESC[34m2018-06-25T12:42:14ESC[0m ESC[36mAPIESC[0m] Headers: { :params => { "name" => "blacr" } } [DEBUG ESC[34m2018-06-25T12:42:14ESC[0m ESC[36mAPIESC[0m] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [DEBUG ESC[34m2018-06-25T12:42:14ESC[0m ESC[36mAPIESC[0m] Response: { "total" => 2, "subtotal" => 2, "page" => 1, "per_page" => 20, "search" => nil, "sort" => { "by" => nil, "order" => nil }, ``` I've tracked the issue down to this file https://github.com/katello/hammer-cli-katello/blob/5d263458e426b20b671ed6475d7379dd6174b941/lib/hammer_cli_katello/foreman_search_options_creators.rb - it seems that every searchable not explicitly mentioned there, will not get properly resolved, at least in the host commands. Easy fix would probably be adding the additional searchables there, but better approach would be to make the Katello's searchables opt-in, not opt-out, as they are right now. *** Bug 1610695 has been marked as a duplicate of this bug. *** *** Bug 1614360 has been marked as a duplicate of this bug. *** In my duplicate there is some useful info: https://bugzilla.redhat.com/show_bug.cgi?id=1614360#c2 Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/23993 has been resolved. FailedQA with Sat 6.4 snap 21. Used reproducer from comment 2 on a Satellite with |images|>1, reproduced the bug. Associating an upstream redmine (25027) that contains a fix for the failure. The change has been merged upstream; therefore, moving bug to POST. This PR's unit tests failed. Brad, can someone take a look? satellite6/hammer_cli_katello/merge_requests/52 switching needinfo to Christine This ended up being an issue with our tests pulling in the wrong version of a dependency. Cherrypick successfull I tried the hammer host create command to create a host on RHEV and I specified every parameter by name rather than ID. I don't know of any other entity that can't be searched by name => verified with Sat 6.4 snap 24. 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-2018:2927 |