Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-19621

{Sat6.11/RHCloud/Bug} foreman-rake command to clean insights status fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.11.1
    • RH Cloud
    • Sprint 134, Sprint 135
    • Moderate

      The below foreman-rake command to clean insights status

      1. 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)>'
        ~~~

            rhn-engineering-sshtein Shimon Shtein
            rhn-support-achadha Arvinder Singh Chadha
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: