Bug 1000637

Summary: Tomcat discovery fails to find version
Product: [Other] RHQ Project Reporter: Elias Ross <genman>
Component: PluginsAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
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: --- Target Upstream Version:
Embargoed:

Description Elias Ross 2013-08-23 22:23:04 UTC
TomcatDiscoveryComponent class calls the version.sh script. In my case, we repackaged the server to not include version.sh so my server version is 'Unknown Version'.

The version can also be obtained through JMX and is more reliable this way.

The suggestion (request) is to use the JMX obtained version when possible.

Comment 1 Heiko W. Rupp 2013-08-28 19:56:39 UTC
We are facing here the challenge that discovery is one phase and in many cases, the credentials can only be provided when the server is already in inventory, which means, discovery had happened.
While it may be true that the version can change on subsequent discovery runs (I'd need to check that), at least for the start we can only return "unknown" here.

We are thinking for the future of introducing a 2-phase discovery, where phase 1 only does the discovery and reports to the discovery Q, where the user can then give credentials if needed. Then 2nd phase kicks in and does the real discovery with name finding etc.

Comment 2 Elias Ross 2013-08-29 00:54:44 UTC
In some cases you want to be able to access the database/JMX/whatever connection to find the name, version, etc., so having a facet that's part of the resource itself, not part of the discovery class, would be ideal. I suppose it could be called after a start(), or be added as a method part of the resource's context.