Project

General

Profile

Bug #29563

Content Host Applicable Packages page error: NoMethodError: undefined method `where' for #<Array:0x00007f69a5ea4820>

Added by Ian Ballou 7 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:

1) Register a content host
2) Sync a repo that can produce applicable packages (like RHEL 7.7 extras)
3) Install an old package on the content host (like ansible-2.3.1.0-3.el7.noarch)
4) Navigate to the content host's applicable packages page
5) See the following error and traceback:

19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|1887a9bf] Started GET "/layouts/partials/page-loading-indicator.html" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|51470d4a] Started GET "/katello/api/v2/packages?host_id=1&organization_id=1&packages_restrict_upgradable=true&page=1&paged=true&per_page=20&search=" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|83aa7da5] Started GET "/subscriptions/views/content-access-mode-banner.html" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|14090acb] Started GET "/layouts/partials/page-header-with-actions.html" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|6b48a339] Started GET "/layouts/partials/full-row-breadcrumbs.html" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|13a173c6] Started GET "/layouts/partials/messages-container.html" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|da855a30] Started GET "/common/views/katello-agent-notice.html" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|51470d4a] Processing by Katello::Api::V2::PackagesController#index as JSON
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|51470d4a]   Parameters: {"host_id"=>"1", "organization_id"=>"1", "packages_restrict_upgradable"=>"true", "page"=>"1", "paged"=>"true", "per_page"=>"20", "search"=>"", "api_version"=>"v2"}
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|73fee7c1] Started GET "/layouts/partials/table.html" for 192.168.122.1 at 2020-04-17 19:00:55 +0000
19:00:55 rails.1   | 2020-04-17T19:00:55 [E|app|51470d4a] NoMethodError: undefined method `where' for #<Array:0x00007f69afd7e5e0>
19:00:55 rails.1   |  | /home/vagrant/katello/app/controllers/katello/api/v2/packages_controller.rb:58:in `custom_index_relation'
19:00:55 rails.1   |  | /home/vagrant/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:98:in `index_relation'
19:00:55 rails.1   |  | /home/vagrant/katello/app/controllers/katello/concerns/api/v2/repository_content_controller.rb:33:in `index'
19:00:55 rails.1   |  | /home/vagrant/katello/app/controllers/katello/api/v2/packages_controller.rb:46:in `index'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:194:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/app/controllers/api/v2/base_controller.rb:163:in `disable_json_root'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:136:in `run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `block in instrument'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `instrument'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/katello/app/controllers/katello/concerns/api/api_controller.rb:39:in `process_action'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:134:in `process'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionview-5.2.1/lib/action_view/rendering.rb:32:in `process'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal.rb:191:in `dispatch'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_controller/metal.rb:252:in `dispatch'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:48:in `serve'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/mapper.rb:48:in `serve'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
19:00:55 rails.1   |  | /home/vagrant/katello/lib/katello/middleware/event_daemon.rb:10:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/apipie-rails-0.5.17/lib/apipie/static_dispatcher.rb:66:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/bullet-6.1.0/lib/bullet/rack.rb:15:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/apipie-rails-0.5.17/lib/apipie/extractor/recorder.rb:137:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/apipie-rails-0.5.17/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-openid-1.4.2/lib/rack/openid.rb:98:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/tempfile_reaper.rb:15:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/etag.rb:25:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/conditional_get.rb:25:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/head.rb:12:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/session/abstract/id.rb:259:in `context'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/session/abstract/id.rb:253:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:559:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/rack/logger.rb:38:in `call_app'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/rack/logger.rb:28:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
19:00:55 rails.1   |  | /home/vagrant/katello/lib/katello/prevent_json_parsing.rb:12:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/method_override.rb:22:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/runtime.rb:22:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/sendfile.rb:111:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/secure_headers-6.3.0/lib/secure_headers/middleware.rb:11:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/urlmap.rb:68:in `block in call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/urlmap.rb:53:in `each'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/rack-2.0.9/lib/rack/urlmap.rb:53:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.3/lib/puma/configuration.rb:228:in `call'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.3/lib/puma/server.rb:682:in `handle_request'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.3/lib/puma/server.rb:472:in `process_client'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.3/lib/puma/server.rb:328:in `block in run'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/puma-4.3.3/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
19:00:55 rails.1   |  | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
19:00:55 rails.1   | 2020-04-17T19:00:55 [I|app|51470d4a] Completed 500 Internal Server Error in 41ms (Views: 0.2ms | ActiveRecord: 21.0ms)

Associated revisions

Revision 54608e1c (diff)
Added by Ian Ballou 7 months ago

Fixes #29563 - Applicable packages page loading error

History

#1 Updated by Jonathon Turel 7 months ago

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

#2 Updated by The Foreman Bot 7 months ago

  • Assignee set to Ian Ballou
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8694 added

#3 Updated by The Foreman Bot 7 months ago

  • Fixed in Releases added

#4 Updated by Anonymous 7 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Jonathon Turel about 2 months ago

  • Fixed in Releases Katello 3.17.0 added
  • Fixed in Releases deleted ()
  • Pull request deleted (https://github.com/Katello/katello/pull/8694)

Also available in: Atom PDF