Description of problem: ================================= Upgraded an appliance John Hardy sent me and ran into this exception in the logs which is tied to miq_alert... [----] E, [2015-05-21T09:34:39.328751 #29375:587e9c] ERROR -- : MIQ(MiqQueue.deliver) Message id: [1000114186144], Error: [Association named 'ext_management_system' was not found; perhaps you misspelled it?] [----] E, [2015-05-21T09:34:39.329000 #29375:587e9c] ERROR -- : [ActiveRecord::ConfigurationError]: Association named 'ext_management_system' was not found; perhaps you misspelled it? Method:[rescue in deliver] [----] E, [2015-05-21T09:34:39.329158 #29375:587e9c] ERROR -- : /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:150:in `block in records_by_reflection' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:146:in `each' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:146:in `group_by' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:146:in `records_by_reflection' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:139:in `grouped_records' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:130:in `preload_one' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:109:in `preload' /var/www/miq/vmdb/lib/extensions/ar_virtual.rb:302:in `preload_with_virtual' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:98:in `block in run' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:98:in `each' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/associations/preloader.rb:98:in `run' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation.rb:181:in `block in exec_queries' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation.rb:180:in `each' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation.rb:180:in `exec_queries' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation.rb:160:in `block in to_a' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/explain.rb:40:in `logging_query_plan' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation.rb:159:in `to_a' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation/query_methods.rb:72:in `select' /var/www/miq/vmdb/app/models/miq_alert.rb:155:in `block (2 levels) in evaluate_hourly_timer' /var/www/miq/vmdb/app/models/miq_alert.rb:150:in `each' /var/www/miq/vmdb/app/models/miq_alert.rb:150:in `block in evaluate_hourly_timer' /var/www/miq/vmdb/app/models/miq_alert.rb:148:in `each' /var/www/miq/vmdb/app/models/miq_alert.rb:148:in `evaluate_hourly_timer' /var/www/miq/vmdb/app/models/miq_queue.rb:356:in `block in deliver' /opt/rh/ruby200/root/usr/share/ruby/timeout.rb:66:in `timeout' /var/www/miq/vmdb/app/models/miq_queue.rb:352:in `deliver' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work' /var/www/miq/vmdb/lib/workers/worker_base.rb:323:in `block in do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:141:in `run' /var/www/miq/vmdb/lib/workers/worker_base.rb:122:in `start' /var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker' /var/www/miq/vmdb/lib/workers/bin/worker.rb:3:in `<top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `eval' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `<top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `require' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>' Version-Release number of selected component (if applicable): ============================================================== 5.3.0.15 to 5.4.0.1 upgrade How reproducible: =================== 100% ??? The exception keeps happening Steps to Reproduce: ============================== 1. upgrade appliance from jhardy 2. db migrate 3. fix auth 4. service evmserverd start Actual results: ================ exception in the logs Expected results: ================ no exception
John and the eng team leads decided that we should get this one into 5.4.0 release
https://github.com/ManageIQ/manageiq/pull/2979
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/787a7f08233b0741b039068996bbba4f16f40ae0 commit 787a7f08233b0741b039068996bbba4f16f40ae0 Author: Bill Wei <bilwei> AuthorDate: Fri May 22 09:00:07 2015 -0400 Commit: Bill Wei <bilwei> CommitDate: Thu Jun 4 15:58:13 2015 -0400 Call Zone's accessor methods to get models' instances in current zone Add a set of {tablename}_without_a_zone methods to get instances that are not connected to the zone through ext_management_system association. Add spec tests for MiqAlert.evaluate_hourly_timer https://bugzilla.redhat.com/show_bug.cgi?id=1223835 vmdb/app/models/miq_alert.rb | 15 +++++---- vmdb/app/models/zone.rb | 44 +++++++++++++++++++-------- vmdb/spec/models/miq_alert_spec.rb | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 21 deletions(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4d6ea158cd61500ba601d53b84fee4894884f526 commit 4d6ea158cd61500ba601d53b84fee4894884f526 Author: Bill Wei <bilwei> AuthorDate: Fri May 22 09:00:07 2015 -0400 Commit: Bill Wei <bilwei> CommitDate: Thu Jun 4 17:40:41 2015 -0400 Call Zone's accessor methods to get models' instances in current zone Add a set of {tablename}_without_a_zone methods to get instances that are not connected to the zone through ext_management_system association. Add spec tests for MiqAlert.evaluate_hourly_timer https://bugzilla.redhat.com/show_bug.cgi?id=1223835 vmdb/app/models/miq_alert.rb | 15 +++++---- vmdb/app/models/zone.rb | 44 +++++++++++++++++++-------- vmdb/spec/models/miq_alert_spec.rb | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 21 deletions(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=a70bb059f55d69b4472ee2b3b6de7ce95ba4ed30 commit a70bb059f55d69b4472ee2b3b6de7ce95ba4ed30 Merge: f2d6c32 4d6ea15 Author: Greg McCullough <gmccullo> AuthorDate: Thu Jun 4 17:57:13 2015 -0400 Commit: Greg McCullough <gmccullo> CommitDate: Thu Jun 4 17:57:13 2015 -0400 Merge branch 'product_provider_alert' into '5.4.z' Call Zone's accessor methods to get models' instances in current zone Add a set of {tablename}_without_a_zone methods to get instances that are not connected to the zone through ext_management_system association. Add spec tests for MiqAlert.evaluate_hourly_timer https://bugzilla.redhat.com/show_bug.cgi?id=1223835 See merge request !104 vmdb/app/models/miq_alert.rb | 15 +++++---- vmdb/app/models/zone.rb | 44 +++++++++++++++++++-------- vmdb/spec/models/miq_alert_spec.rb | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 21 deletions(-)
To reproduce and verify fix for this bug you need to create a user alert Based on Provider, driving by Hourly Timer, and do nothing; then add the alert to an alert profile. Looking for log to see the exception thrown every hour. With the fix the error is gone from the log.
Verified in 5.4.0.5 against 5.4.0.4. The error is not present in the log file.
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
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=7d6463013088618014af9b733ef6e9e99ba0624a commit 7d6463013088618014af9b733ef6e9e99ba0624a Author: Bill Wei <bilwei> AuthorDate: Fri May 22 09:00:07 2015 -0400 Commit: Bill Wei <bilwei> CommitDate: Tue Sep 22 16:11:59 2015 -0400 Call Zone's accessor methods to get models' instances in current zone Add a set of {tablename}_without_a_zone methods to get instances that are not connected to the zone through ext_management_system association. Add spec tests for MiqAlert.evaluate_hourly_timer https://bugzilla.redhat.com/show_bug.cgi?id=1223835 vmdb/app/models/miq_alert.rb | 15 +++++---- vmdb/app/models/zone.rb | 44 +++++++++++++++++++-------- vmdb/spec/models/miq_alert_spec.rb | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 21 deletions(-)
*** Bug 1265325 has been marked as a duplicate of this bug. ***