Bug 2232559 - {Sat6.11/RHCloud/Bug} foreman-rake command to clean insights status fails
Summary: {Sat6.11/RHCloud/Bug} foreman-rake command to clean insights status fails
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.11.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-17 11:24 UTC by achadha
Modified: 2023-08-18 00:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-19621 0 None None None 2023-08-17 11:57:21 UTC

Description achadha 2023-08-17 11:24:50 UTC
The below foreman-rake command to clean insights status

# foreman-rake rh_cloud_insights:clean_statuses SEARCH="params.host_registration_insights=f"
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
rake aborted!
ScopedSearch::QueryNotSupported: external method 'search_by_params' failed with error: undefined method `subtree_ids' for nil:NilClass
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:420:in `rescue in to_ext_method_sql'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:417:in `to_ext_method_sql'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:217:in `sql_test'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:562:in `sql_test'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:509:in `to_single_field_sql'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:521:in `to_sql'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:54:in `build_find_params'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/query_builder.rb:22:in `build_query'
/usr/share/gems/gems/scoped_search-4.1.9/lib/scoped_search/definition.rb:328:in `block in register_named_scope!'
/usr/share/foreman/app/models/host.rb:15:in `method_missing'
/usr/share/gems/gems/foreman_rh_cloud-5.0.46/app/services/foreman_rh_cloud/insights_status_cleaner.rb:4:in `clean'
/usr/share/gems/gems/foreman_rh_cloud-5.0.46/lib/tasks/insights.rake:18:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
~~~


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