Red Hat Bugzilla – Bug 1000637
Tomcat discovery fails to find version
Last modified: 2013-08-28 20:54:44 EDT
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.
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.
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.