Bug 1383414

Summary: Middleware - Added new Datasource is not listed
Product: [JBoss] Middleware Manager Reporter: Hayk Hovsepyan <hhovsepy>
Component: OtherAssignee: Ruben Vargas Palma <rvargasp>
Status: VERIFIED --- QA Contact: Hayk Hovsepyan <hhovsepy>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: dajohnso, hhovsepy, hrupp, jhardy, mmahoney
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Hawkular
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Middleware Target Upstream Version:

Description Hayk Hovsepyan 2016-10-10 14:37:17 UTC
Description of problem:
Newly created datasource is not listed for server.

Version-Release number of selected component (if applicable):
5.7.0.4-alpha1.20161005153002_cfc8a23

How reproducible:
always

Steps to Reproduce:
1. Select EAP7 server.
2. Add a new Datasource by "Add Datasource" menu item. Finish the wizard.
3. No notification message whether datasource is added or failed.
4. Return back to server, check the list of datasources.
5. Newly added datasource is not listed.
6. Server reload via UI Operation and provider "Refresh item and relationships" via UI operation.

Actual results:
After adding new datasource via UI:
1. No notification message is shown to indicate add result.
2. Newly added datasource is not listed in UI in for server.

Expected results:
1. Notification message about add datasource result.
2. Datasource is listed for server.


Log on EAP7 server side after datasource creation:
"2016-10-10 10:14:53,964 INFO  [org.hawkular.agent.monitor.cmd.AbstractResourcePathCommand] (OkHttp http://last-hawkular-services.bc.jonqe.lab.eng.bos.redhat.com:8080/hawkular/command-gateway/feed/54c115fc-b477-4a90-9cf5-dba022266dc3) HAWKMONITOR010065: Received request to perform [Add] on a [Datasource] given by inventory path [/t;hawkular/f;54c115fc-b477-4a90-9cf5-dba022266dc3/r;EAP7~~]"

Comment 2 Heiko W. Rupp 2016-10-28 09:00:57 UTC
ManageIQ only polls every 10-15min for new entries in remote providers (Rehvm, amazon, Azure, Hawkular).
So I expect that this would just show up after some time -> works as designed.
For the future we may try to implement "targeted refresh", but not for Euwe

Comment 3 Hayk Hovsepyan 2016-10-31 12:58:43 UTC
What I see, newly created DS is not listed by command "/subsystem=datasources:read-resource(recursive=true)" and it does not exist in any standalone xml config.

Only message in standalone.log is:
2016-10-31 08:50:52,337 INFO  [org.hawkular.agent.monitor.cmd.AbstractResourcePathCommand] (OkHttp http://last-hawkular-services.bc.jonqe.lab.eng.bos.redhat.com:8080/hawkular/command-gateway/feed/cfd4a14d-a853-4964-bec5-876e3be185b0) HAWKMONITOR010065: Received request to perform [Add] on a [Datasource] given by inventory path [/t;hawkular/f;cfd4a14d-a853-4964-bec5-876e3be185b0/r;EAP7~~]
2016-10-31 08:50:52,348 INFO  [org.hawkular.agent.monitor.cmd.AbstractResourcePathCommand] (OkHttp http://last-hawkular-services.bc.jonqe.lab.eng.bos.redhat.com:8080/hawkular/command-gateway/feed/cfd4a14d-a853-4964-bec5-876e3be185b0) HAWKMONITOR010065: Received request to perform [Add] on a [Datasource] given by inventory path [/t;hawkular/f;cfd4a14d-a853-4964-bec5-876e3be185b0/r;EAP7~~]

Comment 4 Heiko W. Rupp 2016-10-31 13:54:33 UTC
That message shows on the Hawkular-server, right? And this is also the target server for the DS-creation?

Comment 5 Hayk Hovsepyan 2016-10-31 14:08:40 UTC
The previous message was on target EAP7 side.

Message on HS side while creating DS is:
2016-10-31 08:50:51,779 INFO  [org.hawkular.cmdgw.command.ws.server.UIClientWebSocket] (default task-27) HAWKFEEDCOMM000013: WebSocket session [wOSMp7yzDe4VeL5lg9n9a8xMvswK_CL3wunfbjJs] opened for endpoint [/ui/ws]
2016-10-31 08:50:51,779 INFO  [org.hawkular.cmdgw.command.ws.server.UIClientWebSocket] (default task-9) HAWKFEEDCOMM000013: WebSocket session [nn9l_3BAaeaq8GavD883vfq0gwZ1etO6iVyYT2nZ] opened for endpoint [/ui/ws]
2016-10-31 08:50:52,281 INFO  [org.hawkular.cmdgw.command.ws.server.AbstractGatewayWebSocket] (default task-30) HAWKFEEDCOMM000014: Received message [org.hawkular.cmdgw.api.AddDatasourceRequest] from WebSocket session [wOSMp7yzDe4VeL5lg9n9a8xMvswK_CL3wunfbjJs] of [/ui/ws]
2016-10-31 08:50:52,285 INFO  [org.hawkular.cmdgw.command.ws.server.AbstractGatewayWebSocket] (default task-18) HAWKFEEDCOMM000014: Received message [org.hawkular.cmdgw.api.AddDatasourceRequest] from WebSocket session [nn9l_3BAaeaq8GavD883vfq0gwZ1etO6iVyYT2nZ] of [/ui/ws]
2016-10-31 08:50:52,342 INFO  [org.hawkular.cmdgw.command.ws.server.AbstractGatewayWebSocket] (default task-24) HAWKFEEDCOMM000014: Received message [org.hawkular.cmdgw.api.AddDatasourceResponse] from WebSocket session [VRmL760r1XM9aXMNoGnlLDtx09SUXZ0qQdjsRLsi] of [/feed/{feedId}]
2016-10-31 08:50:52,387 INFO  [org.hawkular.cmdgw.command.ws.server.AbstractGatewayWebSocket] (default task-24) HAWKFEEDCOMM000014: Received message [org.hawkular.cmdgw.api.AddDatasourceResponse] from WebSocket session [VRmL760r1XM9aXMNoGnlLDtx09SUXZ0qQdjsRLsi] of [/feed/{feedId}]
2016-10-31 08:56:54,692 INFO  [org.hawkular.cmdgw.command.ws.server.UIClientWebSocket] (default task-4) HAWKFEEDCOMM000013: WebSocket session [n4KmbnCzQnyr9pkKULDpZtloGQy-oiy9LcXLxOhI] opened for endpoint [/ui/ws]
2016-10-31 08:56:55,377 INFO  [org.hawkular.cmdgw.command.ws.server.UIClientWebSocket] (default task-5) HAWKFEEDCOMM000015: WebSocket session [n4KmbnCzQnyr9pkKULDpZtloGQy-oiy9LcXLxOhI] of [/ui/ws] closed. Reason=[CloseReason[1006]]

Comment 6 Heiko W. Rupp 2016-10-31 14:53:06 UTC
Hayk, can you provide your input (parameters for the Wizard) for reproduction purposes? Did you look at the timeline if that shows errors and/or evm.log in ManageIQ?

Did the EAP show a line like the following?

14:53:59,067 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:/foo]

Comment 9 Heiko W. Rupp 2016-11-08 15:01:34 UTC
That agent is in h-services 0.19, so moving to post

Comment 10 Hayk Hovsepyan 2016-12-13 16:09:30 UTC
Verified on revision: 5.7.0.14-rc4.20161206165848_b5cb87f