Bug #14730

ERROR: invalid reference to FROM-clause entry for table "smart_proxies"

Added by Iain Buclaw over 1 year ago. Updated 8 months ago.

Status:Closed
Priority:Normal
Assigned To:Tomer Brisker
Category:Search
Target version:Team Daniel - Iteration 9
Difficulty: Bugzilla link:1372757
Found in release:1.11.0 Pull request:https://github.com/theforeman/foreman/pull/3464
Story points-
Velocity based estimate-
Release1.11.2Release relationshipAuto

Description

With locations enabled. Switch context to any location, and search for anything on the dashboard page.
Get back the response.

Oops, we're sorry but something went wrong ERROR: invalid reference to FROM-clause entry for table "smart_proxies" LINE 1: SELECT smart_proxies.id FROM "smart_proxies" "puppet_ca_prox... ^ HINT: Perhaps you meant to reference the table alias "puppet_ca_proxies_hosts". 

 PG::Error
ERROR: invalid reference to FROM-clause entry for table "smart_proxies" LINE 1: SELECT smart_proxies.id FROM "smart_proxies" "puppet_ca_prox... ^ HINT: Perhaps you meant to reference the table alias "puppet_ca_proxies_hosts".
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `block in exec_no_cache'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:378:in `block in log'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:372:in `log'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec_no_cache'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/postgresql_adapter.rb:954:in `select'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/calculations.rb:172:in `pluck'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/querying.rb:14:in `pluck'
/usr/share/foreman/app/models/concerns/taxonomix.rb:77:in `taxable_ids'
/usr/share/foreman/app/models/concerns/taxonomix.rb:38:in `with_taxonomy_scope'
/usr/share/foreman/app/models/smart_proxy.rb:36:in `block in '
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:103:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:103:in `block (3 levels) in build_default_scope'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation.rb:292:in `scoping'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:103:in `block (2 levels) in build_default_scope'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:102:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:102:in `inject'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:102:in `block in build_default_scope'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:125:in `evaluate_default_scope'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/scoping/default.rb:101:in `build_default_scope'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency/join_association.rb:57:in `block in join_constraints'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency/join_association.rb:33:in `reverse_each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency/join_association.rb:33:in `join_constraints'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:162:in `make_constraints'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:168:in `make_outer_joins'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:206:in `block in walk'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:206:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:206:in `flat_map'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:206:in `walk'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:114:in `block in join_constraints'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:112:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:112:in `flat_map'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/associations/join_dependency.rb:112:in `join_constraints'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/query_methods.rb:1003:in `build_joins'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/query_methods.rb:850:in `build_arel'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/query_methods.rb:842:in `arel'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/calculations.rb:216:in `perform_calculation'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/calculations.rb:119:in `calculate'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/calculations.rb:117:in `calculate'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/relation/calculations.rb:34:in `count'
/usr/share/foreman/app/services/dashboard/data.rb:24:in `fetch_data'
/usr/share/foreman/app/services/dashboard/data.rb:11:in `initialize'
/usr/share/foreman/app/controllers/dashboard_controller.rb:60:in `new'
/usr/share/foreman/app/controllers/dashboard_controller.rb:60:in `prefetch_data'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in `block in make_lambda'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:143:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:143:in `block in halting_and_conditional'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in `block (2 levels) in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `block (2 levels) in halting'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in `public_send'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in `block in make_lambda'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `block in halting'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `block in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in `block (2 levels) in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `block (2 levels) in halting'
/usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in `block in make_lambda'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `block in halting'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `block in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in `block (2 levels) in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `block (2 levels) in halting'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in `block in make_lambda'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `block in halting'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `block in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:495:in `block (2 levels) in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:306:in `block (2 levels) in halting'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in `public_send'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:452:in `block in make_lambda'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:305:in `block in halting'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:494:in `block in around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:502:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:86:in `run_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/abstract_controller/callbacks.rb:19:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_controller/metal/rescue.rb:29:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in `block in instrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:159:in `instrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/abstract_controller/base.rb:136:in `process'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionview-4.1.14.2/lib/action_view/rendering.rb:30:in `process'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:196:in `dispatch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_controller/metal.rb:232:in `block in action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:48:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:73:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/journey/router.rb:59:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/routing/route_set.rb:690:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.3.6/lib/apipie/static_dispatcher.rb:65:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.3.6/lib/apipie/extractor/recorder.rb:132:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.3.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/etag.rb:23:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/conditionalget.rb:25:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/head.rb:11:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/flash.rb:254:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in `context'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/cookies.rb:562:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/query_cache.rb:36:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-4.1.14.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:82:in `run_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-4.1.14.2/lib/rails/rack/logger.rb:38:in `call_app'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-4.1.14.2/lib/rails/rack/logger.rb:22:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/runtime.rb:17:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-4.1.14.2/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-4.1.14.2/lib/action_dispatch/middleware/static.rb:84:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/sendfile.rb:112:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-4.1.14.2/lib/rails/engine.rb:514:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-4.1.14.2/lib/rails/application.rb:144:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `public_send'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `method_missing'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/builder.rb:138:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:65:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `call'
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
/usr/share/foreman/vendor/ruby/1.9.1/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `block in create_with_logging_context' 

I see there is a new point release out, so will see if it's not been fixed in the meantime, but from the changelog, it does not appear to be the case.

Associated revisions

Revision 51853352
Added by Tomer Brisker over 1 year ago

Fixes #14730 - Only search host proxies explicitly

When searching hosts with free text in a taxonomy scope, if the taxonomy
has "all smart proxies" associated, it leads to scoped search generating
an incorrect scope which causes an invalid query:
`SELECT smart_proxies.id FROM "smart_proxies" "puppet_ca_proxies_hosts"`
Making the puppet_ca search only explicitly prevents this at the cost of
not allowing to search by puppet_ca using free text. I believe this is a
reasonable tradeoff as I did not find a simpler way to handle this (might
require some deep tweeking in scoped search).
To maintain consistency I also made the puppetmaster search explicit
only.

Revision 06b7f607
Added by Tomer Brisker over 1 year ago

Fixes #14730 - Only search host proxies explicitly

When searching hosts with free text in a taxonomy scope, if the taxonomy
has "all smart proxies" associated, it leads to scoped search generating
an incorrect scope which causes an invalid query:
`SELECT smart_proxies.id FROM "smart_proxies" "puppet_ca_proxies_hosts"`
Making the puppet_ca search only explicitly prevents this at the cost of
not allowing to search by puppet_ca using free text. I believe this is a
reasonable tradeoff as I did not find a simpler way to handle this (might
require some deep tweeking in scoped search).
To maintain consistency I also made the puppetmaster search explicit
only.

(cherry picked from commit 5185335248abd0104ec0b791df5e641eeae9da6b)

History

#1 Updated by Iain Buclaw over 1 year ago

It's still present in 1.11.1. I guess I'll wait until 1.12 packages become available.

#2 Updated by Dominic Cleal over 1 year ago

  • Category set to Search

Are you accessing the page as a non-admin user? If so, do you have any roles/filters with searches that restrict access to certain hosts?

#3 Updated by Iain Buclaw over 1 year ago

Iain Buclaw wrote:

Switch context to any location,

I've just realised that this is misleading, as there is a button titled "Any Location". I only get the error when the context is set to a specific location. When searching under "Any Location"/"Any Context" searching works fine.

I don't recall this happening in 1.10.x either.

Dominic Cleal wrote:

Are you accessing the page as a non-admin user? If so, do you have any roles/filters with searches that restrict access to certain hosts?

I am accessing the page as an administrator.

#4 Updated by Dominic Cleal over 1 year ago

  • Release set to 1.11.2

Reproduced it, and it is new in 1.11. The location must have "All smart proxies" (i.e. ignore types) checked, and when using a free text search.

#5 Updated by Tomer Brisker over 1 year ago

  • Status changed from New to Assigned
  • Assigned To set to Tomer Brisker

FWIW it is also broken on the host index page.

#6 Updated by The Foreman Bot over 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3464 added

#7 Updated by Anonymous over 1 year ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#8 Updated by Tomer Brisker 10 months ago

  • Bugzilla link set to 1372757

#9 Updated by Daniel Lobato Garcia 9 months ago

  • Target version set to Team Brad - Iteration 11

#10 Updated by Brad Buckingham 8 months ago

  • Target version deleted (Team Brad - Iteration 11)

#11 Updated by Daniel Lobato Garcia 8 months ago

  • Target version set to Team Daniel - Iteration 9

Also available in: Atom PDF