Red Hat Bugzilla – Bug 1227426
widget generation issues with groups that have no userid set
Last modified: 2015-12-08 08:15:05 EST
Description of problem: Widgets cannot be generated by the admin user that include groups that have no userid sets generate errors and fail to run completely, showing that the report generated with an error in the webui Version-Release number of selected component (if applicable): 5.3.4.2 How reproducible: has been noticed after upgrade from 3.0 to 3.1 - happens in all appliances of the customer ( 8 zones of 3 appliances ) Steps to Reproduce: 1. generate one of the widgets that can produce this issue 2. wait for the report to progress 3. refresh the web interface Actual results: the interface shows the report generated with an error for some groups (see the captured data attached to the case) Expected results: it is not sure why those groups are included in the generation. manually generating the report does not cause any error as far as recorded. Additional info: the affected reports from the user perspective are - top cpu consumer (out of the box report, weekly) - top storage consumer (out of the box report, weekly) - quota (custom report, weekly). through bomgar the issue was reproduced in the attached case and data captured.
Felix - Please attach the data captured to this bug ticket.
Created attachment 1034384 [details] pid 2222 log entries the trace produced in the logs is [----] I, [2015-06-01T13:59:44.652432 #2218:a7380c] INFO -- : MIQ(MiqReport-build_create_results) Finished creating report result with id [1000000004592] for report id: [], name: [Top Memory Consumers (weekly)] [----] I, [2015-06-01T13:59:44.653537 #2222:1164008] INFO -- : MIQ(MiqReport-build_create_results) Finished creating report result with id [1000000001406] for report id: [], name: [Top Memory Consumers (weekly)] [----] I, [2015-06-01T13:59:44.660342 #2222:1164008] INFO -- : MIQ(MiqWidget.generate_one_content_for_user) Widget: [Top Memory Consumers (weekly)] ID: [1000000000006] for [DFWorks Eng Vsphere] [an001gd@pbi.global.pvt]...Complete [----] I, [2015-06-01T13:59:44.660457 #2222:1164008] INFO -- : MIQ(MiqWidget.generate_one_content_for_user) Widget: [Top Memory Consumers (weekly)] ID: [1000000000006] for group: [DFWorks Eng Vsphere] users: []... [----] E, [2015-06-01T13:59:44.660821 #2222:1164008] ERROR -- : MIQ(MiqQueue.deliver) Message id: [1000111321547], Error: [undefined method `get_timezone' for nil:NilClass] [----] E, [2015-06-01T13:59:44.660970 #2222:1164008] ERROR -- : [NoMethodError]: undefined method `get_timezone' for nil:NilClass Method:[rescue in deliver] [----] E, [2015-06-01T13:59:44.661047 #2222:1164008] ERROR -- : /var/www/miq/vmdb/app/models/miq_widget.rb:334:in `generate_one_content_for_user' /var/www/miq/vmdb/app/models/miq_widget/content_generator.rb:27:in `block in determine_content' /var/www/miq/vmdb/app/models/miq_widget/content_generator.rb:27:in `collect' /var/www/miq/vmdb/app/models/miq_widget/content_generator.rb:27:in `determine_content' /var/www/miq/vmdb/app/models/miq_widget/content_generator.rb:6:in `generate' /var/www/miq/vmdb/app/models/miq_widget.rb:285:in `generate_content' /var/www/miq/vmdb/app/models/miq_queue.rb:361:in `block in deliver' /opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout' /var/www/miq/vmdb/app/models/miq_queue.rb:357: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:317:in `block in do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:135:in `run' /var/www/miq/vmdb/lib/workers/worker_base.rb:123:in `start' /var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker' /var/www/miq/vmdb/lib/workers/bin/worker.rb:5:in `<top (required)>' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `eval' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `<top (required)>' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `require' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>'
https://github.com/ManageIQ/manageiq/pull/3115
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/61974065c06e769876bb3f3ec0ccfca726aae8fb commit 61974065c06e769876bb3f3ec0ccfca726aae8fb Author: Lucy Fu <lufu@redhat.com> AuthorDate: Wed Jun 10 10:49:30 2015 -0400 Commit: Lucy Fu <lufu@redhat.com> CommitDate: Thu Jun 18 09:11:56 2015 -0400 Add test cases for MiqWidget#grouped_subscribers when a user is deleted somehow. Normally when a user is removed, say from UI, the associated dashboard is cleared as well. But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB. https://bugzilla.redhat.com/show_bug.cgi?id=1227426 vmdb/spec/models/miq_widget_spec.rb | 72 +++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 26 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/cc8df7f8622bfcfd0cb65bfd6faed7116df2ac63 commit cc8df7f8622bfcfd0cb65bfd6faed7116df2ac63 Author: Lucy Fu <lufu@redhat.com> AuthorDate: Wed Jun 10 10:50:02 2015 -0400 Commit: Lucy Fu <lufu@redhat.com> CommitDate: Thu Jun 18 09:11:56 2015 -0400 Fix MiqWidget#grouped_subscribers to skip the user that does not exist any more. Normally when a user is removed, say from UI, the associated dashboard is cleared as well. But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB. https://bugzilla.redhat.com/show_bug.cgi?id=1227426 vmdb/app/models/miq_widget.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
*** Bug 1232913 has been marked as a duplicate of this bug. ***
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=33416371ff45fa442241f1ce7919029b935d19b0 commit 33416371ff45fa442241f1ce7919029b935d19b0 Author: Lucy Fu <lufu@redhat.com> AuthorDate: Wed Jun 10 10:49:30 2015 -0400 Commit: Lucy Fu <lufu@redhat.com> CommitDate: Thu Jun 18 11:26:17 2015 -0400 Add test cases for MiqWidget#grouped_subscribers when a user is deleted somehow. Normally when a user is removed, say from UI, the associated dashboard is cleared as well. But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB. https://bugzilla.redhat.com/show_bug.cgi?id=1227426 vmdb/spec/models/miq_widget_spec.rb | 72 +++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 26 deletions(-)
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=7bce38875b239c2b3cf70adc7f6b14c02bbd5262 commit 7bce38875b239c2b3cf70adc7f6b14c02bbd5262 Author: Lucy Fu <lufu@redhat.com> AuthorDate: Wed Jun 10 10:50:02 2015 -0400 Commit: Lucy Fu <lufu@redhat.com> CommitDate: Thu Jun 18 11:26:55 2015 -0400 Fix MiqWidget#grouped_subscribers to skip the user that does not exist any more. Normally when a user is removed, say from UI, the associated dashboard is cleared as well. But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB. https://bugzilla.redhat.com/show_bug.cgi?id=1227426 vmdb/app/models/miq_widget.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=341b226a9e963a36a30d4afc873d1529874b2af1 commit 341b226a9e963a36a30d4afc873d1529874b2af1 Author: Lucy Fu <lufu@redhat.com> AuthorDate: Wed Jun 10 10:49:30 2015 -0400 Commit: Lucy Fu <lufu@redhat.com> CommitDate: Thu Jun 18 16:44:21 2015 -0400 Add test cases for MiqWidget#grouped_subscribers when a user is deleted somehow. Normally when a user is removed, say from UI, the associated dashboard is cleared as well. But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB. https://bugzilla.redhat.com/show_bug.cgi?id=1227426 vmdb/spec/models/miq_widget_spec.rb | 72 +++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 26 deletions(-)
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d6bd6c97b9a0f9842e0a04470e6cf5547461b908 commit d6bd6c97b9a0f9842e0a04470e6cf5547461b908 Author: Lucy Fu <lufu@redhat.com> AuthorDate: Wed Jun 10 10:50:02 2015 -0400 Commit: Lucy Fu <lufu@redhat.com> CommitDate: Thu Jun 18 16:44:21 2015 -0400 Fix MiqWidget#grouped_subscribers to skip the user that does not exist any more. Normally when a user is removed, say from UI, the associated dashboard is cleared as well. But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB. https://bugzilla.redhat.com/show_bug.cgi?id=1227426 vmdb/app/models/miq_widget.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
I would like to get some clarification concerning this bug. This happens only after update, or can this be induced by doing something? I think I don't understand the formulation "groups that have no userid set" correctly. Which groups?
I meant originally that there were no user IDs in the group, and the group was being generated the widget against, which I saw in the trace (see pid 2222) : [----] I, [2015-06-01T13:59:44.660457 #2222:1164008] INFO -- : MIQ(MiqWidget.generate_one_content_for_user) Widget: [Top Memory Consumers (weekly)] ID: [1000000000006] for group: [DFWorks Eng Vsphere] users: []... (see the attachment for the full content)
Verified in 5.5.0.11. The error does not appear.
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://access.redhat.com/errata/RHSA-2015:2551