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 2162736 - Can't search facts using CLI
Summary: Can't search facts using CLI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Fact
Version: 6.13.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.13.0
Assignee: nalfassi
QA Contact: visawant
URL:
Whiteboard:
: 2161294 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-20 17:10 UTC by Radek Mynar
Modified: 2023-05-03 13:24 UTC (History)
6 users (show)

Fixed In Version: foreman-3.5.1.10-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:24:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35990 0 Normal Closed Can't search facts using CLI 2023-02-27 11:11:32 UTC
Red Hat Issue Tracker SAT-16166 0 None None None 2023-02-27 16:57:08 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:24:42 UTC

Description Radek Mynar 2023-01-20 17:10:00 UTC
Description of problem:
Searching for facts using CLI ends with error 500.

Version-Release number of selected component (if applicable):
Satellite 6.13 SNAP 6.0

How reproducible:
always

Steps to Reproduce:
1. hammer fact list --search="ipaddress"

Actual results:
Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.

Expected results:
List of facts containing search phrase

Additional info:

production.log contains a note about missing attribute: fact_name_id

2023-01-20T11:58:45 [I|app|7c831d64] Started GET "/api/fact_values?search=ipaddress&page=1&per_page=1000" for 10.1.2.100 at 2023-01-20 11:58:45 -0500
2023-01-20T11:58:45 [I|app|7c831d64] Processing by Api::V2::FactValuesController#index as JSON
2023-01-20T11:58:45 [I|app|7c831d64]   Parameters: {"search"=>"ipaddress", "page"=>"1", "per_page"=>"1000", "apiv"=>"v2", "fact_value"=>{}}
2023-01-20T11:58:45 [I|app|7c831d64] Authorized user admin(Admin User)
2023-01-20T11:58:45 [W|app|7c831d64] Action failed
2023-01-20T11:58:45 [I|app|7c831d64] Backtrace for 'Action failed' error (ActiveModel::MissingAttributeError): missing attribute: fact_name_id
 7c831d64 | /usr/share/gems/gems/activemodel-6.1.7/lib/active_model/attribute.rb:222:in `value'
 7c831d64 | /usr/share/gems/gems/activemodel-6.1.7/lib/active_model/attribute_set/builder.rb:55:in `block in fetch_value'
 --- shrinked ---
 7c831d64 | /usr/share/gems/gems/puma-5.6.5/lib/puma/server.rb:443:in `process_client'
 7c831d64 | /usr/share/gems/gems/puma-5.6.5/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
 7c831d64 | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-01-20T11:58:45 [I|app|7c831d64]   Rendered api/v2/errors/custom_error.json.rabl within api/v2/layouts/error_layout (Duration: 1.2ms | Allocations: 318)
2023-01-20T11:58:45 [I|app|7c831d64]   Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 1.9ms | Allocations: 534)
2023-01-20T11:58:45 [I|app|7c831d64] Completed 500 Internal Server Error in 192ms (Views: 3.6ms | ActiveRecord: 16.8ms | Allocations: 12880)

Searching facts using WebUI works correctly.
Same command worked correctly in Satellite 6.12.

Comment 2 Ron Lavi 2023-01-22 14:22:00 UTC
*** Bug 2161294 has been marked as a duplicate of this bug. ***

Comment 3 nalfassi 2023-01-24 15:59:17 UTC
Created redmine issue https://projects.theforeman.org/issues/35990 from this bug

Comment 5 Bryan Kearney 2023-02-21 12:03:19 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35990 has been resolved.

Comment 10 errata-xmlrpc 2023-05-03 13:24:34 UTC
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 (Important: Satellite 6.13 Release), 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-2023:2097


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