Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1227426 - widget generation issues with groups that have no userid set
widget generation issues with groups that have no userid set
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.3.0
All All
medium Severity medium
: GA
: 5.5.0
Assigned To: Lucy Fu
Milan Falešník
: ZStream
: 1232913 (view as bug list)
Depends On:
Blocks: 1233277 1233412
  Show dependency treegraph
 
Reported: 2015-06-02 11:55 EDT by Felix Dewaleyne
Modified: 2015-12-08 08:15 EST (History)
14 users (show)

See Also:
Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
While migrating from the previous version of CloudForms Management Engine, some users would be deleted but the dashboard definitions for the users were not deleted from the database. This would result in the admin user's inability to generate widgets for groups containing these users. This bug was fixed by checking for and skipping over the residual data for deleted users. The admin user is able to generate widgets as expected in the new version of CloudForms Managetment Engine.
Story Points: ---
Clone Of:
: 1233277 1233412 (view as bug list)
Environment:
Last Closed: 2015-12-08 08:15:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
pid 2222 log entries (167.71 KB, text/plain)
2015-06-03 10:59 EDT, Felix Dewaleyne
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 12:58:09 EST

  None (edit)
Description Felix Dewaleyne 2015-06-02 11:55:25 EDT
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.
Comment 2 Greg McCullough 2015-06-03 10:21:13 EDT
Felix - Please attach the data captured to this bug ticket.
Comment 3 Felix Dewaleyne 2015-06-03 10:59:47 EDT
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>'
Comment 5 Oleg Barenboim 2015-06-11 09:51:41 EDT
https://github.com/ManageIQ/manageiq/pull/3115
Comment 6 CFME Bot 2015-06-18 10:06:53 EDT
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(-)
Comment 7 CFME Bot 2015-06-18 10:06:58 EDT
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(-)
Comment 8 Lucy Fu 2015-06-18 11:08:48 EDT
*** Bug 1232913 has been marked as a duplicate of this bug. ***
Comment 9 CFME Bot 2015-06-18 13:51:03 EDT
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(-)
Comment 10 CFME Bot 2015-06-18 13:51:07 EDT
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(-)
Comment 11 CFME Bot 2015-06-18 13:54:21 EDT
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(-)
Comment 12 CFME Bot 2015-06-18 13:54:24 EDT
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(-)
Comment 13 CFME Bot 2015-06-22 11:58:30 EDT
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(-)
Comment 14 CFME Bot 2015-06-22 11:58:35 EDT
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(-)
Comment 17 Milan Falešník 2015-09-18 06:25:50 EDT
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?
Comment 18 Felix Dewaleyne 2015-09-21 07:32:26 EDT
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)
Comment 31 Milan Falešník 2015-11-19 08:29:08 EST
Verified in 5.5.0.11. The error does not appear.
Comment 33 errata-xmlrpc 2015-12-08 08:15:05 EST
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

Note You need to log in before you can comment on or make changes to this bug.