Created attachment 1020067 [details] err Description of problem: Version-Release number of selected component (if applicable): 5.4.0.0.23.20150423131011_69b48fd How reproducible: 100% Steps to Reproduce: 1.Navigate to Infrastructure->Configuration Management 2.Add foreman provider and click on it 3.Sort by "OS flavor" Actual results: Invalid reflection <operating_system_flavor> on model <ConfigurationProfile> [provider_foreman/explorer] displayed in UI. see attached screenshot Expected results: No error Additional info: production.log [----] I, [2015-04-29T06:22:00.230043 #2642:123bea4] INFO -- : Processing by ProviderForemanController#explorer as JS [----] I, [2015-04-29T06:22:00.230145 #2642:123bea4] INFO -- : Parameters: {"sortby"=>"3"} [----] F, [2015-04-29T06:22:00.290686 #2642:123bea4] FATAL -- : Error caught: [RuntimeError] Invalid reflection <operating_system_flavor> on model <ConfigurationProfile> /var/www/miq/vmdb/app/models/miq_report/search.rb:18:in `get_sqltable' /var/www/miq/vmdb/app/models/miq_report/search.rb:46:in `block in get_order_info' /var/www/miq/vmdb/app/models/miq_report/search.rb:39:in `collect' /var/www/miq/vmdb/app/models/miq_report/search.rb:39:in `get_order_info' /var/www/miq/vmdb/app/models/miq_report/search.rb:101:in `paged_view_search' /var/www/miq/vmdb/app/controllers/application_controller.rb:1939:in `get_view' /var/www/miq/vmdb/app/controllers/application_controller/ci_processing.rb:948:in `process_show_list' /var/www/miq/vmdb/app/controllers/provider_foreman_controller.rb:438:in `provider_node' /var/www/miq/vmdb/app/controllers/provider_foreman_controller.rb:407:in `get_node_info' /var/www/miq/vmdb/app/controllers/provider_foreman_controller.rb:582:in `leaf_record' /var/www/miq/vmdb/app/controllers/provider_foreman_controller.rb:559:in `replace_right_cell' /var/www/miq/vmdb/app/controllers/provider_foreman_controller.rb:313:in `explorer' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/base.rb:167:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:557:in `_run__4165124148116309835__process_action__2054748378384383329__callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/base.rb:121:in `process' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:45:in `process' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal.rb:203:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal.rb:246:in `block in action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:36:in `call' /opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' /opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' /opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:608:in `call' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/flash.rb:242:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/cookies.rb:341:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/query_cache.rb:64:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `_run__4428684173445520853__call__3972805270694011947__callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/logger.rb:32:in `call_app' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/logger.rb:18:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/request_id.rb:22:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/static.rb:63:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/engine.rb:484:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/application.rb:231:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/log_tailer.rb:17:in `call' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data' /opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine' /opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/server.rb:159:in `start' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/server.rb:268:in `start' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands/server.rb:70:in `start' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:55:in `block in <top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:50:in `tap' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:50:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>'
The ConfigurationProfileForeman model (which is subclassed from ConfigurationProfile) contains the operating_system_flavor relationship which is causing the issue. Need to investigate if there is a better solution then just pushing relationships down to the base model.
We are moving the relationships to the parent. We do have an issue with configuration_tags. I'm denormalizing so we can move that to the parent class.
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/46c506d2c400624b19a91880db33c5699960b5f3 commit 46c506d2c400624b19a91880db33c5699960b5f3 Author: Keenan Brock <kbrock> AuthorDate: Wed Apr 29 16:59:53 2015 -0400 Commit: Keenan Brock <kbrock> CommitDate: Wed Apr 29 19:26:17 2015 -0400 move foreman relations to parent classes this fixes reporting STI issue https://bugzilla.redhat.com/show_bug.cgi?id=1216969 vmdb/app/models/configuration_profile.rb | 4 ++++ vmdb/app/models/configuration_profile_foreman.rb | 3 --- vmdb/app/models/configured_system.rb | 12 +++++++++++- vmdb/app/models/configured_system_foreman.rb | 11 ----------- .../service_models/miq_ae_service_configuration_profile.rb | 4 ++++ .../miq_ae_service_configuration_profile_foreman.rb | 3 --- .../service_models/miq_ae_service_configured_system.rb | 10 +++++++--- .../miq_ae_service_configured_system_foreman.rb | 5 ----- 8 files changed, 26 insertions(+), 26 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/14cf6886c5a0866c0f5380d8dc65972f5853a739 commit 14cf6886c5a0866c0f5380d8dc65972f5853a739 Author: Keenan Brock <kbrock> AuthorDate: Wed Apr 29 19:22:20 2015 -0400 Commit: Keenan Brock <kbrock> CommitDate: Wed Apr 29 19:26:17 2015 -0400 move foreman configuration_tags to parent classes this fixes reporting STI issue - introduced direct configuration tags (un merged) - denormalized configuration_tags in parent classes - (no longer dynamically merging the configuration tags) https://bugzilla.redhat.com/show_bug.cgi?id=1216969 vmdb/app/models/configuration_profile.rb | 34 +++++++-- vmdb/app/models/configuration_profile_foreman.rb | 38 +--------- vmdb/app/models/configured_system.rb | 30 ++++++++ vmdb/app/models/configured_system_foreman.rb | 42 +---------- vmdb/app/models/ems_refresh/parsers/foreman.rb | 23 ++++++ ...20150429214648_add_direct_configuration_tags.rb | 22 ++++++ .../models/configuration_profile_foreman_spec.rb | 83 ++-------------------- vmdb/spec/models/configured_system_foreman_spec.rb | 41 ++--------- 8 files changed, 119 insertions(+), 194 deletions(-) create mode 100644 vmdb/db/migrate/20150429214648_add_direct_configuration_tags.rb
Verified in 5.4.0.0.25
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, 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://rhn.redhat.com/errata/RHBA-2015-1100.html