Red Hat Bugzilla – Bug 702662
[apache] The vhost ping URL might be incorrectly auto-discovered
Last modified: 2011-05-06 10:07:34 EDT
Description of problem:
The discovery code assumes that the host specified in the ServerName directive of the virtual host definition is reachable and uses it in precedence to the actual vhost address definitions while composing the URL to ping for availability.
This might not be the case if name based virtual hosting is not used for that particular vhost.
For example if there was a load balancer in front of several apache instances that would forward traffic to a specified vhost in "our" instance, the ServerName directive would contain the "public facing" hostname of the load balancer which might not even be resolvable in the network our instance is part of.
Version-Release number of selected component (if applicable):
this is present in all versions of RHQ that have the apache plugin
Steps to Reproduce:
1. Declare a vhost with a ServerName directive that specifies an unresolvable hostname
2.Discover the apache instance in RHQ
3.Check that the URL in the connection properties of the corresponding virtual host resource contains the hostname of the ServerName and port of the virtual host definition.
The vhost is assumed down because an incorrect URL was auto-discovered in its connection properties
The plugin should be smart enough to detect which vhosts use name based virtual hosting and modify the URL composition algorithm based on that fact
To workaround this bug, the user just needs to supply the correct URL in the connection settings of the virtual host resource.