Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514124 - Middleware - Error on generating reports on middleware servers
Summary: Middleware - Error on generating reports on middleware servers
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Xavier Canal
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On: 1511961
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 17:00 UTC by Satoe Imaishi
Modified: 2018-03-06 18:13 UTC (History)
10 users (show)

Fixed In Version: 5.9.0.12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1511961
Environment:
Last Closed: 2018-03-06 18:13:56 UTC
Category: ---
Cloudforms Team: Middleware


Attachments (Terms of Use)
Successful Report when no EAP is added (deleted)
2017-11-27 10:53 UTC, Sunil Kondkar
no flags Details
Error after adding EAP to middleware provider (deleted)
2017-11-27 10:55 UTC, Sunil Kondkar
no flags Details
evm.log (deleted)
2017-11-27 10:56 UTC, Sunil Kondkar
no flags Details
Screenshot (deleted)
2017-12-08 12:17 UTC, Sunil Kondkar
no flags Details

Comment 2 Xavier Canal 2017-11-17 11:14:17 UTC
Hey there,

could you please tell me what is this bug about? Is it a duplicate of the https://bugzilla.redhat.com/show_bug.cgi?id=1511961?

Thanks

Comment 4 Matt Mahoney 2017-11-21 14:18:07 UTC
Per comment-3

Comment 5 Sunil Kondkar 2017-11-27 10:52:29 UTC
Tested on Version 5.9.0.10.20171121225911_a2209d2 

Observed that reports are generated only when Middleware provider does not have any EAP server in relationship.
When an EAP standalone server is installed and associated with Middleware Provider, the report is not generated. It shows error status in UI and show below error in evm.log:

[----] E, [2017-11-27T05:17:22.349203 #13225:1155134] ERROR -- : [NoMethodError]: undefined method `[]' for nil:NilClass  Method:[block in method_missing]
[----] E, [2017-11-27T05:17:22.349512 #13225:1155134] ERROR -- : /var/www/miq/vmdb/app/models/mixins/live_metrics_mixin.rb:44:in `included_children'
/opt/rh/cfme-gemset/bundler/gems/manageiq-providers-hawkular-83d9f0e5e915/app/models/manageiq/providers/hawkular/middleware_manager/live_metrics_capture.rb:12:in `initialize'

Steps to reproduce:

1. Login to cfme and add a middleware provider (No standalone EAP is associated)
2. Navigate to cloud Intel >> Reports
3. Click Reports >> Performance by Asset Type >> Middleware servers
4. Click on any link for example 'JVM Garbage Collection - daily averages for last week'
5. Click on 'Queue' button at the top left on the screen to generate the report
6. Observe that the report is generated successfully ( Screenshot attached )

7. Now Install EAP standalone server (Associate EAP server with middleware provider with hawkular URL parameter)
8. Refresh the middleware provider from middleware provider summary->Configuration>Refresh item and relationships
9. Verify that the middleware provider summary shows the EAP standalone server in 'Relationships' section.
10. Navigate to Reports >> Performance by Asset Type >> Middleware servers
11. Click on any link to generate the report.
12. The report shows status 'Error' in UI and evm.log shows errors
( Screenshot and evm.log is attached )

Comment 6 Sunil Kondkar 2017-11-27 10:53:52 UTC
Created attachment 1359425 [details]
Successful Report when no EAP is added

Comment 7 Sunil Kondkar 2017-11-27 10:55:07 UTC
Created attachment 1359426 [details]
Error after adding EAP to middleware provider

Comment 8 Sunil Kondkar 2017-11-27 10:56:30 UTC
Created attachment 1359427 [details]
evm.log

Comment 9 CFME Bot 2017-11-28 18:19:36 UTC
New commit detected on ManageIQ/manageiq-providers-hawkular/master:
https://github.com/ManageIQ/manageiq-providers-hawkular/commit/197faeef6fe03595a751b01a3ae2ca4422f8ebef

commit 197faeef6fe03595a751b01a3ae2ca4422f8ebef
Merge: f02dd94 016146e
Author:     Edgar Hernández <ehernand@redhat.com>
AuthorDate: Tue Nov 28 12:17:35 2017 -0600
Commit:     GitHub <noreply@github.com>
CommitDate: Tue Nov 28 12:17:35 2017 -0600

    Merge pull request #114 from xeviknal/mw-server-metrics-fix
    
    Fixing live metrics for MiddlewareServer[EAP|Wildfly] instances
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1514124

 .../providers/hawkular/middleware_manager/middleware_server.rb    | 8 ++++++++
 1 file changed, 8 insertions(+)

Comment 10 Xavier Canal 2017-11-29 09:25:46 UTC
Indeed the addition of the EAP server was causing the failure.
Already fixed it and merged into master for manageiq-providers-hawkular

Comment 11 Xavier Canal 2017-11-29 12:00:21 UTC
Here the Pull Request merged which fixed the problem described above:
https://github.com/ManageIQ/manageiq-providers-hawkular/pull/114

Comment 12 CFME Bot 2017-11-29 20:46:08 UTC
New commit detected on ManageIQ/manageiq-providers-hawkular/gaprindashvili:
https://github.com/ManageIQ/manageiq-providers-hawkular/commit/83d9f0e5e91581c9ef675ed425b3a1642af99290

commit 83d9f0e5e91581c9ef675ed425b3a1642af99290
Author:     Cainã Costa <me@cfcosta.com>
AuthorDate: Wed Nov 15 14:07:37 2017 -0200
Commit:     Satoe Imaishi <simaishi@redhat.com>
CommitDate: Fri Nov 17 10:50:34 2017 -0500

    Merge pull request #106 from xeviknal/1510421
    
    [1511961] Middleware server reports fixed after introducing STI on MiddlewareServer
    (cherry picked from commit f16422123da304f70bf4f7ad6893b4ba681995c0)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1514124

 .../providers/hawkular/middleware_manager/middleware_server.rb        | 4 ++++
 1 file changed, 4 insertions(+)

Comment 13 CFME Bot 2017-11-29 20:46:14 UTC
New commit detected on ManageIQ/manageiq-providers-hawkular/gaprindashvili:
https://github.com/ManageIQ/manageiq-providers-hawkular/commit/90ba664f45f1f15e4326d671b678daa78457d669

commit 90ba664f45f1f15e4326d671b678daa78457d669
Author:     Edgar Hernández <ehernand@redhat.com>
AuthorDate: Tue Nov 28 12:17:35 2017 -0600
Commit:     Satoe Imaishi <simaishi@redhat.com>
CommitDate: Tue Nov 28 15:51:42 2017 -0500

    Merge pull request #114 from xeviknal/mw-server-metrics-fix
    
    Fixing live metrics for MiddlewareServer[EAP|Wildfly] instances
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1514124
    (cherry picked from commit 197faeef6fe03595a751b01a3ae2ca4422f8ebef)

 .../providers/hawkular/middleware_manager/middleware_server.rb    | 8 ++++++++
 1 file changed, 8 insertions(+)

Comment 14 Sunil Kondkar 2017-12-08 12:16:46 UTC
Verified on Version 5.9.0.12.20171205180333_3e32b3d

Reports are generated successfully on middleware servers. Please refer the attached screenshot.

Comment 15 Sunil Kondkar 2017-12-08 12:17:21 UTC
Created attachment 1364815 [details]
Screenshot


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